Show calendar when clicking on date
authorEnrico Zini <enrico@enricozini.org>
Sun, 13 Sep 2009 13:43:36 +0000 (14:43 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sun, 13 Sep 2009 13:43:36 +0000 (14:43 +0100)
README
src/app_main.vala

diff --git a/README b/README
index 45ff6e8317df13bb3a2fee9ee3eced45e1fa294e..fea88bffe145d9e5ea93bbd3a5c344fb8eddc137 100644 (file)
--- a/README
+++ b/README
@@ -122,6 +122,13 @@ TODO list / wish list
  http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD
 
  * Features to add:
  http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD
 
  * Features to add:
+ + calendar, just the GTK calendar widget with buttons to go back, forth and
+   current (fill in with opimd if it will make sense)
+    = fill in day info with data coming from the laptop, but just read only,
+      without edit features. Good to check what's on for the day, and notes can
+      be taken with pen and paper for now
+    + Allow full text edit of text notes for every day
+    + Activate on double click from date
  - switch backlight keep mode when on power/recharging
     - the button changes the default for the current power mode
  - alarm
  - switch backlight keep mode when on power/recharging
     - the button changes the default for the current power mode
  - alarm
@@ -134,11 +141,6 @@ TODO list / wish list
     - remember unexpired alarms persistently (again, a table in sqlite?) so
       that they can be reinstated if zavai is restarted
     - show active alarms and allow to delete them
     - remember unexpired alarms persistently (again, a table in sqlite?) so
       that they can be reinstated if zavai is restarted
     - show active alarms and allow to delete them
- - calendar, just the GTK calendar widget with buttons to go back, forth and
-   current (fill in with opimd if it will make sense)
-    - fill in day info with data coming from the laptop, but just read only,
-      without edit features. Good to check what's on for the day, and notes can
-      be taken with pen and paper for now
  - GPX status icon (off, waiting for fix, recording)
  - GPX waypoint using AUX button
  - GPX + Audio track
  - GPX status icon (off, waiting for fix, recording)
  - GPX waypoint using AUX button
  - GPX + Audio track
index b293cab1bb0ef45ac0cd67269be06f71af6be86d..6f42629625674e053715257ce5d85def19b7655d 100644 (file)
@@ -36,6 +36,7 @@ public class StatusBar : Gtk.HBox
 public class Clock : Gtk.VBox
 {
     protected Gtk.Label l_date;
 public class Clock : Gtk.VBox
 {
     protected Gtk.Label l_date;
+    protected Gtk.Button l_date_button;
     protected Gtk.Label l_time;
     protected Gtk.Label l_deadline;
     protected time_t last_time;
     protected Gtk.Label l_time;
     protected Gtk.Label l_deadline;
     protected time_t last_time;
@@ -43,7 +44,7 @@ public class Clock : Gtk.VBox
     protected time_t last_deadline;
     protected string last_deadline_label;
 
     protected time_t last_deadline;
     protected string last_deadline_label;
 
-    public Clock()
+    construct
     {
         last_time = time_t();
         last_time_type = zavai.clock.SourceType.SYSTEM;
     {
         last_time = time_t();
         last_time_type = zavai.clock.SourceType.SYSTEM;
@@ -52,7 +53,11 @@ public class Clock : Gtk.VBox
 
         l_date = new Gtk.Label("--");
         l_date.modify_font(Pango.FontDescription.from_string("Sans 40"));
 
         l_date = new Gtk.Label("--");
         l_date.modify_font(Pango.FontDescription.from_string("Sans 40"));
-        pack_start(l_date, false, false, 0);
+       l_date_button = new Gtk.Button();
+       l_date_button.set_image(l_date);
+       l_date_button.relief = Gtk.ReliefStyle.NONE;
+       l_date_button.clicked += on_date_clicked;
+        pack_start(l_date_button, false, false, 0);
         l_time = new Gtk.Label("--:--");
         l_time.modify_font(Pango.FontDescription.from_string("Sans 60"));
         pack_start(l_time, false, false, 0);
         l_time = new Gtk.Label("--:--");
         l_time.modify_font(Pango.FontDescription.from_string("Sans 60"));
         pack_start(l_time, false, false, 0);
@@ -67,6 +72,11 @@ public class Clock : Gtk.VBox
         zavai.clock.clock.request("ui.main.clock");
     }
 
         zavai.clock.clock.request("ui.main.clock");
     }
 
+    private void on_date_clicked(Gtk.Button b)
+    {
+           zavai.app.push_applet("ui.calendar");
+    }
+
     private void on_schedule_changed()
     {
         zavai.clock.Alarm a = zavai.clock.clock.next_alarm();
     private void on_schedule_changed()
     {
         zavai.clock.Alarm a = zavai.clock.clock.next_alarm();