[gtk+/wip/gmenu] GtkSettings: add shell-shows-menubar property
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/gmenu] GtkSettings: add shell-shows-menubar property
- Date: Fri, 2 Dec 2011 01:40:16 +0000 (UTC)
commit 658fa231b9f4ade88b31e8265f918c15c7ff691e
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Dec 1 19:57:32 2011 -0500
GtkSettings: add shell-shows-menubar property
Unity will set this to tell us that it is going to handle displaying the
menubar.
gdk/x11/gdksettings.c | 6 ++++--
gtk/gtksettings.c | 12 +++++++++++-
2 files changed, 15 insertions(+), 3 deletions(-)
---
diff --git a/gdk/x11/gdksettings.c b/gdk/x11/gdksettings.c
index 2398045..35bc452 100644
--- a/gdk/x11/gdksettings.c
+++ b/gdk/x11/gdksettings.c
@@ -82,7 +82,8 @@ static const char gdk_settings_names[] =
"Gtk/CursorBlinkTimeout\0" "gtk-cursor-blink-timeout\0"
"Gtk/AutoMnemonics\0" "gtk-auto-mnemonics\0"
"Gtk/VisibleFocus\0" "gtk-visible-focus\0"
- "Gtk/ShellShowsAppMenu\0" "gtk-shell-shows-app-menu\0";
+ "Gtk/ShellShowsAppMenu\0" "gtk-shell-shows-app-menu\0"
+ "Gtk/ShellShowsMenubar\0" "gtk-shell-shows-menubar\0";
static const struct
@@ -137,5 +138,6 @@ static const struct
{ 1682, 1705 },
{ 1730, 1748 },
{ 1767, 1784 },
- { 1802, 1824 }
+ { 1802, 1824 },
+ { 1849, 1871 }
};
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index a516748..51bb23c 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -204,7 +204,8 @@ enum {
PROP_COLOR_PALETTE,
PROP_IM_PREEDIT_STYLE,
PROP_IM_STATUS_STYLE,
- PROP_SHELL_SHOWS_APP_MENU
+ PROP_SHELL_SHOWS_APP_MENU,
+ PROP_SHELL_SHOWS_MENUBAR
};
/* --- prototypes --- */
@@ -1330,6 +1331,15 @@ gtk_settings_class_init (GtkSettingsClass *class)
NULL);
g_assert (result == PROP_SHELL_SHOWS_APP_MENU);
+ result = settings_install_property_parser (class,
+ g_param_spec_boolean ("gtk-shell-shows-menubar",
+ P_("Desktop shell shows the menubar"),
+ P_("Set to TRUE if the desktop environment "
+ "is displaying the menubar, FALSE if "
+ "the app should display it itself."),
+ FALSE, GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_SHELL_SHOWS_MENUBAR);
g_type_class_add_private (class, sizeof (GtkSettingsPrivate));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]