[gtk+/wip/otte/gtk4: 95/118] widget: Remove deprecated margin-left/right properties
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/gtk4: 95/118] widget: Remove deprecated margin-left/right properties
- Date: Fri, 7 Oct 2016 00:07:41 +0000 (UTC)
commit 7ec01085eb30ff410604ef45415ab9976e1132e7
Author: Timm Bäder <mail baedert org>
Date: Tue Oct 4 18:34:05 2016 +0200
widget: Remove deprecated margin-left/right properties
docs/reference/gtk/gtk3-sections.txt | 4 -
gtk/gtkwidget.c | 170 ------------------------
gtk/gtkwidget.h | 10 --
testsuite/reftests/statusbar-remove-all.ref.ui | 2 -
testsuite/reftests/statusbar-remove-all.ui | 2 -
5 files changed, 0 insertions(+), 188 deletions(-)
---
diff --git a/docs/reference/gtk/gtk3-sections.txt b/docs/reference/gtk/gtk3-sections.txt
index 9235e93..bdb57f6 100644
--- a/docs/reference/gtk/gtk3-sections.txt
+++ b/docs/reference/gtk/gtk3-sections.txt
@@ -5284,10 +5284,6 @@ gtk_widget_set_halign
gtk_widget_get_valign
gtk_widget_get_valign_with_baseline
gtk_widget_set_valign
-gtk_widget_get_margin_left
-gtk_widget_set_margin_left
-gtk_widget_get_margin_right
-gtk_widget_set_margin_right
gtk_widget_get_margin_start
gtk_widget_set_margin_start
gtk_widget_get_margin_end
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index a47b722..605ae5b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -588,8 +588,6 @@ enum {
PROP_DOUBLE_BUFFERED,
PROP_HALIGN,
PROP_VALIGN,
- PROP_MARGIN_LEFT,
- PROP_MARGIN_RIGHT,
PROP_MARGIN_START,
PROP_MARGIN_END,
PROP_MARGIN_TOP,
@@ -1357,48 +1355,6 @@ gtk_widget_class_init (GtkWidgetClass *klass)
GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY);
/**
- * GtkWidget:margin-left:
- *
- * Margin on left side of widget.
- *
- * This property adds margin outside of the widget's normal size
- * request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
- *
- * Deprecated: 3.12: Use #GtkWidget:margin-start instead.
- *
- * Since: 3.0
- */
- widget_props[PROP_MARGIN_LEFT] =
- g_param_spec_int ("margin-left",
- P_("Margin on Left"),
- P_("Pixels of extra space on the left side"),
- 0, G_MAXINT16,
- 0,
- GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
-
- /**
- * GtkWidget:margin-right:
- *
- * Margin on right side of widget.
- *
- * This property adds margin outside of the widget's normal size
- * request, the margin will be added in addition to the size from
- * gtk_widget_set_size_request() for example.
- *
- * Deprecated: 3.12: Use #GtkWidget:margin-end instead.
- *
- * Since: 3.0
- */
- widget_props[PROP_MARGIN_RIGHT] =
- g_param_spec_int ("margin-right",
- P_("Margin on Right"),
- P_("Pixels of extra space on the right side"),
- 0, G_MAXINT16,
- 0,
- GTK_PARAM_READWRITE|G_PARAM_EXPLICIT_NOTIFY|G_PARAM_DEPRECATED);
-
- /**
* GtkWidget:margin-start:
*
* Margin on start of widget, horizontally. This property supports
@@ -3548,16 +3504,6 @@ gtk_widget_set_property (GObject *object,
case PROP_VALIGN:
gtk_widget_set_valign (widget, g_value_get_enum (value));
break;
- case PROP_MARGIN_LEFT:
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_widget_set_margin_left (widget, g_value_get_int (value));
- G_GNUC_END_IGNORE_DEPRECATIONS;
- break;
- case PROP_MARGIN_RIGHT:
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_widget_set_margin_right (widget, g_value_get_int (value));
- G_GNUC_END_IGNORE_DEPRECATIONS;
- break;
case PROP_MARGIN_START:
gtk_widget_set_margin_start (widget, g_value_get_int (value));
break;
@@ -3712,16 +3658,6 @@ gtk_widget_get_property (GObject *object,
case PROP_VALIGN:
g_value_set_enum (value, gtk_widget_get_valign_with_baseline (widget));
break;
- case PROP_MARGIN_LEFT:
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- g_value_set_int (value, gtk_widget_get_margin_left (widget));
- G_GNUC_END_IGNORE_DEPRECATIONS;
- break;
- case PROP_MARGIN_RIGHT:
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- g_value_set_int (value, gtk_widget_get_margin_right (widget));
- G_GNUC_END_IGNORE_DEPRECATIONS;
- break;
case PROP_MARGIN_START:
g_value_set_int (value, gtk_widget_get_margin_start (widget));
break;
@@ -13947,110 +13883,6 @@ gtk_widget_set_valign (GtkWidget *widget,
}
/**
- * gtk_widget_get_margin_left:
- * @widget: a #GtkWidget
- *
- * Gets the value of the #GtkWidget:margin-left property.
- *
- * Returns: The left margin of @widget
- *
- * Deprecated: 3.12: Use gtk_widget_get_margin_start() instead.
- *
- * Since: 3.0
- */
-gint
-gtk_widget_get_margin_left (GtkWidget *widget)
-{
- g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
-
- return widget->priv->margin.left;
-}
-
-/**
- * gtk_widget_set_margin_left:
- * @widget: a #GtkWidget
- * @margin: the left margin
- *
- * Sets the left margin of @widget.
- * See the #GtkWidget:margin-left property.
- *
- * Deprecated: 3.12: Use gtk_widget_set_margin_start() instead.
- *
- * Since: 3.0
- */
-void
-gtk_widget_set_margin_left (GtkWidget *widget,
- gint margin)
-{
- gboolean rtl;
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (margin <= G_MAXINT16);
-
- rtl = _gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-
- if (widget->priv->margin.left == margin)
- return;
-
- widget->priv->margin.left = margin;
- gtk_widget_queue_resize (widget);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_MARGIN_LEFT]);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[rtl ? PROP_MARGIN_END : PROP_MARGIN_START]);
-}
-
-/**
- * gtk_widget_get_margin_right:
- * @widget: a #GtkWidget
- *
- * Gets the value of the #GtkWidget:margin-right property.
- *
- * Returns: The right margin of @widget
- *
- * Deprecated: 3.12: Use gtk_widget_get_margin_end() instead.
- *
- * Since: 3.0
- */
-gint
-gtk_widget_get_margin_right (GtkWidget *widget)
-{
- g_return_val_if_fail (GTK_IS_WIDGET (widget), 0);
-
- return widget->priv->margin.right;
-}
-
-/**
- * gtk_widget_set_margin_right:
- * @widget: a #GtkWidget
- * @margin: the right margin
- *
- * Sets the right margin of @widget.
- * See the #GtkWidget:margin-right property.
- *
- * Deprecated: 3.12: Use gtk_widget_set_margin_end() instead.
- *
- * Since: 3.0
- */
-void
-gtk_widget_set_margin_right (GtkWidget *widget,
- gint margin)
-{
- gboolean rtl;
-
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (margin <= G_MAXINT16);
-
- rtl = _gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL;
-
- if (widget->priv->margin.right == margin)
- return;
-
- widget->priv->margin.right = margin;
- gtk_widget_queue_resize (widget);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_MARGIN_RIGHT]);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[rtl ? PROP_MARGIN_START : PROP_MARGIN_END]);
-}
-
-/**
* gtk_widget_get_margin_start:
* @widget: a #GtkWidget
*
@@ -14104,7 +13936,6 @@ gtk_widget_set_margin_start (GtkWidget *widget,
*start = margin;
gtk_widget_queue_resize (widget);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_MARGIN_START]);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[rtl ? PROP_MARGIN_RIGHT : PROP_MARGIN_LEFT]);
}
/**
@@ -14161,7 +13992,6 @@ gtk_widget_set_margin_end (GtkWidget *widget,
*end = margin;
gtk_widget_queue_resize (widget);
g_object_notify_by_pspec (G_OBJECT (widget), widget_props[PROP_MARGIN_END]);
- g_object_notify_by_pspec (G_OBJECT (widget), widget_props[rtl ? PROP_MARGIN_LEFT : PROP_MARGIN_RIGHT]);
}
/**
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 8e773f1..3fe00d9 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1046,16 +1046,6 @@ GtkAlign gtk_widget_get_valign_with_baseline (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
void gtk_widget_set_valign (GtkWidget *widget,
GtkAlign align);
-GDK_DEPRECATED_IN_3_12_FOR(gtk_widget_get_margin_start)
-gint gtk_widget_get_margin_left (GtkWidget *widget);
-GDK_DEPRECATED_IN_3_12_FOR(gtk_widget_set_margin_start)
-void gtk_widget_set_margin_left (GtkWidget *widget,
- gint margin);
-GDK_DEPRECATED_IN_3_12_FOR(gtk_widget_get_margin_end)
-gint gtk_widget_get_margin_right (GtkWidget *widget);
-GDK_DEPRECATED_IN_3_12_FOR(gtk_widget_set_margin_end)
-void gtk_widget_set_margin_right (GtkWidget *widget,
- gint margin);
GDK_AVAILABLE_IN_3_12
gint gtk_widget_get_margin_start (GtkWidget *widget);
GDK_AVAILABLE_IN_3_12
diff --git a/testsuite/reftests/statusbar-remove-all.ref.ui b/testsuite/reftests/statusbar-remove-all.ref.ui
index c42d2ff..391221d 100644
--- a/testsuite/reftests/statusbar-remove-all.ref.ui
+++ b/testsuite/reftests/statusbar-remove-all.ref.ui
@@ -9,8 +9,6 @@
<object class="GtkStatusbar" id="statusbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
<property name="margin_start">10</property>
<property name="margin_end">10</property>
<property name="margin_top">6</property>
diff --git a/testsuite/reftests/statusbar-remove-all.ui b/testsuite/reftests/statusbar-remove-all.ui
index 21a33d2..acb648c 100644
--- a/testsuite/reftests/statusbar-remove-all.ui
+++ b/testsuite/reftests/statusbar-remove-all.ui
@@ -9,8 +9,6 @@
<object class="GtkStatusbar" id="statusbar1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="margin_left">10</property>
- <property name="margin_right">10</property>
<property name="margin_start">10</property>
<property name="margin_end">10</property>
<property name="margin_top">6</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]