Update number of log entries when they change
authorEnrico Zini <enrico@enricozini.org>
Sat, 27 Mar 2010 22:41:41 +0000 (22:41 +0000)
committerEnrico Zini <enrico@enricozini.org>
Sat, 27 Mar 2010 22:41:41 +0000 (22:41 +0000)
src/app_main.vala
src/log.vala

index 5eb37fa5fb43f1278e5d5c8fb43cabcf3dfe7d2d..94b7df2362014ab78621892fa877ebfab5797fd7 100644 (file)
@@ -425,14 +425,13 @@ public class Log : Gtk.VBox
         l_info_button = new Gtk.Button();
         l_info_button.set_image(l_info);
         l_info_button.relief = Gtk.ReliefStyle.NONE;
-        // l_info_button.clicked += on_date_clicked;
+        l_info_button.clicked += (b) => {
+            //zavai.app.push_applet(zavai.ui.log.log);
+        };
         pack_start(l_info_button, false, false, 0);
 
-        //zavai.clock.clock.minute_changed += on_minute_changed;
-        //zavai.clock.clock.schedule_changed += on_schedule_changed;
-        //on_schedule_changed(zavai.clock.clock.next_alarm());
+        zavai.log.log.entries_changed += refresh;
 
-        //zavai.clock.clock.request("ui.main.clock");
         refresh();
     }
 
index 2f10dbc8b5766b69ffe60e728e0cc2870e86cced..2bbb5d40c3651d95e3af922896acdc0cd459be78 100644 (file)
@@ -312,6 +312,8 @@ public class Logger : Resource, Object
 {
     protected List<Log> logs;
 
+    public signal void entries_changed();
+
     public Logger()
     {
         logs = null;
@@ -355,6 +357,7 @@ public class Logger : Resource, Object
         pop(log);
         log.save();
         if (logs == null) end_trace();
+        entries_changed();
     }
 
     public Log load(string fname)