diff -ur gnome-panel-2.27.4.orig/gnome-panel/panel-profile.c gnome-panel-2.27.4/gnome-panel/panel-profile.c
--- gnome-panel-2.27.4.orig/gnome-panel/panel-profile.c 2009-04-19 19:45:09.000000000 +0200
+++ gnome-panel-2.27.4/gnome-panel/panel-profile.c 2009-08-13 15:04:48.739476355 +0200
@@ -638,6 +638,7 @@
TOPLEVEL_GET_SET_FUNCS ("size", toplevel, int, size, int)
TOPLEVEL_GET_SET_FUNCS ("expand", toplevel, bool, expand, gboolean)
+TOPLEVEL_GET_SET_FUNCS ("expand_handles", toplevel, bool, expand_handles, gboolean)
TOPLEVEL_GET_SET_FUNCS ("auto_hide", toplevel, bool, auto_hide, gboolean)
TOPLEVEL_GET_SET_FUNCS ("enable_buttons", toplevel, bool, enable_buttons, gboolean)
TOPLEVEL_GET_SET_FUNCS ("enable_arrows", toplevel, bool, enable_arrows, gboolean)
@@ -1185,6 +1186,7 @@
else UPDATE_INT ("monitor", monitor)
else UPDATE_STRING ("name", name)
else UPDATE_BOOL ("expand", expand)
+ else UPDATE_BOOL ("expand_handles", expand_handles)
else UPDATE_STRING ("orientation", orientation)
else UPDATE_INT ("size", size)
else UPDATE_POS ("x", x, x_right)
@@ -1706,6 +1708,7 @@
GET_STRING ("name", name);
GET_INT ("monitor", monitor);
GET_BOOL ("expand", expand);
+ GET_BOOL ("expand_handles", expand_handles);
GET_STRING ("orientation", orientation);
GET_INT ("size", size);
GET_BOOL ("auto_hide", auto_hide);
Only in gnome-panel-2.27.4/gnome-panel: panel-profile.c~
diff -ur gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.c gnome-panel-2.27.4/gnome-panel/panel-toplevel.c
--- gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.c 2009-07-01 15:06:23.000000000 +0200
+++ gnome-panel-2.27.4/gnome-panel/panel-toplevel.c 2009-08-13 15:03:40.693968520 +0200
@@ -77,6 +77,7 @@
struct _PanelToplevelPrivate {
gboolean expand;
+ gboolean expand_handles;
PanelOrientation orientation;
int size;
@@ -209,6 +210,7 @@
PROP_0,
PROP_NAME,
PROP_EXPAND,
+ PROP_EXPAND_HANDLES,
PROP_ORIENTATION,
PROP_SIZE,
PROP_X,
@@ -239,6 +241,12 @@
return toplevel_list;
}
+/* instead of using hardcoded HANDLE_SIZE, use 0 or HANDLE_SIZE depending on gconf value of expand_handles */
+static inline int panel_toplevel_get_handle_size(PanelToplevel *toplevel)
+{
+ return (toplevel->priv->expand_handles) ? HANDLE_SIZE : 0;
+}
+
/* Is this the last un-attached toplevel? */
gboolean
panel_toplevel_is_last_unattached (PanelToplevel *toplevel)
@@ -2430,7 +2438,7 @@
if (!toplevel->priv->expand &&
!toplevel->priv->buttons_enabled && !toplevel->priv->attached)
- non_panel_widget_size = 2 * HANDLE_SIZE;
+ non_panel_widget_size = 2 * panel_toplevel_get_handle_size(toplevel);
else
non_panel_widget_size = 0;
@@ -3082,15 +3090,15 @@
challoc = *allocation;
else {
if (toplevel->priv->orientation & PANEL_HORIZONTAL_MASK) {
- challoc.x = HANDLE_SIZE;
+ challoc.x = panel_toplevel_get_handle_size(toplevel);
challoc.y = 0;
- challoc.width = allocation->width - 2 * HANDLE_SIZE;
+ challoc.width = allocation->width - 2 * panel_toplevel_get_handle_size(toplevel);
challoc.height = allocation->height;
} else {
challoc.x = 0;
- challoc.y = HANDLE_SIZE;
+ challoc.y = panel_toplevel_get_handle_size(toplevel);
challoc.width = allocation->width;
- challoc.height = allocation->height - 2 * HANDLE_SIZE;
+ challoc.height = allocation->height - 2 * panel_toplevel_get_handle_size(toplevel);
}
}
@@ -3152,7 +3160,7 @@
x = widget->allocation.x;
y = widget->allocation.y;
- width = HANDLE_SIZE;
+ width = panel_toplevel_get_handle_size(toplevel);
height = widget->allocation.height;
xthickness = widget->style->xthickness;
@@ -3174,7 +3182,7 @@
x, y, width, height,
GTK_ORIENTATION_VERTICAL);
- x = widget->allocation.width - HANDLE_SIZE;
+ x = widget->allocation.width - panel_toplevel_get_handle_size(toplevel);
if (edges & PANEL_EDGE_RIGHT)
x -= xthickness;
@@ -3191,7 +3199,7 @@
x = widget->allocation.x;
y = widget->allocation.y;
width = widget->allocation.width;
- height = HANDLE_SIZE;
+ height = panel_toplevel_get_handle_size(toplevel);
xthickness = widget->style->xthickness;
ythickness = widget->style->ythickness;
@@ -3212,7 +3220,7 @@
x, y, width, height,
GTK_ORIENTATION_HORIZONTAL);
- y = widget->allocation.height - HANDLE_SIZE;
+ y = widget->allocation.height - panel_toplevel_get_handle_size(toplevel);
if (edges & PANEL_EDGE_BOTTOM)
y -= ythickness;
@@ -3848,6 +3856,9 @@
case PROP_EXPAND:
panel_toplevel_set_expand (toplevel, g_value_get_boolean (value));
break;
+ case PROP_EXPAND_HANDLES:
+ panel_toplevel_set_expand_handles (toplevel, g_value_get_boolean (value));
+ break;
case PROP_ORIENTATION:
panel_toplevel_set_orientation (toplevel, g_value_get_enum (value));
break;
@@ -3942,6 +3953,9 @@
case PROP_EXPAND:
g_value_set_boolean (value, toplevel->priv->expand);
break;
+ case PROP_EXPAND_HANDLES:
+ g_value_set_boolean (value, toplevel->priv->expand_handles);
+ break;
case PROP_ORIENTATION:
g_value_set_enum (value, toplevel->priv->orientation);
break;
@@ -4472,6 +4486,7 @@
toplevel->priv = PANEL_TOPLEVEL_GET_PRIVATE (toplevel);
toplevel->priv->expand = TRUE;
+ toplevel->priv->expand_handles = TRUE;
toplevel->priv->orientation = PANEL_ORIENTATION_BOTTOM;
toplevel->priv->size = DEFAULT_SIZE;
toplevel->priv->x = 0;
@@ -4683,6 +4698,29 @@
return toplevel->priv->expand;
}
+void
+panel_toplevel_set_expand_handles (PanelToplevel *toplevel,
+ gboolean expand_handles)
+{
+ g_return_if_fail (PANEL_IS_TOPLEVEL (toplevel));
+
+ expand_handles = expand_handles != FALSE;
+
+ if (toplevel->priv->expand_handles == expand_handles)
+ return;
+
+ toplevel->priv->expand_handles = expand_handles;
+
+}
+
+gboolean
+panel_toplevel_get_expand_handles (PanelToplevel *toplevel)
+{
+ g_return_val_if_fail (PANEL_IS_TOPLEVEL (toplevel), TRUE);
+
+ return toplevel->priv->expand_handles;
+}
+
gboolean
panel_toplevel_get_is_floating (PanelToplevel *toplevel)
{
diff -ur gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.h gnome-panel-2.27.4/gnome-panel/panel-toplevel.h
--- gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.h 2009-04-19 19:45:09.000000000 +0200
+++ gnome-panel-2.27.4/gnome-panel/panel-toplevel.h 2009-08-13 15:03:40.693968520 +0200
@@ -83,6 +83,9 @@
void panel_toplevel_set_expand (PanelToplevel *toplevel,
gboolean expand);
gboolean panel_toplevel_get_expand (PanelToplevel *toplevel);
+void panel_toplevel_set_expand_handles (PanelToplevel *toplevel,
+ gboolean expand_handles);
+gboolean panel_toplevel_get_expand_handles (PanelToplevel *toplevel);
void panel_toplevel_set_orientation (PanelToplevel *toplevel,
PanelOrientation orientation);
PanelOrientation panel_toplevel_get_orientation (PanelToplevel *toplevel);
diff -ur gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.schemas.in gnome-panel-2.27.4/gnome-panel/panel-toplevel.schemas.in
--- gnome-panel-2.27.4.orig/gnome-panel/panel-toplevel.schemas.in 2009-07-01 15:06:23.000000000 +0200
+++ gnome-panel-2.27.4/gnome-panel/panel-toplevel.schemas.in 2009-08-13 15:03:40.693968520 +0200
@@ -64,6 +64,21 @@
+
+
+ /schemas/apps/panel/toplevels/expand_handles
+ panel
+ bool
+ true
+
+ Show grab handles when panel is not expanded
+
+ If true, the panel will show two handles when not expanded,
+ to make accessing the panel context menu easier. If false,
+ these will not be shown.
+
+
+
/schemas/apps/panel/toplevels/orientation