summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMart Raudsepp <leio@gentoo.org>2006-09-18 02:58:50 +0000
committerMart Raudsepp <leio@gentoo.org>2006-09-18 02:58:50 +0000
commit1246832f4348f27591d1dc3898f513bf65cd99c9 (patch)
tree8a550e6c908b8bda23ef994f820c00dbacf116b7
parentFix some extraneous polling in stickynotes and battstat applets for battery s... (diff)
downloadgnome-perf-1246832f4348f27591d1dc3898f513bf65cd99c9.tar.gz
gnome-perf-1246832f4348f27591d1dc3898f513bf65cd99c9.tar.bz2
gnome-perf-1246832f4348f27591d1dc3898f513bf65cd99c9.zip
Wake up the clock applet only when needed - only every full minute or full second (depending on if seconds are shown), instead of in a one second constant interval.
-rw-r--r--gnome-base/gnome-panel/ChangeLog5
-rw-r--r--gnome-base/gnome-panel/Manifest20
-rw-r--r--gnome-base/gnome-panel/files/gnome-panel-2.16.0-no-seconds.patch65
-rw-r--r--gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild7
4 files changed, 88 insertions, 9 deletions
diff --git a/gnome-base/gnome-panel/ChangeLog b/gnome-base/gnome-panel/ChangeLog
index 418346e..55de57e 100644
--- a/gnome-base/gnome-panel/ChangeLog
+++ b/gnome-base/gnome-panel/ChangeLog
@@ -2,6 +2,11 @@
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 18 Sep 2006; Mart Raudsepp <leio@gentoo.org> ChangeLog:
+ Wake up the clock applet only when needed - only every full minute or full
+ second (depending on if seconds are shown), instead of in a one second
+ constant interval.
+
15 Sep 2006; Mart Raudsepp <leio@gentoo.org> ChangeLog:
Make the clock, fish, notification-area and wncklet applets built in-process
for some memory savings.
diff --git a/gnome-base/gnome-panel/Manifest b/gnome-base/gnome-panel/Manifest
index 1b70ad9..9851f0e 100644
--- a/gnome-base/gnome-panel/Manifest
+++ b/gnome-base/gnome-panel/Manifest
@@ -1,12 +1,16 @@
+AUX gnome-panel-2.16.0-no-seconds.patch 1813 RMD160 639071e02e5c45d7c69f3405c6d61d9d151208a3 SHA1 677a7e8d2da5dae1bec4ac70573793b3567f12a2 SHA256 7b46700c2fe38e03d992612141c67426963ec5234f5b51767ce90d1460225389
+MD5 16977724182a2174b6762471e1e72553 files/gnome-panel-2.16.0-no-seconds.patch 1813
+RMD160 639071e02e5c45d7c69f3405c6d61d9d151208a3 files/gnome-panel-2.16.0-no-seconds.patch 1813
+SHA256 7b46700c2fe38e03d992612141c67426963ec5234f5b51767ce90d1460225389 files/gnome-panel-2.16.0-no-seconds.patch 1813
DIST gnome-panel-2.16.0.tar.bz2 2664150 RMD160 fd761c133140a0999683748796d3b64982143a29 SHA1 32077d18d7255acb518a1795ce201b2a79017d97 SHA256 d13883bbf290ecf1a4fdb21c1afc39e62b68d2cc97701ca34f99654d891db7ef
-EBUILD gnome-panel-2.16.0.ebuild 1849 RMD160 07265684e1be12c0ce1143048180cfb875396803 SHA1 21760989c48c8ccb75a12b227aef0c6435b31686 SHA256 71a6ac79cd51a10e69ff2cef351604f4e4c86b4916387e0683270a2ba366443b
-MD5 237cd8185d28b5553c4a4adc32063372 gnome-panel-2.16.0.ebuild 1849
-RMD160 07265684e1be12c0ce1143048180cfb875396803 gnome-panel-2.16.0.ebuild 1849
-SHA256 71a6ac79cd51a10e69ff2cef351604f4e4c86b4916387e0683270a2ba366443b gnome-panel-2.16.0.ebuild 1849
-MISC ChangeLog 288 RMD160 9bedaa56d62ec073ca7f27f4f1cb86a3eefc6d99 SHA1 e7ad019a64fb17d8d819c3e44db28ec3c09378e9 SHA256 f2c0ff3b787c7a2bc4b06f0c9b125cb322612405638125a26affff0578683e5d
-MD5 84955ce1648e3b1e605fdc7756e6a755 ChangeLog 288
-RMD160 9bedaa56d62ec073ca7f27f4f1cb86a3eefc6d99 ChangeLog 288
-SHA256 f2c0ff3b787c7a2bc4b06f0c9b125cb322612405638125a26affff0578683e5d ChangeLog 288
+EBUILD gnome-panel-2.16.0.ebuild 2184 RMD160 47cf4176c56b124f56be51fa797384b4b23911f5 SHA1 a864688b2b47443e59e55e32e968cfa911dd82c0 SHA256 5423d616999edf269477768b10c419a5ff3379baa0e582b2689a410b6fc47a94
+MD5 9ec2a0eaaadc0538324e3d8d3fdb8833 gnome-panel-2.16.0.ebuild 2184
+RMD160 47cf4176c56b124f56be51fa797384b4b23911f5 gnome-panel-2.16.0.ebuild 2184
+SHA256 5423d616999edf269477768b10c419a5ff3379baa0e582b2689a410b6fc47a94 gnome-panel-2.16.0.ebuild 2184
+MISC ChangeLog 518 RMD160 8b0d7343ce966d855115f864a9b4d1ebd3103635 SHA1 c681b3d28841274f35f6b8ba2af792c6146ef638 SHA256 a1e5d6e4570bde21e23f533e671f7d473caa17e08a2a60581efcf8d4133945fb
+MD5 1018b5b2ba1b56c93d7d6808f18a0e8a ChangeLog 518
+RMD160 8b0d7343ce966d855115f864a9b4d1ebd3103635 ChangeLog 518
+SHA256 a1e5d6e4570bde21e23f533e671f7d473caa17e08a2a60581efcf8d4133945fb ChangeLog 518
MD5 157eba34216c163b3abbee65f8d1a7b0 files/digest-gnome-panel-2.16.0 262
RMD160 7d32a2699e1ad43fcb8b605b5039b582dda14e8f files/digest-gnome-panel-2.16.0 262
SHA256 3bf2c9b7fab3a3d84d835676c269ba7ad539eef1d1f2e1335267f8179ca423af files/digest-gnome-panel-2.16.0 262
diff --git a/gnome-base/gnome-panel/files/gnome-panel-2.16.0-no-seconds.patch b/gnome-base/gnome-panel/files/gnome-panel-2.16.0-no-seconds.patch
new file mode 100644
index 0000000..d76907d
--- /dev/null
+++ b/gnome-base/gnome-panel/files/gnome-panel-2.16.0-no-seconds.patch
@@ -0,0 +1,65 @@
+From Fedora Core 6:
+
+https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=204862
+http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/gnome-panel/devel/gnome-panel-2.15.92-no-seconds.patch?rev=1.1
+http://bugzilla.gnome.org/attachment.cgi?id=72039&action=view
+
+Alternative approach discussion on upstream bug, with possibly better timezone change notification done in the future:
+http://bugzilla.gnome.org/show_bug.cgi?id=348749
+
+--- gnome-panel-2.15.92/applets/clock/clock.c.no-seconds 2006-09-01 13:52:10.000000000 -0400
++++ gnome-panel-2.15.92/applets/clock/clock.c 2006-09-01 13:56:36.000000000 -0400
+@@ -48,6 +48,7 @@
+ #include <string.h>
+ #include <time.h>
+ #include <langinfo.h>
++#include <sys/time.h>
+
+ #include <panel-applet.h>
+ #include <panel-applet-gconf.h>
+@@ -243,6 +244,7 @@
+ {
+ ClockData *cd = data;
+ time_t new_time;
++ int timeouttime;
+
+ time (&new_time);
+
+@@ -262,7 +264,20 @@
+ update_clock (cd);
+ }
+
+- return TRUE;
++ if (cd->format == CLOCK_FORMAT_INTERNET)
++ timeouttime = INTERNETSECOND;
++ else {
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ timeouttime = (1000000 - tv.tv_usec)/1000+1;
++ if (!cd->showseconds)
++ timeouttime += 1000 * (59 - cd->current_time % 60);
++ }
++ cd->timeout = g_timeout_add (timeouttime,
++ clock_timeout_callback,
++ cd);
++
++ return FALSE;
+ }
+
+ static float
+@@ -489,8 +504,13 @@
+
+ if (cd->format == CLOCK_FORMAT_INTERNET)
+ timeouttime = INTERNETSECOND;
+- else
+- timeouttime = 1000;
++ else {
++ struct timeval tv;
++ gettimeofday(&tv, NULL);
++ timeouttime = (1000000 - tv.tv_usec)/1000+1;
++ if (!cd->showseconds)
++ timeouttime += 1000 * (59 - cd->current_time % 60);
++ }
+
+ cd->timeout = g_timeout_add (timeouttime,
+ clock_timeout_callback,
diff --git a/gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild b/gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild
index 670d5ce..2096bd2 100644
--- a/gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild
+++ b/gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild
@@ -2,7 +2,7 @@
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/gnome-base/gnome-panel/gnome-panel-2.16.0.ebuild,v 1.2 2006/09/12 15:21:36 dang Exp $
-inherit gnome2
+inherit gnome2 eutils
DESCRIPTION="The GNOME panel"
HOMEPAGE="http://www.gnome.org/"
@@ -49,6 +49,11 @@ src_unpack() {
# FIXME : uh yeah, this is nice
# We should patch in a switch here and send it upstream
sed -i 's:--load:-v:' ${S}/gnome-panel/Makefile.in || die "sed failed"
+
+ # Wake up the clock applet only when needed. E.g, on a minute change with a clock that doesn't show seconds,
+ # instead of every second. Leads to saving battery power, possibly more millisecond precise, but potentially
+ # taking longer to react to time and/or timezone adjustments.
+ epatch "${FILESDIR}/${P}-no-seconds.patch"
}
pkg_postinst() {