Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/frame
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-12-06 21:42:19 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-12-06 21:48:51 (GMT)
commit958504b1ca5760ec263e72f69787e9cd5afc7118 (patch)
treed841902df962a71bb74a30ad0f382801b8cae93f /src/jarabe/frame
parent8c8b205fdf23accfaade79b9162812d5c59b30a9 (diff)
Use g_timeout_add_seconds() for power efficiency
This attempts to align second-granularity wakeups across the system, reducing CPU wakeups a little. I considered all timeouts of duration 1 second or greater, and moved the non-timing-critical ones to g_timeout_add_seconds().
Diffstat (limited to 'src/jarabe/frame')
-rw-r--r--src/jarabe/frame/notification.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jarabe/frame/notification.py b/src/jarabe/frame/notification.py
index 68107ba..61a84e9 100644
--- a/src/jarabe/frame/notification.py
+++ b/src/jarabe/frame/notification.py
@@ -31,7 +31,7 @@ class NotificationIcon(gtk.EventBox):
'icon-filename' : (str, None, None, None, gobject.PARAM_READWRITE)
}
- _PULSE_TIMEOUT = 3000
+ _PULSE_TIMEOUT = 3
def __init__(self, **kwargs):
self._icon = PulsingIcon(pixel_size=style.STANDARD_ICON_SIZE)
@@ -45,7 +45,7 @@ class NotificationIcon(gtk.EventBox):
self.add(self._icon)
self._icon.show()
- gobject.timeout_add(self._PULSE_TIMEOUT, self.__stop_pulsing_cb)
+ gobject.timeout_add_seconds(self._PULSE_TIMEOUT, self.__stop_pulsing_cb)
self.set_size_request(style.GRID_CELL_SIZE, style.GRID_CELL_SIZE)