demo: Add test for hide-titlebar-when-maximized
Add an additional option to the appwindow demo to test the new gtk-hide-titlebar-when-maximized setting. https://bugzilla.gnome.org/show_bug.cgi?id=665616
This commit is contained in:
@ -29,6 +29,14 @@ activate_action (GtkAction *action)
|
|||||||
NULL);
|
NULL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (g_str_equal (name, "HideTitlebar"))
|
||||||
|
{
|
||||||
|
gboolean value = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
|
||||||
|
gtk_window_set_hide_titlebar_when_maximized (GTK_WINDOW (window), value);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||||
GTK_DIALOG_DESTROY_WITH_PARENT,
|
GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
GTK_MESSAGE_INFO,
|
GTK_MESSAGE_INFO,
|
||||||
@ -194,6 +202,11 @@ static GtkToggleActionEntry toggle_entries[] = {
|
|||||||
"Prefer Dark Theme", /* tooltip */
|
"Prefer Dark Theme", /* tooltip */
|
||||||
G_CALLBACK (activate_action),
|
G_CALLBACK (activate_action),
|
||||||
FALSE }, /* is_active */
|
FALSE }, /* is_active */
|
||||||
|
{ "HideTitlebar", NULL,
|
||||||
|
"_Hide Titlebar when maximized", NULL,
|
||||||
|
"Hide Titlebar when maximized",
|
||||||
|
G_CALLBACK (activate_action),
|
||||||
|
FALSE }
|
||||||
};
|
};
|
||||||
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
static guint n_toggle_entries = G_N_ELEMENTS (toggle_entries);
|
||||||
|
|
||||||
@ -248,6 +261,7 @@ static const gchar *ui_info =
|
|||||||
" </menu>"
|
" </menu>"
|
||||||
" <menu action='PreferencesMenu'>"
|
" <menu action='PreferencesMenu'>"
|
||||||
" <menuitem action='DarkTheme'/>"
|
" <menuitem action='DarkTheme'/>"
|
||||||
|
" <menuitem action='HideTitlebar'/>"
|
||||||
" <menu action='ColorMenu'>"
|
" <menu action='ColorMenu'>"
|
||||||
" <menuitem action='Red'/>"
|
" <menuitem action='Red'/>"
|
||||||
" <menuitem action='Green'/>"
|
" <menuitem action='Green'/>"
|
||||||
|
Reference in New Issue
Block a user