Track short press times
authorEnrico Zini <enrico@enricozini.org>
Sat, 22 Aug 2009 22:40:15 +0000 (23:40 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sat, 22 Aug 2009 22:40:15 +0000 (23:40 +0100)
TODO
src/app.vala
src/app_power.vala

diff --git a/TODO b/TODO
index ff220c88417e99a7c3224bec93898db6e95d1e38..29cc65e44055c7199e9be65b1d013637551163e5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -14,6 +14,7 @@ Features to add:
     - first short click turns on backlight but leaves screen as it is (for sat navs and whatnot)
     - second short click within a second shows clock
     - click when clock is present hides it
+ - icon linking to "current apps" in the main screen
  - alarm
     - vibrate at alarm trigger
     - play sound at alarm trigger
index 80e2cc3ffe18093c4cf63c3f78816c92e12fae2b..73db0c67252365650c16aef888ccd1d15695c46f 100644 (file)
@@ -142,6 +142,11 @@ public class Zavai : Gtk.Window, zavai.Resource
                        current.back();
        }
 
+       public void back_to_main()
+       {
+               show_applet("zavai.status");
+       }
+
        public void shutdown()
        {
        }
index b32a9fc9e3d47baac3c927269c5b16e0a68cb11d..a4227a6be82bbe2c55d51113a43c243d9ebaf7f5 100644 (file)
@@ -43,7 +43,7 @@ public class Power : zavai.Resource, Object
 
        public signal void screen_lock_changed(bool state);
 
-       public signal void power_short_press();
+       public signal void power_short_press(Posix.timeval* t);
        public signal void power_long_press();
        private uint button_press_timeout;
 
@@ -185,10 +185,10 @@ public class Power : zavai.Resource, Object
                }
 
                if (long_press) power_long_press();
-               if (short_press) power_short_press();
+               if (short_press) power_short_press(t);
        }
 
-       private void on_power_short_press()
+       private void on_power_short_press(Posix.timeval* t)
        {
                if (screen_locked)
                        // Short press: turn on backlight for a bit