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 471988 - Switching from "graphic only" to "text only" does not draws text
Switching from "graphic only" to "text only" does not draws text
Status: RESOLVED FIXED
Product: gnome-applets
Classification: Other
Component: cpufreq
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-applets Maintainers
gnome-applets Maintainers
: 484836 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-08-30 20:25 UTC by Sven Arvidsson
Modified: 2008-12-15 13:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
20081126_bgo_471988_cpufreqapplet-show-modes.diff: proposed change (2.68 KB, patch)
2008-11-26 12:06 UTC, Diego Escalante Urrelo (not reading bugmail)
reviewed Details | Review

Description Sven Arvidsson 2007-08-30 20:25:05 UTC
[ From http://bugs.debian.org/439829 by Marcus Lundblad ]

"I have the CPU frequency applet set to display only graphics (just the bar). If I change this to "Text only" in the settings, there is no text at all.

I then check "Show CPU frequency as percentage", now the applet displays "59%". If I then change it back to "Show as frequency" the text gets updated to "1,60 GHz".

Also if I stress the computer (making it scale up the CPU frequency) the text display gets updated. So I suppose there is a redraw missing when switching mode.

I don't recall seeing this bug (prior to Gnome 2.18)."
Comment 1 H. 2007-10-08 20:33:46 UTC
*** Bug 484836 has been marked as a duplicate of this bug. ***
Comment 2 Diego Escalante Urrelo (not reading bugmail) 2008-11-26 10:57:22 UTC
Confirmed. Changing summary.
Just add a cpufreq applet, set it to graphics (and now kill it so it starts in graphic-only mode), and then switch to text only. It won't show any text until an update is triggered by a change in freq or if you change to mixed mode.
Comment 3 Diego Escalante Urrelo (not reading bugmail) 2008-11-26 12:06:44 UTC
Created attachment 123415 [details] [review]
20081126_bgo_471988_cpufreqapplet-show-modes.diff: proposed change

This patch caches the show_mode so we can know if we were previously in graphics only and we jump to text only.
I found a bug while hacking this: the cpu monitor can be used while still being uninitialized, the signal handlers for the applet are connected before the monitor is activated, my patch triggered this when the applet was started in text only mode. It might not be a bug but I think it's saner to put the monitor activation before connecting signals that might use it.
Also I added two sanity checks in the update function, so the monitor can never be null and the governor either. I was hitting a case where the governor was null but the monitor had already been succesfully started, that meant I got (null) and the line governor[0] was obviously segfaulting.

Cheers!
Comment 4 Carlos Garcia Campos 2008-12-15 13:51:51 UTC
Thank you very much for the patch. I've found other situations where it also happened. I've just committed a very similar patch to svn trunk. Thanks!