[gtk+] GtkButton: Deprecated setters and getters as well
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkButton: Deprecated setters and getters as well
- Date: Wed, 14 May 2014 02:20:22 +0000 (UTC)
commit f6af96723c82e6a0a956f8e0e7441edb8256c1c2
Author: Matthias Clasen <mclasen redhat com>
Date: Tue May 13 22:19:30 2014 -0400
GtkButton: Deprecated setters and getters as well
gtk_button_set/get_alignment should be deprecated together
with the properties they are setters/getters for.
gtk/gtkbutton.c | 10 ++++++++++
gtk/gtkbutton.h | 4 ++--
gtk/gtkcheckbutton.c | 2 ++
3 files changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 00d01d2..fe15499 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 70ce41e..2617722 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 622ec5f..0c6ddbd 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]