[gtk+/wip/baedert/box: 2/14] gtkdialog: Remove style properties



commit 4bab9afe3df409d94c32e8bd9492182534435ca3
Author: Timm Bäder <mail baedert org>
Date:   Tue Oct 11 13:16:18 2016 +0200

    gtkdialog: Remove style properties

 gtk/gtkdialog.c |   62 -------------------------------------------------------
 1 files changed, 0 insertions(+), 62 deletions(-)
---
diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c
index 0b6538b..01ab7e4 100644
--- a/gtk/gtkdialog.c
+++ b/gtk/gtkdialog.c
@@ -199,7 +199,6 @@ static void      gtk_dialog_add_buttons_valist   (GtkDialog    *dialog,
 static gboolean  gtk_dialog_delete_event_handler (GtkWidget    *widget,
                                                   GdkEventAny  *event,
                                                   gpointer      user_data);
-static void      gtk_dialog_style_updated        (GtkWidget    *widget);
 static void      gtk_dialog_map                  (GtkWidget    *widget);
 
 static void      gtk_dialog_close                (GtkDialog    *dialog);
@@ -530,7 +529,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
   gobject_class->finalize = gtk_dialog_finalize;
 
   widget_class->map = gtk_dialog_map;
-  widget_class->style_updated = gtk_dialog_style_updated;
 
   gtk_widget_class_set_accessible_role (widget_class, ATK_ROLE_DIALOG);
 
@@ -576,33 +574,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
                  G_TYPE_NONE, 0);
 
   /**
-   * GtkDialog:content-area-spacing:
-   *
-   * The default spacing used between elements of the
-   * content area of the dialog, as returned by
-   * gtk_dialog_get_content_area(), unless gtk_box_set_spacing()
-   * was called on that widget directly.
-   *
-   * Since: 2.16
-   */
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("content-area-spacing",
-                                                             P_("Content area spacing"),
-                                                             P_("Spacing between elements of the main dialog 
area"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             0,
-                                                             GTK_PARAM_READABLE));
-  gtk_widget_class_install_style_property (widget_class,
-                                           g_param_spec_int ("button-spacing",
-                                                             P_("Button spacing"),
-                                                             P_("Spacing between buttons"),
-                                                             0,
-                                                             G_MAXINT,
-                                                             6,
-                                                             GTK_PARAM_READABLE));
-
-  /**
    * GtkDialog:use-header-bar:
    *
    * %TRUE if the dialog uses a #GtkHeaderBar for action buttons
@@ -637,29 +608,6 @@ gtk_dialog_class_init (GtkDialogClass *class)
 }
 
 static void
-update_spacings (GtkDialog *dialog)
-{
-  GtkDialogPrivate *priv = dialog->priv;
-  gint content_area_spacing;
-  gint button_spacing;
-
-  gtk_widget_style_get (GTK_WIDGET (dialog),
-                        "content-area-spacing", &content_area_spacing,
-                        "button-spacing", &button_spacing,
-                        NULL);
-
-  if (!_gtk_box_get_spacing_set (GTK_BOX (priv->vbox)))
-    {
-      gtk_box_set_spacing (GTK_BOX (priv->vbox), content_area_spacing);
-      _gtk_box_set_spacing_set (GTK_BOX (priv->vbox), FALSE);
-    }
-
-  /* don't set spacing when buttons are linked */
-  if (gtk_button_box_get_layout (GTK_BUTTON_BOX (priv->action_area)) != GTK_BUTTONBOX_EXPAND)
-    gtk_box_set_spacing (GTK_BOX (priv->action_area), button_spacing);
-}
-
-static void
 gtk_dialog_init (GtkDialog *dialog)
 {
   dialog->priv = gtk_dialog_get_instance_private (dialog);
@@ -668,8 +616,6 @@ gtk_dialog_init (GtkDialog *dialog)
   dialog->priv->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
 
   gtk_widget_init_template (GTK_WIDGET (dialog));
-
-  update_spacings (dialog);
 }
 
 static GtkBuildableIface *parent_buildable_iface;
@@ -778,14 +724,6 @@ gtk_dialog_map (GtkWidget *widget)
 }
 
 static void
-gtk_dialog_style_updated (GtkWidget *widget)
-{
-  GTK_WIDGET_CLASS (gtk_dialog_parent_class)->style_updated (widget);
-
-  update_spacings (GTK_DIALOG (widget));
-}
-
-static void
 gtk_dialog_close (GtkDialog *dialog)
 {
   gtk_window_close (GTK_WINDOW (dialog));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]