From: Enrico Zini Date: Sun, 13 Sep 2009 13:43:36 +0000 (+0100) Subject: Show calendar when clicking on date X-Git-Url: https://git.toastfreeware.priv.at/gregoa/zavai.git/commitdiff_plain/0116d004befa829f907692950d60a95308478273?ds=sidebyside Show calendar when clicking on date --- diff --git a/README b/README index 45ff6e8..fea88bf 100644 --- 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: + + 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 @@ -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 - - 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 diff --git a/src/app_main.vala b/src/app_main.vala index b293cab..6f42629 100644 --- a/src/app_main.vala +++ b/src/app_main.vala @@ -36,6 +36,7 @@ public class StatusBar : Gtk.HBox 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; @@ -43,7 +44,7 @@ public class Clock : Gtk.VBox protected time_t last_deadline; protected string last_deadline_label; - public Clock() + construct { 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")); - 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); @@ -67,6 +72,11 @@ public class Clock : Gtk.VBox 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();