summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-05-13 19:09:31 +0200
committerStefano Karapetsas <[email protected]>2012-05-13 19:09:31 +0200
commit656540dac716816bbc906b373d6ff6e488e536bd (patch)
treea18a807d6d41283dfc82d3513e8518624335f3fa
parent69769af51fe3f072bfd2612a27afc095eb67384f (diff)
downloadmate-panel-656540dac716816bbc906b373d6ff6e488e536bd.tar.bz2
mate-panel-656540dac716816bbc906b373d6ff6e488e536bd.tar.xz
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
-rw-r--r--mate-panel/panel-menu-button.c8
-rw-r--r--mate-panel/panel-object.schemas.in14
2 files changed, 21 insertions, 1 deletions
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 @@
</long>
</locale>
</schema>
+
+ <schema>
+ <key>/schemas/apps/panel/objects/has_arrow</key>
+ <owner>panel</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Draw arrow in menu button</short>
+ <long>
+ If true, an arrow is drawn over the menu button icon. If
+ false, menu button has only the icon.
+ </long>
+ </locale>
+ </schema>
<!-- Applies to launchers -->