GNOME Bugzilla – Bug 332407
Smart defaults for icon visibility
Last modified: 2006-02-26 13:07:21 UTC
It would be nice to show the icon by default on laptops, and hide it by default on desktops.
Originally discussed here: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182524
What about a 5th option "Only show icon when battery present" which could become the default. Some people I talk to want an icon on thier desktop machine, so that they can use the menu to enter suspend and change the preferences. Or we can change option 4 from "Always display icon" to "Always display icon when battery devices present" Or a add a checkbox (or just a gconf key) saying "show ac adapter if there are no battery devices on the system" Comments please.
Or maybe we should default to "charge" so we only display the icon whenever the laptop battery is charging or discharging, (but this does mean the icon disappears when the laptop battery reaches 100% charge). The advantage to this, is a system with no battery devices can never be "charging" and therefore no icon would be shown. Users could change the value to always if they want a constant icon. This is the easiest fix by far.
"Show icon when battery present" makes sense to me, and should match my initial "laptop" idea pretty closely. But I don't think it is really necessary to expose it in the ui as a third option. It should just be used to determine the initial value for the "show icon" key
>It should just be used to determine the initial value for the "show icon" key You mean the first ever time g-p-m has been run? That's not going to work if we start g-p-m initially with a battery disconnected. Jaap, Jon, what are your views?
Or what about change the "always" value to "ifpresent" and change the 4th option from: Always display icon to Display icon if battery hardware present And tell people who want the notification bar there all the time on desktop machines (which I can't see being a common case) to just change the gconf value to "always". At the moment I'm tempted to just make *another* radiobutton "ifpresent" so that there are 5 options. This keeps the policy very logical, but very flexible, if a little verbose. I want to impliment this before Sunday night as Monday is the next tarball release. Thanks.
I got bored and wanted a solution for the release: 2006-02-25 Richard Hughes <richard@hughsie.com> * src/gpm-prefs.h: Add GPM_PREF_USE_ICON_DESKTOPS * data/gnome-power-manager.schemas.in: Add the new key: /apps/gnome-power-manager/use_icon_for_desktops so we can set the icon policy when no hardware is present. Defaults to false. * src/gpm-manager.c (get_stock_id): Only use the ac_adapter fallback on desktops if GPM_PREF_USE_ICON_DESKTOPS is set. Fixes #332407 Richard.