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

[mhc:00234] Re: signal delete_event on Mhc::DayBook



On Thu, 25 Nov 1999 19:36:37 +0900,
	Yoshinari NOMURA <nom@xxxxxxxxxxxxxxxxxxx> said:

> 下のでうまくいきました。

いかん。これだと、Daybook 以外にも影響が出てしまう。。
こっちかな。
--
nom

--- gemcal	1999/10/07 10:09:06	1.1.1.1
+++ gemcal	1999/11/25 10:42:36
@@ -407,7 +407,13 @@
     def set_date(date)         ; @vbx .set_date(date)         ; end
     def date                   ; @vbx .date                   ; end
     def set_style(*arg)        ; @vbx .set_style(*arg)        ; end
-    def signal_connect(sig, &p); @vbx .signal_connect(sig, &p); end
+    def signal_connect(sig, &p)
+      if sig == 'delete_event'
+	super
+      else
+	@vbx .signal_connect(sig, &p)
+      end
+    end
   end
 
   def initialize(date, db, x = nil, y = nil)
@@ -421,7 +427,8 @@
     @db_sd = @db .signal_connect('updated'){scan}
     @al_sd = @alarm .signal_connect('day-changed'){scan(MhcDate .new)}
 
-    @vdl .signal_connect('destroy'){destroy_handler}
+##  @vdl .signal_connect('destroy'){destroy_handler}
+    @vdl .signal_connect('delete_event'){@vdl .hide; true}
     @vdl .signal_connect('month-btn-clicked'){MhcCalendar .new(@date, @db)}
     @vdl .signal_connect('next-btn-clicked') {scan(@date .succ!)}
     @vdl .signal_connect('prev-btn-clicked') {scan(@date .dec!)}