Shorter time for long press
authorEnrico Zini <enrico@enricozini.org>
Sun, 16 Aug 2009 20:33:57 +0000 (21:33 +0100)
committerEnrico Zini <enrico@enricozini.org>
Sun, 16 Aug 2009 20:33:57 +0000 (21:33 +0100)
src/app_power.vala

index 0854f9c772dcccb4072f39d48551deee405f12f9..bd99ffd4f0b961380b4546308ec1a2adc4c66389 100644 (file)
@@ -129,12 +129,12 @@ public class Power : zavai.Resource, Object
                        if (last_down.tv_sec == 0)
                        {
                                last_down = *t;
-                               button_press_timeout = Timeout.add(1500, on_power_button_timeout);
+                               button_press_timeout = Timeout.add(1000, on_power_button_timeout);
                        }
                        else
                        {
                                long diff = timediff(t, &last_down);
-                               long_press = diff >= 1500000;
+                               long_press = diff >= 1000000;
                        }
                } else {
                        if (last_down.tv_sec == 0)
@@ -148,7 +148,7 @@ public class Power : zavai.Resource, Object
                                        button_press_timeout = 0;
                                }
                                long diff = timediff(t, &last_down);
-                               if (diff >= 1500000)
+                               if (diff >= 1000000)
                                        long_press = true;
                                else
                                        short_press = true;