GtkSettings: add shell-shows-menubar property

Unity will set this to tell us that it is going to handle displaying the
menubar.
This commit is contained in:
Ryan Lortie 2011-12-01 19:57:32 -05:00
parent 45e9d09eab
commit ecfdb834c9
2 changed files with 15 additions and 3 deletions

View File

@ -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 }
};

View File

@ -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 --- */
@ -1334,6 +1335,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));
}