summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtk/gtkbutton.c10
-rw-r--r--gtk/gtkbutton.h4
-rw-r--r--gtk/gtkcheckbutton.c2
3 files changed, 14 insertions, 2 deletions
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 00d01d2af7..fe15499288 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -802,10 +802,14 @@ gtk_button_set_property (GObject *object,
gtk_button_set_focus_on_click (button, g_value_get_boolean (value));
break;
case PROP_XALIGN:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_button_set_alignment (button, g_value_get_float (value), priv->yalign);
+G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_YALIGN:
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
gtk_button_set_alignment (button, priv->xalign, g_value_get_float (value));
+G_GNUC_END_IGNORE_DEPRECATIONS
break;
case PROP_IMAGE_POSITION:
gtk_button_set_image_position (button, g_value_get_enum (value));
@@ -2481,6 +2485,9 @@ gtk_button_get_focus_on_click (GtkButton *button)
* the child is a #GtkMisc or a #GtkAlignment.
*
* Since: 2.4
+ *
+ * Deprecated: 3.14: Access the child widget directly if you need to control
+ * its alignment.
*/
void
gtk_button_set_alignment (GtkButton *button,
@@ -2514,6 +2521,9 @@ gtk_button_set_alignment (GtkButton *button,
* Gets the alignment of the child in the button.
*
* Since: 2.4
+ *
+ * Deprecated: 3.14: Access the child widget directly if you need to control
+ * its alignment.
*/
void
gtk_button_get_alignment (GtkButton *button,
diff --git a/gtk/gtkbutton.h b/gtk/gtkbutton.h
index 70ce41e0be..261772245d 100644
--- a/gtk/gtkbutton.h
+++ b/gtk/gtkbutton.h
@@ -139,11 +139,11 @@ void gtk_button_set_focus_on_click (GtkButton *button,
gboolean focus_on_click);
GDK_AVAILABLE_IN_ALL
gboolean gtk_button_get_focus_on_click (GtkButton *button);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_button_set_alignment (GtkButton *button,
gfloat xalign,
gfloat yalign);
-GDK_AVAILABLE_IN_ALL
+GDK_DEPRECATED_IN_3_14
void gtk_button_get_alignment (GtkButton *button,
gfloat *xalign,
gfloat *yalign);
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index 622ec5f8b2..0c6ddbd109 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -130,10 +130,12 @@ draw_indicator_changed (GObject *object,
{
GtkButton *button = GTK_BUTTON (object);
+G_GNUC_BEGIN_IGNORE_DEPRECATIONS
if (gtk_toggle_button_get_mode (GTK_TOGGLE_BUTTON (button)))
gtk_button_set_alignment (button, 0.0, 0.5);
else
gtk_button_set_alignment (button, 0.5, 0.5);
+G_GNUC_END_IGNORE_DEPRECATIONS
}
static void