[desktop-switcher] store panel layout when switching

Bug #275206 reported by Luca Ferretti
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Netbook Remix
Fix Released
High
Neil J. Patel

Bug Description

Note: I'm using desktop-switcher on a jhbuild sandbox, not in "real" netbook system. So I've used desktop-switcher from desktop mode to netbook, then to desktop mode again.

Current Behavior:
  Switching from netbook to desktop mode, the panel layout is changed to Ubuntu default layout

Desider Behavior:
  If the user already have a custom panel layout, restore it when switching back to desktop mode. If not, don't use ubuntu default panel layout, but the default one defined by system (in my case, the one in /opt/gnome, not the default one in /usr).

########

OK, I'll try to explain it better, I know previous phrases could be a little obscure. The main idea is make desktop-switcher a non-branded tool, 'cause currently it seems locked on Ubuntu and UNR default layouts. Maybe new GnomeSession 2.24 features could be used/needed in order to make this better.

Scrolling the code, I found that desktop-switcher if forced to always uses the file "classic-panel-config.xml" to set panel in desktop mode.

IMHO could be better something like:

 1. on first startup/launch run a "configuration tool" (hidden, no user visible UI) and change relevant GConf keys in order to set up the netbook mode. This will change GConf keys only in user database, keeping the system database untouched.

 2. on first switch from netbook to desktop mode, desktop-switcher could perform a `gconftool-2 --dump /apps/panel > ~/.cache/desktop-switcher/netbook-panel-config.xml` in order to store the current panel configuration. This will save the (user custom) applets added to panel, if any, in netbook mode. A subsequent `gconftool-2 --recursive-unset /apps/panel` will set the panel to current system configuration and layout (no need to depend on provided "classic-panel-config.xml" and/or force ubuntu layout)

 3. on next switch from desktop to netbook mode, desktop-switcher could perform another dump, storing this time a
~/.cache/desktop-switcher/classic-panel-config.xml file. This will save the (user custom) applets added to panel, if any, in desktop mode. Then desktop-switcher should restore the previously saved panel layout for netbook mode, stored in ~/.cache/desktop-switcher/netbook-panel-config.xml

 4. go on saving and restoring layouts on switches.

About the usage of new features in GnomeSession 2.24, those are relate to autostart conditions (see [1]), in order to check if netbook remix is performing its first startup/launch and run the first configuration phase described in previous point 1). Maybe the same desktop-switcher could be used as first time configuration tool, providing a --first-run command line option or similar.

Is this totally crazy? :-)

[1] http://live.gnome.org/SessionManagement/GnomeSession#head-2e18b8288cd474477bf43ad7cb49eca7fda31ab7

Revision history for this message
Neil J. Patel (njpatel) wrote :

I've actually already done something along the same lines, but haven't managed to port the code over to desktop-switcher unr yet. I'll get on this as it won't be too hard to port the patch.

Changed in netbook-remix:
assignee: nobody → njpatel
importance: Undecided → High
milestone: none → 1.0.1
status: New → Confirmed
Revision history for this message
Neil J. Patel (njpatel) wrote :

desktop-switcher_0.3.2 will preserve the users panel configuration between switches.

Changed in netbook-remix:
status: Confirmed → Fix Committed
Bill Filler (bfiller)
Changed in netbook-remix:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.