dear lazyweb: please name DValue

DValue is the datatype at the foundation of dconf and of the glib-based dbus bindings that rob and ori are theoretically working on. it will end up being part of libglib (probably for the release before next guadec).

it is named DValue because it used to be named DConfValue.

you can read a little bit about DValue here.

one thing to note is that, unlike GValue, a DValue is actually a value — not a container or a variable. it can only exist as a value with a type and the value can never change. when you create it it has a value and the only way to get rid of that value is to destroy it. also note that it can contain exactly those values that can be sent over dbus. it cannot contain, for example, object references.

the problem is that its name starts with a ‘d’ and everything in glib must start with ‘g’. i would rename it to GValue but i cannot do this for obvious reasons.

i need a name for it that starts with g. this is something that a lot of people have thought about for a long time without coming up with any good name.

all suggestions must start with G, be short (G + 5 chars max) and not conflict with anything currently in glib or gobject. entries will be judged by my personal whim. i will buy the winner a cookie at our next meeting. feel free to list many suggestions but note that most of the obvious ones have already been considered and shot down for some reason or another…

thanks :)

gnome-screensaver vs. gnome-power-manager

today on #gnome-hackers i was musing to richard about how i think that the current g-p-m/g-s-s setup is very confusing. i’ve thought about this for a while and today i did an AsciiBuilder mockup of what i think the interface should be. he was interested enough to ask me to blog about it to gather opinions from planet.

i make no proposal about how this might be implemented or what the hand-offs between g-p-m and g-s-s might look like. i only propose this as what we should present to the user (and we can figure out the technical parts later).

here it is:

  Computer is inactive after         [2min, 5min, 10min, 1hr, never]

  [X] Automatically lock when inactive

      (*) immediately

      ( ) after an additional        [10min, 20min, 1hr, 2hr]

  [X] Show screensaver when inactive

      for the first                  [10min, 20min, 1hr, 2hr, forever]

          [X] even when I explicitly "Lock Screen".

the [2min, 5min, etc] are not meant to be an exaustive list of times supported by these options. they are merely there to indicate that some time selector is required with possible “never” or “forever” options, as appropriate.

forget screensavers for a moment. pay attention to only the top half of the dialog box.

the basic principle here is that in the absense of a screensaver, the monitor should either be showing your desktop or be powered off (with a small exception made for showing the ‘unlock’ dialog). this powered-off state is called “inactive”. i have not addressed the challenge of how to express this nuance to the user (although maybe it will just be obvious).

if ‘locked’ (implicitly, desktop is not shown) then this implies that the monitor must be off. however, the reverse implication is not true so we allow for a time difference between these two things occuring (including the possibility of zero and infinite time difference).

remember: so far, inactive means “monitor power is off”.

bringing in a screensaver spices things up a little bit but it’s not too bad. i see the screensaver merely as the initial (possibly never-ending) phase of power off. you show it first the first 10 minutes of what would have previously been the monitor’s powered-down mode. there is an exception for the “Lock Screen” item on the panel that allows you to have the screensaver skipped since many people will probably desire this.

note: no relationship whatsoever between the transition from screensaver to power-off and the transition from inactive-but-unlocked to locked. either may occur first (or never).

i think the behaviour from this dialog will be extremely clear and totally specified except for one small detail: when the screensaver is enabled and the unlock dialog box pops up after the monitor has gone to sleep, and the user fails to enter the correct password, then what happens? does the screensaver come on for another 10 minutes or does the computer go directly back to the state that it was in before the user moved the mouse? honestly, i don’t really care and i don’t think we need to expose this as an option.

a possible variation on the screensaver section above is as follows:

  [X] Show screensaver when inactive

      for the first                  [10min, 20min, 1hr, 2hr, forever]

  [X] Show screensaver when I "Lock Screen".

      for the first                  [10min, 20min, 1hr, 2hr, forever]

conceptually it is slightly clearer, and it also allows for more options not allowed by the other dialog. i actually prefer the second choice but i understand that some might see it as overkill.

the use case i have in mind for the second variation is that it might be helpful to show the screensaver for a minute or two after explicitly locking in order to use the monitor as a source of light (when going to bed or locking up the office at night). this might be desired even when a screensaver for inactivity is not desired (or if the inactivity screensaver is desired for a longer length of time).

it might be desirable to put the “screensaver section” in its own dialog (along with the options for selecting the specific screensaver to use).

as for the “times”: how do we do it? spinbox? slider? dropdown menu?

i really like the idea of a dropdown menu containing only “useful” lengths of time. the list of what makes a “useful” length of time is something like:

* 1 minute
* 5 minutes
* 10 minutes
* 30 minutes
* 1 hour
* 2 hours

a consideration not addressed here: perhaps someone wants to cause their computer to immediately be considered as “inactive” (because they are leaving their desk and they want to save power or just hide their screen contents) but doesn’t want to deal with unlock dialogs. we currently have absolutely no way of dealing with this. it’s difficult too, since a simple accidental flick of the mouse would be all that is required to re-activate the desktop. hot corners, anyone?

that is all.