[gtk+/dialogs: 12/25] Add a setting for dialog headers
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/dialogs: 12/25] Add a setting for dialog headers
- Date: Wed, 15 Jan 2014 12:33:21 +0000 (UTC)
commit 8081a22dfea2ddbb1a310c309aa264a9a6d492f2
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 15 00:33:30 2014 -0500
Add a setting for dialog headers
This setting will let us keep traditional appearance
of dialogs on platforms where this is expected.
The new setting is called gtk-dialogs-use-header, backed
by the Gtk/DialogsUseHeader xsetting.
gdk/x11/gdksettings.c | 1 +
gtk/gtksettings.c | 10 ++++++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gdk/x11/gdksettings.c b/gdk/x11/gdksettings.c
index ac92cca..86ecc2d 100644
--- a/gdk/x11/gdksettings.c
+++ b/gdk/x11/gdksettings.c
@@ -59,6 +59,7 @@ static const struct {
{"Gtk/ShellShowsMenubar", "gtk-shell-shows-menubar"},
{"Gtk/ShellShowsDesktop", "gtk-shell-shows-desktop"},
{"Gtk/DecorationLayout", "gtk-decoration-layout"},
+ {"Gtk/DialogsUseHeader", "gtk-dialogs-use-header"},
{"Gtk/EnablePrimaryPaste", "gtk-enable-primary-paste"},
{"Gtk/RecentFilesMaxAge", "gtk-recent-files-max-age"},
{"Gtk/RecentFilesEnabled", "gtk-recent-files-enabled"},
diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c
index 3c74274..3b0ba1f 100644
--- a/gtk/gtksettings.c
+++ b/gtk/gtksettings.c
@@ -215,6 +215,7 @@ enum {
PROP_SHELL_SHOWS_MENUBAR,
PROP_SHELL_SHOWS_DESKTOP,
PROP_DECORATION_LAYOUT,
+ PROP_DIALOGS_USE_HEADER,
PROP_ENABLE_PRIMARY_PASTE,
PROP_RECENT_FILES_ENABLED
};
@@ -1575,6 +1576,15 @@ gtk_settings_class_init (GtkSettingsClass *class)
NULL);
g_assert (result == PROP_DECORATION_LAYOUT);
+ result = settings_install_property_parser (class,
+ g_param_spec_boolean ("gtk-dialogs-use-header",
+ P_("Dialogs use header bar"),
+ P_("Whether GTK+ dialogs should use a
header bar instead of an action area."),
+ FALSE,
+ GTK_PARAM_READWRITE),
+ NULL);
+ g_assert (result == PROP_DIALOGS_USE_HEADER);
+
/**
* GtkSettings:gtk-enable-primary-paste:
*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]