Re: GConf Stability - how to add icons to panel



Hi,

On Fri, 2005-02-04 at 16:03 -0600, Brian Cameron wrote:

> So, I have a couple questions:
> 
> 1. To fulfil our needs to create an internal contract at Sun, it would be great
>     if someone could explain the correct/best approach for integrating into
>     the panel.  It would also be useful if people could highlight if this
>     interface is Stable and will be supported in an on-going fashion.

	In terms of ARC definitions, there simpy is no Stable interface for a
program to add its launcher to the panel. Using gconftool-2 like in the
script attached is as close as you'll get, but you'll note that in GNOME
2.10 the location of these panel keys have changed
from /apps/panel/profiles/default to /apps/panel.

Cheers,
Mark.

#!/bin/bash

# You can modify these to suit
panel="top_panel"
position="1"
right_stick="false"
launcher_path="/usr/share/applications/gnome-terminal.desktop"
launcher_id="foo_launcher"

# Apply the schemas
for schema in $(gconftool-2 --all-entries /schemas/apps/panel/objects | awk -F '=' '{print $1}'); do
    gconftool-2 --apply-schema /schemas/apps/panel/objects/$schema /apps/panel/objects/$launcher_id/$schema
done

# Tweak things
gconftool-2 --set /apps/panel/objects/$launcher_id/object_type -t string launcher-object
gconftool-2 --set /apps/panel/objects/$launcher_id/launcher_location -t string $launcher_path
gconftool-2 --set /apps/panel/objects/$launcher_id/toplevel_id -t string $panel
gconftool-2 --set /apps/panel/objects/$launcher_id/position -t int $position
gconftool-2 --set /apps/panel/objects/$launcher_id/panel_right_stick -t bool $right_stick

object_id_list=$(gconftool-2 --get /apps/panel/general/object_id_list | sed -e "s|]|,$launcher_id]|")

# Finally, add the applet once everything has been setup
gconftool-2 --set /apps/panel/general/object_id_list --type list --list-type string $object_id_list





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