[gtk+] demo: Add test for hide-titlebar-when-maximized
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] demo: Add test for hide-titlebar-when-maximized
- Date: Thu, 15 Dec 2011 15:32:43 +0000 (UTC)
commit 3b0a9c59cc4a74b757ab536e77ab638ec055bbb8
Author: Florian MÃllner <fmuellner gnome org>
Date: Sat Dec 3 01:46:53 2011 +0100
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
demos/gtk-demo/appwindow.c | 14 ++++++++++++++
1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/demos/gtk-demo/appwindow.c b/demos/gtk-demo/appwindow.c
index 8f5dc3a..583a2bb 100644
--- a/demos/gtk-demo/appwindow.c
+++ b/demos/gtk-demo/appwindow.c
@@ -29,6 +29,14 @@ activate_action (GtkAction *action)
NULL);
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),
GTK_DIALOG_DESTROY_WITH_PARENT,
GTK_MESSAGE_INFO,
@@ -194,6 +202,11 @@ static GtkToggleActionEntry toggle_entries[] = {
"Prefer Dark Theme", /* tooltip */
G_CALLBACK (activate_action),
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);
@@ -248,6 +261,7 @@ static const gchar *ui_info =
" </menu>"
" <menu action='PreferencesMenu'>"
" <menuitem action='DarkTheme'/>"
+" <menuitem action='HideTitlebar'/>"
" <menu action='ColorMenu'>"
" <menuitem action='Red'/>"
" <menuitem action='Green'/>"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]