Totem screensaver inhibit confusion


I was wondering whether it was possible to make the screensaver activate (or really automatically turn of the screen with gnome-power-manager) when I'm just playing an audio file so I started looking around.

There is a preference in Totem: "Allow the screensaver to activate even when audio-only is playing". This is a bit confusing, especially the word "even" and if you look at the gconf parameter configuring this: "lock_screensaver_on_audio". Lock means allow the screensaver to be activated?!

This option exists to not activate the screensaver when you play an audio file. A better text would probably be "Inihibit screensaver/power management when playing audio" with a variable "inhibit_screensaver_on_audio_playback". with defaulting to off or maybe leave it away from the UI completely (how many screens are there that turn of speakers when the screensaver/power management is activated?)

From the source, my comments, (now there is enable/disable in the wording):

if (totem_is_playing (totem) != FALSE && (lock_screensaver_on_audio || can_get_frames)) {
		/* inhibit screensaver */
                totem_scrsaver_disable (pi->scr);
       } else {
		/* don't inhibit screensaver */
                totem_scrsaver_enable (pi->scr);

Here lock_screensaver_on_audio is wrong I guess? It now inhibits the screensaver when lock_screensaver_on_audio is true while it should inhibit when it is false?!

I assume can_get_frames is only true when something with some graphics is playing. The is also the unused? variable "visual_effects". It would make sense to also include this in the test so that when visual_effects are enabled and an audio file is playing the screensaver would be inhibited as well.

Also "totem_is_playing (totem) != FALSE" seems a bit too much, != FALSE could be removed I guess.

/me confused ;)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]