After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156796 - Changing time doesn't update until minute tick
Changing time doesn't update until minute tick
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
: 153231 156795 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-10-29 11:18 UTC by Marco Pesenti Gritti
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (3.20 KB, patch)
2004-10-29 11:19 UTC, Marco Pesenti Gritti
accepted-commit_now Details | Review

Description Marco Pesenti Gritti 2004-10-29 11:18:12 UTC
When "Show seconds" preference is unchecked time changes are not showed until
the minute update.
Comment 1 Marco Pesenti Gritti 2004-10-29 11:19:33 UTC
Created attachment 33196 [details] [review]
fix

The attached patch emits the timeout every second (or internet second) but only
update the clock when necessary.
Comment 2 Vincent Untz 2004-10-29 11:46:38 UTC
*** Bug 156795 has been marked as a duplicate of this bug. ***
Comment 3 Vincent Untz 2004-10-29 12:05:19 UTC
Comment on attachment 33196 [details] [review]
fix

>@@ -206,40 +206,26 @@
> clock_timeout_callback (gpointer data)
> {
> 	ClockData *cd = data;
>+	time_t new_time;
> 
>-	update_clock (cd);
>+        time (&new_time);
> 
> 	if (!cd->showseconds && cd->format != CLOCK_FORMAT_UNIX) {

You should probably add "&& cd->format != CLOCK_FORMAT_CUSTOM" because if the
user
chose a custom format, he might have specified %S in the format string.

It's ok otherwise. I don't like the "timeout every second" idea, but there's no
other way to handle this...
You can commit this to HEAD. It's probably ok for gnome-2-8 too...
Comment 4 Vincent Untz 2004-10-29 12:05:36 UTC
*** Bug 153231 has been marked as a duplicate of this bug. ***
Comment 5 Marco Pesenti Gritti 2004-10-29 12:21:48 UTC
I dont like the timeout thing either but ...
That was a quick review, thanks!

Checked in on both branches