[gnome-panel] panel: Add GSettings schema and new definition of default panel layout
- From: Vincent Untz <vuntz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] panel: Add GSettings schema and new definition of default panel layout
- Date: Mon, 28 Mar 2011 21:11:14 +0000 (UTC)
commit 859efb57cacbb283ac66b152087f14aacbc9bb97
Author: Vincent Untz <vuntz gnome org>
Date: Wed Mar 23 16:47:15 2011 +0100
panel: Add GSettings schema and new definition of default panel layout
This is just the schemas, and no code has been ported. The schemas will
need to be reviewed later on too.
The default panel layout will be defined in a simple keyfile, that the
panel will duplicate inside gsettings if there is no toplevel
configured.
configure.ac | 2 +
data/Makefile.am | 19 +++
data/org.gnome.gnome-panel.gschema.xml | 81 +++++++++++
data/org.gnome.gnome-panel.launcher.gschema.xml | 9 ++
data/org.gnome.gnome-panel.menu-button.gschema.xml | 19 +++
data/org.gnome.gnome-panel.object.gschema.xml | 24 ++++
data/org.gnome.gnome-panel.toplevel.gschema.xml | 142 ++++++++++++++++++++
data/panel-default-layout.layout | 38 +++++
8 files changed, 334 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index daebb17..e80f9fe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -43,6 +43,8 @@ GNOME_COMPILE_WARNINGS(maximum)
# Check for introspection
GOBJECT_INTROSPECTION_CHECK([0.9.5])
+GLIB_GSETTINGS
+
m4_pattern_allow([AM_V_GEN])dnl Make autoconf not complain about the rule below
PANEL_INTLTOOL_PANEL_APPLET_RULE='%.panel-applet: %.panel-applet.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; $(AM_V_GEN) LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@'
AC_SUBST([PANEL_INTLTOOL_PANEL_APPLET_RULE])
diff --git a/data/Makefile.am b/data/Makefile.am
index 014b2e4..a4a6fd4 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,3 +1,22 @@
SUBDIRS = 16x16 22x22 24x24 32x32 48x48 scalable
+gsettings_SCHEMAS = \
+ org.gnome.gnome-panel.gschema.xml \
+ org.gnome.gnome-panel.launcher.gschema.xml \
+ org.gnome.gnome-panel.menu-button.gschema.xml \
+ org.gnome.gnome-panel.object.gschema.xml \
+ org.gnome.gnome-panel.toplevel.gschema.xml
+
+ GSETTINGS_RULES@
+
+default_layoutdir = $(datadir)/gnome-panel
+default_layout_DATA = panel-default-layout.layout
+
+EXTRA_DIST = \
+ $(gsettings_SCHEMAS) \
+ $(default_layout_DATA)
+
+CLEANFILES = \
+ *.gschema.valid
+
-include $(top_srcdir)/git.mk
diff --git a/data/org.gnome.gnome-panel.gschema.xml b/data/org.gnome.gnome-panel.gschema.xml
new file mode 100644
index 0000000..434bd5f
--- /dev/null
+++ b/data/org.gnome.gnome-panel.gschema.xml
@@ -0,0 +1,81 @@
+<schemalist gettext-domain="gnome-panel-3.0">
+
+ <schema id="org.gnome.gnome-panel" path="/org/gnome/gnome-panel/">
+ <child name="general" schema="org.gnome.gnome-panel.general"/>
+ <child name="layout" schema="org.gnome.gnome-panel.layout"/>
+ <child name="lockdown" schema="org.gnome.gnome-panel.lockdown"/>
+ <child name="run-dialog" schema="org.gnome.gnome-panel.run-dialog"/>
+ </schema>
+
+ <schema id="org.gnome.gnome-panel.general" path="/org/gnome/gnome-panel/general/">
+ <key name="enable-tooltips" type="b">
+ <default>true</default>
+ <summary>Enable tooltips</summary>
+ <description>If true, tooltips are shown for objects in panels.</description>
+ </key>
+ <key name="enable-animations" type="b">
+ <default>true</default>
+ <summary>Enable animations</summary>
+ </key>
+ <key name="confirm-panel-removal" type="b">
+ <default>true</default>
+ <summary>Confirm panel removal</summary>
+ <description>If true, a dialog is shown asking for confirmation if the user wants to remove a panel.</description>
+ </key>
+ <key name="highlight-launchers-on-mouseover" type="b">
+ <default>true</default>
+ <summary>Highlight launchers on mouseover</summary>
+ <description>If true, a launcher is highlighted when the user moves the pointer over it.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnome.gnome-panel.layout" path="/org/gnome/gnome-panel/layout/">
+ <key name="toplevel-id-list" type="as">
+ <default>[]</default>
+ <summary>Panel ID list</summary>
+ <description>A list of panel IDs. Each ID identifies an individual toplevel panel. The settings for each of these panels are stored in /apps/panel/toplevels/$(id).</description>
+ </key>
+ <key name="object-id-list" type="as">
+ <default>[]</default>
+ <summary>Panel object ID list</summary>
+ <description>A list of panel object IDs. Each ID identifies an individual panel object (e.g. an applet, launcher, action button or menu button/bar). The settings for each of these objects are stored in /apps/panel/objects/$(id).</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnome.gnome-panel.lockdown" path="/org/gnome/gnome-panel/lockdown/">
+ <key name="locked-down" type="b">
+ <default>false</default>
+ <summary>Complete panel lockdown</summary>
+ <description>If true, the panel will not allow any changes to the configuration of the panel. Individual applets may need to be locked down separately however. The panel must be restarted for this to take effect.</description>
+ </key>
+ <key name="disabled-applets" type="as">
+ <default>[]</default>
+ <summary>Applet IIDs to disable from loading</summary>
+ <description>A list of applet IIDs that the panel will ignore. This way you can disable certain applets from loading or showing up in the menu. For example to disable the mini-commander applet add 'OAFIID:GNOME_MiniCommanderApplet' to this list. The panel must be restarted for this to take effect.</description>
+ </key>
+ <key name="disable-force-quit" type="b">
+ <default>false</default>
+ <summary>Disable Force Quit</summary>
+ <description>If true, the panel will not allow a user to force an application to quit by removing access to the force quit button.</description>
+ </key>
+ </schema>
+
+ <schema id="org.gnome.gnome-panel.run-dialog" path="/org/gnome/gnome-panel/run-dialog/">
+ <key name="enable-program-list" type="b">
+ <default>true</default>
+ <summary>Enable program list in "Run Application" dialog</summary>
+ <description>If true, the "Known Applications" listing in the "Run Application" dialog is made available. Whether or not the listing is expanded when the dialog is shown is controlled by the show_program_list key.</description>
+ </key>
+ <key name="show-program-list" type="b">
+ <default>false</default>
+ <summary>Expand program list in "Run Application" dialog</summary>
+ <description>If true, the "Known Applications" listing in the "Run Application" dialog is expanded when the dialog is opened. This key is only relevant if the enable_program_list key is true.</description>
+ </key>
+ <key name="enable-autocompletion" type="b">
+ <default>true</default>
+ <summary>Enable autocompletion in "Run Application" dialog</summary>
+ <description>If true, autocompletion in the "Run Application" dialog is made available.</description>
+ </key>
+ </schema>
+
+</schemalist>
diff --git a/data/org.gnome.gnome-panel.launcher.gschema.xml b/data/org.gnome.gnome-panel.launcher.gschema.xml
new file mode 100644
index 0000000..906eff9
--- /dev/null
+++ b/data/org.gnome.gnome-panel.launcher.gschema.xml
@@ -0,0 +1,9 @@
+<schemalist gettext-domain="gnome-panel-3.0">
+ <schema id="org.gnome.gnome-panel.launcher">
+ <key name="launcher-location" type="s">
+ <default>''</default>
+ <summary>Launcher location</summary>
+ <description>The location of the .desktop file describing the launcher. This key is only relevant if the object_type key is "launcher-object".</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.gnome-panel.menu-button.gschema.xml b/data/org.gnome.gnome-panel.menu-button.gschema.xml
new file mode 100644
index 0000000..c94ffc5
--- /dev/null
+++ b/data/org.gnome.gnome-panel.menu-button.gschema.xml
@@ -0,0 +1,19 @@
+<schemalist gettext-domain="gnome-panel-3.0">
+ <schema id="org.gnome.gnome-panel.menu-button">
+ <key name="tooltip" type="s">
+ <default>''</default>
+ <summary>Tooltip displayed for menu</summary>
+ <description>The text to display in a tooltip for this this menu.</description>
+ </key>
+ <key name="custom-icon" type="s">
+ <default>''</default>
+ <summary>Icon used for button</summary>
+ <description>The location of the image file used as the icon for the object's button. If empty, the default icon for the menu will be used.</description>
+ </key>
+ <key name="menu-path" type="s">
+ <default>''</default>
+ <summary>Menu content path</summary>
+ <description>The path from which the menu contents is contructed. If empty, the menu will be the default applications menu.</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.gnome-panel.object.gschema.xml b/data/org.gnome.gnome-panel.object.gschema.xml
new file mode 100644
index 0000000..a4d4613
--- /dev/null
+++ b/data/org.gnome.gnome-panel.object.gschema.xml
@@ -0,0 +1,24 @@
+<schemalist gettext-domain="gnome-panel-3.0">
+ <schema id="org.gnome.gnome-panel.object">
+ <key name="object-iid" type="s">
+ <default>''</default>
+ <summary>Object IID</summary>
+ <description>The implementation ID of the object - e.g. "ClockAppletFactory::ClockApplet".</description>
+ </key>
+ <key name="toplevel-id" type="s">
+ <default>''</default>
+ <summary>Toplevel panel containing object</summary>
+ <description>The identifier of the toplevel panel which contains this object.</description>
+ </key>
+ <key name="position" type="i">
+ <default>0</default>
+ <summary>Object's position on the panel</summary>
+ <description>The position of this panel object. The position is specified by the number of pixels from the left (or top if vertical) panel edge.</description>
+ </key>
+ <key name="pack-end" type="b">
+ <default>false</default>
+ <summary>Interpret position relative to bottom/right edge</summary>
+ <description>If true, the position of the object is interpreted relative to the right (or bottom if vertical) edge of the panel.</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.gnome.gnome-panel.toplevel.gschema.xml b/data/org.gnome.gnome-panel.toplevel.gschema.xml
new file mode 100644
index 0000000..48c11f6
--- /dev/null
+++ b/data/org.gnome.gnome-panel.toplevel.gschema.xml
@@ -0,0 +1,142 @@
+<schemalist gettext-domain="gnome-panel-3.0">
+ <schema id="org.gnome.gnome-panel.toplevel">
+ <key name="name" type="s">
+ <default>''</default>
+ <summary>Name to identify panel</summary>
+ <description>This is a human readable name which you can use to identify a panel. Its main purpose is to serve as the panel's window title which is useful when navigating between panels.</description>
+ </key>
+ <key name="screen" type="i">
+ <default>0</default>
+ <summary>X screen where the panel is displayed</summary>
+ <description>With a multi-screen setup, you may have panels on each individual screen. This key identifies the current screen the panel is displayed on.</description>
+ </key>
+ <key name="monitor" type="i">
+ <default>0</default>
+ <summary>Xinerama monitor where the panel is displayed</summary>
+ <description>In a Xinerama setup, you may have panels on each individual monitor. This key identifies the current monitor the panel is displayed on.</description>
+ </key>
+ <key name="expand" type="b">
+ <default>true</default>
+ <summary>Expand to occupy entire screen width</summary>
+ <description>If true, the panel will occupy the entire screen width (height if this is a vertical panel). In this mode the panel can only be placed at a screen edge. If false, the panel will only be large enough to accommodate the applets, launchers and buttons on the panel.</description>
+ </key>
+ <key name="orientation" type="s">
+ <default>'top'</default>
+ <summary>Panel orientation</summary>
+ <description>The orientation of the panel. Possible values are "top", "bottom", "left", "right". In expanded mode the key specifies which screen edge the panel is on. In un-expanded mode the difference between "top" and "bottom" is less important - both indicate that this is a horizontal panel - but still give a useful hint as to how some panel objects should behave. For example, on a "top" panel a menu button will pop up its menu below the panel, whereas on a "bottom" panel the menu will be popped up above the panel.</description>
+ </key>
+ <key name="size" type="i">
+ <default>24</default>
+ <summary>Panel size</summary>
+ <description>The height (width for a vertical panel) of the panel. The panel will determine at runtime a minimum size based on the font size and other indicators. The maximum size is fixed at one quarter of the screen height (or width).</description>
+ </key>
+ <key name="x" type="i">
+ <default>0</default>
+ <summary>X co-ordinate of panel</summary>
+ <description>The location of the panel along the x-axis. This key is only relevant in un-expanded mode. In expanded mode this key is ignored and the panel is placed at the screen edge specified by the orientation key.</description>
+ </key>
+ <key name="y" type="i">
+ <default>0</default>
+ <summary>Y co-ordinate of panel</summary>
+ <description>The location of the panel along the y-axis. This key is only relevant in un-expanded mode. In expanded mode this key is ignored and the panel is placed at the screen edge specified by the orientation key.</description>
+ </key>
+ <key name="x-right" type="i">
+ <default>-1</default>
+ <summary>X co-ordinate of panel, starting from the right of the screen</summary>
+ <description>The location of the panel along the x-axis, starting from the right of the screen. If set to -1, the value is ignored and the value of the x key is used. If the value is greater than 0, then the value of the x key is ignored. This key is only relevant in un-expanded mode. In expanded mode this key is ignored and the panel is placed at the screen edge specified by the orientation key.</description>
+ </key>
+ <key name="y-bottom" type="i">
+ <default>-1</default>
+ <summary>Y co-ordinate of panel, starting from the bottom of the screen</summary>
+ <description>The location of the panel along the y-axis, starting from the bottom of the screen. If set to -1, the value is ignored and the value of the y key is used. If the value is greater than 0, then the value of the y key is ignored. This key is only relevant in un-expanded mode. In expanded mode this key is ignored and the panel is placed at the screen edge specified by the orientation key.</description>
+ </key>
+ <key name="x-centered" type="b">
+ <default>false</default>
+ <summary>Center panel on x-axis</summary>
+ <description>If true, the x and x_right keys are ignored and the panel is placed at the center of the x-axis of the screen. If the panel is resized it will remain at that position - i.e. the panel will grow on both sides. If false, the x and x_right keys specify the location of the panel.</description>
+ </key>
+ <key name="y-centered" type="b">
+ <default>false</default>
+ <summary>Center panel on y-axis</summary>
+ <description>If true, the y and y_bottom keys are ignored and the panel is placed at the center of the y-axis of the screen. If the panel is resized it will remain at that position - i.e. the panel will grow on both sides. If false, the y and y_bottom keys specify the location of the panel.</description>
+ </key>
+ <key name="auto-hide" type="b">
+ <default>false</default>
+ <summary>Automatically hide panel into corner</summary>
+ <description>If true, the panel is automatically hidden into a corner of the screen when the pointer leaves the panel area. Moving the pointer to that corner again will cause the panel to re-appear.</description>
+ </key>
+ <key name="enable-animations" type="b">
+ <default>true</default>
+ <summary>Enable animations</summary>
+ <description>If true, hiding and un-hiding of this panel will be animated rather than happening instantly.</description>
+ </key>
+ <key name="enable-buttons" type="b">
+ <default>false</default>
+ <summary>Enable hide buttons</summary>
+ <description>If true, buttons will be placed on each side of the panel which may be used to move the panel to edge of the screen, leaving only a button showing.</description>
+ </key>
+ <key name="enable-arrows" type="b">
+ <default>true</default>
+ <summary>Enable arrows on hide buttons</summary>
+ <description>If true, arrows will be placed on the hide buttons. This key is only relevant if the enable_buttons key is true.</description>
+ </key>
+ <key name="hide-delay" type="i">
+ <default>300</default>
+ <summary>Panel autohide delay</summary>
+ <description>Specifies the number of milliseconds delay after the pointer leaves the panel area before the panel is automatically hidden. This key is only relevant if the auto_hide key is true.</description>
+ </key>
+ <key name="unhide-delay" type="i">
+ <default>100</default>
+ <summary>Panel autounhide delay</summary>
+ <description>Specifies the number of milliseconds delay after the pointer enters the panel area before the panel is automatically re-shown. This key is only relevant if the auto_hide key is true.</description>
+ </key>
+ <key name="auto-hide-size" type="i">
+ <default>1</default>
+ <summary>Visible pixels when hidden</summary>
+ <description>Specifies the number of pixels visible when the panel is automatically hidden into a corner. This key is only relevant if the auto_hide key is true.</description>
+ </key>
+ <key name="animation-speed" type="s">
+ <default>'fast'</default>
+ <summary>Animation speed</summary>
+ <description>The speed in which panel animations should occur. Possible values are "slow", "medium" and "fast". This key is only relevant if the enable_animations key is true.</description>
+ </key>
+ <child name="background" schema="org.gnome.gnome-panel.toplevel.background"/>
+ </schema>
+ <schema id="org.gnome.gnome-panel.toplevel.background">
+ <key name="type" type="s">
+ <default>'gtk'</default>
+ <summary>Background type</summary>
+ <description>Which type of background should be used for this panel. Possible values are "gtk" - the default GTK+ widget background will be used, "color" - the color key will be used as background color or "image" - the image specified by the image key will be used as background.</description>
+ </key>
+ <key name="color" type="s">
+ <default>'#ffffff'</default>
+ <summary>Background color</summary>
+ <description>Specifies the background color for the panel in #RGB format.</description>
+ </key>
+ <key name="opacity" type="i">
+ <default>6000</default>
+ <summary>Background color opacity</summary>
+ <description>Specifies the opacity of the background color format. If the color is not completely opaque (a value of less than 65535), the color will be composited onto the desktop background image.</description>
+ </key>
+ <key name="image" type="s">
+ <default>''</default>
+ <summary>Background image</summary>
+ <description>Specifies the file to be used for the background image. If the image contains an alpha channel it will be composited onto the desktop background image.</description>
+ </key>
+ <key name="fit" type="b">
+ <default>false</default>
+ <summary>Fit image to panel</summary>
+ <description>If true, the image will be scaled (retaining the aspect ratio of the image) to the panel height (if horizontal).</description>
+ </key>
+ <key name="stretch" type="b">
+ <default>false</default>
+ <summary>Stretch image to panel</summary>
+ <description>If true, the image will be scaled to the panel dimensions. The aspect ratio of the image will not be maintained.</description>
+ </key>
+ <key name="rotate" type="b">
+ <default>false</default>
+ <summary>Rotate image on vertical panels</summary>
+ <description>If true, the background image will be rotated when the panel is oriented vertically.</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/panel-default-layout.layout b/data/panel-default-layout.layout
new file mode 100644
index 0000000..db3d28f
--- /dev/null
+++ b/data/panel-default-layout.layout
@@ -0,0 +1,38 @@
+[Toplevel top-panel]
+expand=true
+orientation=top
+size=24
+
+[Toplevel bottom-panel]
+expand=true
+orientation=bottom
+size=24
+y-bottom=0
+
+[Object menu-bar]
+object-iid=PanelInternalFactory::MenuBar
+toplevel-id=top-panel
+position=0
+
+[Object clock]
+object-iid=ClockAppletFactory::ClockApplet
+toplevel-id=top-panel
+position=0
+pack-end=true
+
+[Object notification-area]
+object-iid=NotificationAreaAppletFactory::NotificationArea
+toplevel-id=top-panel
+position=1
+pack-end=true
+
+[Object window-list]
+object-iid=WnckletFactory::WindowListApplet
+toplevel-id=bottom-panel
+position=0
+
+[Object workspace-switcher]
+object-iid=WnckletFactory::WorkspaceSwitcherApplet
+toplevel-id=bottom-panel
+position=0
+pack-end=true
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]