! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
updates occur once a second when datetime plugin shows date only
Status:
RESOLVED: FIXED
Product:
Xfce4-datetime-plugin
Component:
General

Comments

Description Steve 2008-06-17 19:21:45 CEST
The datetime plugin updates once a second when the date only is shown and the time format includes seconds.

Reproduce as follows:
Configure the datetime plugin with a layout of "Date only" and a time format that includes seconds.
The date is displayed in the panel and the time is displayed in a tooltip.
Monitor the plugin with strace (and do not redirect its output to a file).
Move the cursor outside the panel (also, the panel should not have other plugins that do periodic updates).
strace shows system calls occurring once a second.
Reconfigure the plugin with a time format that does not include seconds and move the cursor outside the panel.
Now, strace shows system calls occurring once a minute.

The expected behavior is for the plugin to update once a minute unless seconds are currently being displayed in the plugin's button or tooltip.

$ ps -e | fgrep xfce4-panel
10438 pts/1    00:00:13 xfce4-panel
$ strace -p 10438 -ttt

Bug 4145 has a patch that includes a fix for this bug.
Comment 1 Diego Ongaro 2008-06-18 21:55:57 CEST
Indeed, I guess I introduced this problem with the new tooltips implementation.
Comment 2 Diego Ongaro 2008-06-25 19:55:09 CEST
Fixed in svn r4993, borrowing from your patch in Bug #4145. Thanks.
Comment 3 Steve 2008-06-25 21:18:41 CEST
(In reply to comment #2)
> Fixed in svn r4993, borrowing from your patch in Bug #4145. Thanks.

Adding the function datetime_set_update_interval() is a good idea, however, it depends on *both* the layout and the date/time formats, so it needs to be called when either changes. You can verify using the strace method I outlined above.

BTW, this dual dependency was why I computed the update interval in datetime_update() (and factored out the timer handler into datetime_update1()).
Comment 4 Diego Ongaro 2008-06-25 22:15:14 CEST
Created attachment 1711 
Double-dependency

I'm too lazy to think right now, but I think this'll do the trick.
Comment 5 Diego Ongaro 2008-06-27 22:28:55 CEST
Committed that patch in r5007. Please re-reopen this bug if it is insufficient.

Bug #4157

Reported by:
Steve
Reported on: 2008-06-17
Last modified on: 2010-11-09

People

Assignee:
Diego Ongaro
CC List:
1 user

Version

Version:
unspecified

Attachments

Double-dependency (2.48 KB, patch)
2008-06-25 22:15 CEST , Diego Ongaro
no flags

Additional information