From 656540dac716816bbc906b373d6ff6e488e536bd Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Sun, 13 May 2012 19:09:31 +0200 Subject: add option to hide arrow in menu button https://github.com/mate-desktop/mate-panel/issues/24 https://bugzilla.gnome.org/show_bug.cgi?id=598196 patch by Damir Gilyazov --- mate-panel/panel-menu-button.c | 8 +++++++- mate-panel/panel-object.schemas.in | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/mate-panel/panel-menu-button.c b/mate-panel/panel-menu-button.c index 6a08291a..091c3993 100644 --- a/mate-panel/panel-menu-button.c +++ b/mate-panel/panel-menu-button.c @@ -636,6 +636,7 @@ panel_menu_button_load (const char *menu_path, gboolean locked, int position, gboolean exactpos, + gboolean has_arrow, const char *id) { PanelMenuButton *button; @@ -649,7 +650,7 @@ panel_menu_button_load (const char *menu_path, "tooltip", tooltip, "use-menu-path", use_menu_path, "use-custom-icon", use_custom_icon, - "has-arrow", TRUE, + "has-arrow", has_arrow, NULL); info = mate_panel_applet_register (GTK_WIDGET (button), NULL, NULL, @@ -878,6 +879,7 @@ panel_menu_button_load_from_mateconf (PanelWidget *panel, char *tooltip; gboolean use_menu_path; gboolean use_custom_icon; + gboolean has_arrow; client = panel_mateconf_get_client (); @@ -896,6 +898,9 @@ panel_menu_button_load_from_mateconf (PanelWidget *panel, key = panel_mateconf_full_key (PANEL_MATECONF_OBJECTS, id, "use_custom_icon"); use_custom_icon = mateconf_client_get_bool (client, key, NULL); + key = panel_mateconf_full_key (PANEL_MATECONF_OBJECTS, id, "has_arrow"); + has_arrow = mateconf_client_get_bool (client, key, NULL); + panel_menu_button_load (menu_path, use_menu_path, custom_icon, @@ -905,6 +910,7 @@ panel_menu_button_load_from_mateconf (PanelWidget *panel, locked, position, exactpos, + has_arrow, id); g_free (menu_path); diff --git a/mate-panel/panel-object.schemas.in b/mate-panel/panel-object.schemas.in index 7bc2d34f..cf73c6cc 100644 --- a/mate-panel/panel-object.schemas.in +++ b/mate-panel/panel-object.schemas.in @@ -209,6 +209,20 @@ + + + /schemas/apps/panel/objects/has_arrow + panel + bool + true + + Draw arrow in menu button + + If true, an arrow is drawn over the menu button icon. If + false, menu button has only the icon. + + + -- cgit v1.2.1