summaryrefslogtreecommitdiff
path: root/gtk/gtkdialog.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-04-10 13:49:07 -0700
committerMatthias Clasen <mclasen@redhat.com>2014-04-10 13:54:37 -0700
commit28327ee9aac888071e01decfea21d36184796281 (patch)
treed8309657d97ad5ac507636dd5d902c58367da0b1 /gtk/gtkdialog.c
parentb1012256f238f2958ce3cf0fec56dc2692b4ce56 (diff)
downloadgtk+-28327ee9aac888071e01decfea21d36184796281.tar.gz
GtkDialog: fix up handling of style properties
The use of border-width-set here was an attempt to differentiate between explicitly set (from code / ui files) border width from theme changes. But when we are calling gtk_window_set_border_width to apply the theme value, the -set property gets set, and all further theme changes are ignored. This has the effect of only letting the default value of these properties get applied. Fix this by unsetting border-width-set after applying theme values.
Diffstat (limited to 'gtk/gtkdialog.c')
-rw-r--r--gtk/gtkdialog.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index d95be7132d..eb342a55f7 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -574,7 +574,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
* content area of the dialog, as returned by
* gtk_dialog_get_content_area(), unless gtk_container_set_border_width()
* was called on that widget directly.
- *
*/
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("content-area-border",
@@ -611,6 +610,14 @@ gtk_dialog_class_init (GtkDialogClass *class)
6,
GTK_PARAM_READABLE));
+ /**
+ * GtkDialog:action-area-border:
+ *
+ * The default border width used around the
+ * action area of the dialog, as returned by
+ * gtk_dialog_get_action_area(), unless gtk_container_set_border_width()
+ * was called on that widget directly.
+ */
gtk_widget_class_install_style_property (widget_class,
g_param_spec_int ("action-area-border",
P_("Action area border"),
@@ -668,8 +675,11 @@ update_spacings (GtkDialog *dialog)
NULL);
if (!_gtk_container_get_border_width_set (GTK_CONTAINER (priv->vbox)))
- gtk_container_set_border_width (GTK_CONTAINER (priv->vbox),
- content_area_border);
+ {
+ gtk_container_set_border_width (GTK_CONTAINER (priv->vbox),
+ content_area_border);
+ _gtk_container_set_border_width_set (GTK_CONTAINER (priv->vbox), FALSE);
+ }
if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox)))
{
@@ -681,8 +691,11 @@ update_spacings (GtkDialog *dialog)
button_spacing);
if (!_gtk_container_get_border_width_set (GTK_CONTAINER (priv->action_area)))
- gtk_container_set_border_width (GTK_CONTAINER (priv->action_area),
- action_area_border);
+ {
+ gtk_container_set_border_width (GTK_CONTAINER (priv->action_area),
+ action_area_border);
+ _gtk_container_set_border_width_set (GTK_CONTAINER (priv->action_area), FALSE);
+ }
}
static void