summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2014-03-24 08:35:27 -0400
committerMatthias Clasen <mclasen@redhat.com>2014-03-24 08:38:59 -0400
commit7da97a3642d728c05d9a290e7608d337aaa697eb (patch)
treeb147655178b486b3db6cd39dad4b1ea0f36e6d7c /gtk
parent329263f091e59426555b28a598185d3284514998 (diff)
downloadgtk+-7da97a3642d728c05d9a290e7608d337aaa697eb.tar.gz
Revert "Don't let themes override explicit border-width in dialogs"
This reverts commit 6e4567e73bceb66200b9605c51b4b5ad6e807483. For some reason, this causes buttons in message dialogs to have an unwanted border.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkcontainer.c29
-rw-r--r--gtk/gtkcontainerprivate.h3
-rw-r--r--gtk/gtkdialog.c24
3 files changed, 5 insertions, 51 deletions
diff --git a/gtk/gtkcontainer.c b/gtk/gtkcontainer.c
index bde7e62996..389e654546 100644
--- a/gtk/gtkcontainer.c
+++ b/gtk/gtkcontainer.c
@@ -247,7 +247,6 @@ struct _GtkContainerPrivate
guint resize_handler;
guint border_width : 16;
- guint border_width_set : 1;
guint has_focus_chain : 1;
guint reallocate_redraws : 1;
@@ -1382,7 +1381,6 @@ gtk_container_init (GtkContainer *container)
priv->border_width = 0;
priv->resize_mode = GTK_RESIZE_PARENT;
priv->reallocate_redraws = FALSE;
- priv->border_width_set = FALSE;
}
static void
@@ -1464,31 +1462,6 @@ gtk_container_get_property (GObject *object,
}
}
-gboolean
-_gtk_container_get_border_width_set (GtkContainer *container)
-{
- GtkContainerPrivate *priv;
-
- g_return_val_if_fail (GTK_IS_CONTAINER (container), FALSE);
-
- priv = container->priv;
-
- return priv->border_width_set;
-}
-
-void
-_gtk_container_set_border_width_set (GtkContainer *container,
- gboolean border_width_set)
-{
- GtkContainerPrivate *priv;
-
- g_return_if_fail (GTK_IS_CONTAINER (container));
-
- priv = container->priv;
-
- priv->border_width_set = border_width_set ? TRUE : FALSE;
-}
-
/**
* gtk_container_set_border_width:
* @container: a #GtkContainer
@@ -1519,8 +1492,6 @@ gtk_container_set_border_width (GtkContainer *container,
if (priv->border_width != border_width)
{
priv->border_width = border_width;
- _gtk_container_set_border_width_set (container, TRUE);
-
g_object_notify (G_OBJECT (container), "border-width");
if (gtk_widget_get_realized (GTK_WIDGET (container)))
diff --git a/gtk/gtkcontainerprivate.h b/gtk/gtkcontainerprivate.h
index 79ed0b8720..dd989d2dc7 100644
--- a/gtk/gtkcontainerprivate.h
+++ b/gtk/gtkcontainerprivate.h
@@ -41,9 +41,6 @@ gboolean _gtk_container_get_reallocate_redraws (GtkContainer *container);
void _gtk_container_stop_idle_sizer (GtkContainer *container);
void _gtk_container_maybe_start_idle_sizer (GtkContainer *container);
-gboolean _gtk_container_get_border_width_set (GtkContainer *container);
-void _gtk_container_set_border_width_set (GtkContainer *container,
- gboolean border_width_set);
G_END_DECLS
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index d95be7132d..d32a6570a7 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -35,7 +35,6 @@
#include "gtkmarshalers.h"
#include "gtkbox.h"
#include "gtkboxprivate.h"
-#include "gtkcontainerprivate.h"
#include "gtkmain.h"
#include "gtkintl.h"
#include "gtkbindings.h"
@@ -567,15 +566,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
_gtk_marshal_VOID__VOID,
G_TYPE_NONE, 0);
- /**
- * GtkDialog:content-area-border:
- *
- * The default border width used around the
- * 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",
P_("Content area border"),
@@ -666,11 +656,9 @@ update_spacings (GtkDialog *dialog)
"button-spacing", &button_spacing,
"action-area-border", &action_area_border,
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);
if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox)))
{
gtk_box_set_spacing (GTK_BOX (priv->vbox), content_area_spacing);
@@ -679,10 +667,8 @@ update_spacings (GtkDialog *dialog)
gtk_box_set_spacing (GTK_BOX (priv->action_area),
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);
}
static void