[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[mhc:01433] Re: Can mhc2palm export ``X-SC-Location:'' value ?



乃村です.

On Tue, 11 Sep 2001 13:24:14 +0900,
	"Bun'ei OTOKAWA" <Bunei.Otokawa@xxxxxxxxx> said:

>   subject [location]
> 
> のような形で追加されると便利ではないかと思いますがいかがでしょ

こんな感じでしょうか.一応双方の通信でうまくいってそうな感じです.
Trunk にはコミット済みです.
--
nom


Index: mhc-palm.rb
===================================================================
RCS file: /cvsroot/mhc/ruby-ext/lib/mhc-palm.rb,v
retrieving revision 1.6
diff -u -r1.6 mhc-palm.rb
--- mhc-palm.rb	2001/02/06 13:36:01	1.6
+++ mhc-palm.rb	2001/09/12 03:30:24
@@ -579,7 +579,8 @@
     xsc["Record-Id"]  = create_message_id(@id .to_s) # xxx
     xsc["Pilot-Attr"] = attribute_string
     xsc["Pilot-Id"]   = @id
-    xsc["Subject"]    = Kconv::tojis(@description)
+    xsc["Subject"]    = Kconv::tojis(Kconv::toeuc(@description) .sub(/\[[^\]]*\]\s*$/, ''))
+    xsc["Location"]   = Kconv::tojis($1) if Kconv::toeuc(@description) =~ /\[([^\]]+)\]\s*$/
     xsc["Note"]       = Kconv::tojis(@note)
     xsc["Category"]   = @category  if category?
     xsc["Alarm"]      = alarm
Index: mhc-schedule.rb
===================================================================
RCS file: /cvsroot/mhc/ruby-ext/lib/mhc-schedule.rb,v
retrieving revision 1.12
diff -u -r1.12 mhc-schedule.rb
--- mhc-schedule.rb	2001/05/22 02:02:43	1.12
+++ mhc-schedule.rb	2001/09/12 03:30:24
@@ -844,7 +844,12 @@
     contents = datebk3_icon + "\n" + contents if datebk3_icon
     pi_rec .set_note(contents)
 
-    pi_rec .set_description(subject)
+    if (location .to_s != '')
+      pi_rec .set_description(subject + '[' + location .to_s + ']')
+    else
+      pi_rec .set_description(subject)
+    end
+      
     return pi_rec
   end