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 332407 - Smart defaults for icon visibility
Smart defaults for icon visibility
Status: RESOLVED FIXED
Product: gnome-power-manager
Classification: Deprecated
Component: gnome-power-manager
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Power Manager Maintainer(s)
GNOME Power Manager Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-02-24 05:32 UTC by Matthias Clasen
Modified: 2006-02-26 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Matthias Clasen 2006-02-24 05:32:58 UTC
It would be nice to show the icon by default on laptops, and
hide it by default on desktops.
Comment 1 Matthias Clasen 2006-02-24 05:33:26 UTC
Originally discussed here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=182524
Comment 2 Richard Hughes 2006-02-24 16:06:26 UTC
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.
Comment 3 Richard Hughes 2006-02-24 17:11:36 UTC
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.
Comment 4 Matthias Clasen 2006-02-25 04:19:04 UTC
"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
Comment 5 Richard Hughes 2006-02-25 11:47:39 UTC
>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?
Comment 6 Richard Hughes 2006-02-25 15:47:28 UTC
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.
Comment 7 Richard Hughes 2006-02-26 13:07:21 UTC
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.