diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-05-23 20:09:08 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-05-23 20:31:25 -0400 |
commit | 04703689b8d220c6f470ee6b4a4083cf2c6d5b82 (patch) | |
tree | a47fb5cfa44aabe451b25218953bb8e2e8bc73ed | |
parent | 4928d5e4012ba6cfd2697d5bf084d2e8d93dfa32 (diff) | |
download | gtk+-04703689b8d220c6f470ee6b4a4083cf2c6d5b82.tar.gz |
Deprecate GtkAligment
This has been dangling ever since 3.0.
https://bugzilla.gnome.org/show_bug.cgi?id=645781
-rw-r--r-- | gtk/Makefile.am | 4 | ||||
-rw-r--r-- | gtk/a11y/gtkbuttonaccessible.c | 2 | ||||
-rw-r--r-- | gtk/a11y/gtkwidgetaccessible.c | 3 | ||||
-rw-r--r-- | gtk/deprecated/gtkalignment.c (renamed from gtk/gtkalignment.c) | 27 | ||||
-rw-r--r-- | gtk/deprecated/gtkalignment.h (renamed from gtk/gtkalignment.h) | 10 | ||||
-rw-r--r-- | gtk/gtk.h | 2 | ||||
-rw-r--r-- | gtk/gtkbutton.c | 2 | ||||
-rw-r--r-- | gtk/gtktoolitemgroup.c | 4 | ||||
-rw-r--r-- | gtk/gtktreeviewcolumn.c | 9 |
9 files changed, 42 insertions, 21 deletions
diff --git a/gtk/Makefile.am b/gtk/Makefile.am index 1111c52510..46d2ed0aa2 100644 --- a/gtk/Makefile.am +++ b/gtk/Makefile.am @@ -209,6 +209,7 @@ deprecated_h_sources = \ deprecated/gtkactivatable.h \ deprecated/gtkaction.h \ deprecated/gtkactiongroup.h \ + deprecated/gtkalignment.h \ deprecated/gtkarrow.h \ deprecated/gtkcolorsel.h \ deprecated/gtkcolorseldialog.h \ @@ -276,7 +277,6 @@ gtk_public_h_sources = \ gtkactionable.h \ gtkactionbar.h \ gtkadjustment.h \ - gtkalignment.h \ gtkappchooser.h \ gtkappchooserbutton.h \ gtkappchooserdialog.h \ @@ -726,6 +726,7 @@ deprecated_c_sources = \ deprecated/gtkactivatable.c \ deprecated/gtkaction.c \ deprecated/gtkactiongroup.c \ + deprecated/gtkalignment.c \ deprecated/gtkarrow.c \ deprecated/gtkcolorsel.c \ deprecated/gtkcolorseldialog.c \ @@ -781,7 +782,6 @@ gtk_base_c_sources = \ gtkactionbar.c \ gtkactionhelper.c \ gtkadjustment.c \ - gtkalignment.c \ gtkallocatedbitmask.c \ gtkappchooser.c \ gtkappchooserwidget.c \ diff --git a/gtk/a11y/gtkbuttonaccessible.c b/gtk/a11y/gtkbuttonaccessible.c index 57d4286710..7a3155536b 100644 --- a/gtk/a11y/gtkbuttonaccessible.c +++ b/gtk/a11y/gtkbuttonaccessible.c @@ -122,8 +122,10 @@ get_label_from_button (GtkWidget *button) GtkWidget *child; child = gtk_bin_get_child (GTK_BIN (button)); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (GTK_IS_ALIGNMENT (child)) child = gtk_bin_get_child (GTK_BIN (child)); +G_GNUC_END_IGNORE_DEPRECATIONS if (GTK_IS_CONTAINER (child)) child = find_label_child (GTK_CONTAINER (child)); diff --git a/gtk/a11y/gtkwidgetaccessible.c b/gtk/a11y/gtkwidgetaccessible.c index dc6bce98a1..f1167f1d5d 100644 --- a/gtk/a11y/gtkwidgetaccessible.c +++ b/gtk/a11y/gtkwidgetaccessible.c @@ -281,7 +281,7 @@ gtk_widget_accessible_ref_relation_set (AtkObject *obj) GtkWidget *temp_widget; temp_widget = gtk_widget_get_parent (widget); - +G_GNUC_BEGIN_IGNORE_DEPRECATIONS if (GTK_IS_ALIGNMENT (temp_widget)) { temp_widget = gtk_widget_get_parent (temp_widget); @@ -292,6 +292,7 @@ gtk_widget_accessible_ref_relation_set (AtkObject *obj) label = find_label (gtk_widget_get_parent (temp_widget)); } } +G_GNUC_END_IGNORE_DEPRECATIONS } else if (GTK_IS_COMBO_BOX (widget)) /* diff --git a/gtk/gtkalignment.c b/gtk/deprecated/gtkalignment.c index 3f26c716c4..0b32553e64 100644 --- a/gtk/gtkalignment.c +++ b/gtk/deprecated/gtkalignment.c @@ -52,6 +52,9 @@ #include "gtkintl.h" +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + + struct _GtkAlignmentPrivate { gfloat xalign; @@ -150,7 +153,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0.0, 1.0, 0.5, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); g_object_class_install_property (gobject_class, PROP_XSCALE, g_param_spec_float("xscale", @@ -159,7 +162,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0.0, 1.0, 1.0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); g_object_class_install_property (gobject_class, PROP_YSCALE, g_param_spec_float("yscale", @@ -168,7 +171,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0.0, 1.0, 1.0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); /** @@ -186,7 +189,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0, G_MAXINT, 0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); /** * GtkAlignment:bottom-padding: @@ -203,7 +206,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0, G_MAXINT, 0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); /** * GtkAlignment:left-padding: @@ -220,7 +223,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0, G_MAXINT, 0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); /** * GtkAlignment:right-padding: @@ -237,7 +240,7 @@ gtk_alignment_class_init (GtkAlignmentClass *class) 0, G_MAXINT, 0, - GTK_PARAM_READWRITE)); + GTK_PARAM_READWRITE|G_PARAM_DEPRECATED)); } static void @@ -279,7 +282,9 @@ gtk_alignment_init (GtkAlignment *alignment) * * Creates a new #GtkAlignment. * - * Returns: the new #GtkAlignment. + * Returns: the new #GtkAlignment + * + * Deprecated: 3.14: Use #GtkWidget alignment and margin properties */ GtkWidget* gtk_alignment_new (gfloat xalign, @@ -438,6 +443,8 @@ gtk_alignment_get_property (GObject *object, * unused space, from 0 to 1. The values are similar to @xscale. * * Sets the #GtkAlignment values. + * + * Deprecated: 3.14: Use #GtkWidget alignment and margin properties */ void gtk_alignment_set (GtkAlignment *alignment, @@ -744,6 +751,8 @@ gtk_alignment_get_preferred_height_and_baseline_for_width (GtkWidget * * padding on the left. * * Since: 2.4 + * + * Deprecated: 3.14: Use #GtkWidget alignment and margin properties */ void gtk_alignment_set_padding (GtkAlignment *alignment, @@ -808,6 +817,8 @@ gtk_alignment_set_padding (GtkAlignment *alignment, * See gtk_alignment_set_padding (). * * Since: 2.4 + * + * Deprecated: 3.14: Use #GtkWidget alignment and margin properties */ void gtk_alignment_get_padding (GtkAlignment *alignment, diff --git a/gtk/gtkalignment.h b/gtk/deprecated/gtkalignment.h index 0f962c97fb..fb7ebb4d7f 100644 --- a/gtk/gtkalignment.h +++ b/gtk/deprecated/gtkalignment.h @@ -73,28 +73,28 @@ struct _GtkAlignmentClass }; -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_14 GType gtk_alignment_get_type (void) G_GNUC_CONST; -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_14 GtkWidget* gtk_alignment_new (gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_14 void gtk_alignment_set (GtkAlignment *alignment, gfloat xalign, gfloat yalign, gfloat xscale, gfloat yscale); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_14 void gtk_alignment_set_padding (GtkAlignment *alignment, guint padding_top, guint padding_bottom, guint padding_left, guint padding_right); -GDK_AVAILABLE_IN_ALL +GDK_DEPRECATED_IN_3_14 void gtk_alignment_get_padding (GtkAlignment *alignment, guint *padding_top, guint *padding_bottom, @@ -36,7 +36,6 @@ #include <gtk/gtkactionable.h> #include <gtk/gtkactionbar.h> #include <gtk/gtkadjustment.h> -#include <gtk/gtkalignment.h> #include <gtk/gtkappchooser.h> #include <gtk/gtkappchooserdialog.h> #include <gtk/gtkappchooserwidget.h> @@ -236,6 +235,7 @@ #include <gtk/deprecated/gtkactivatable.h> #include <gtk/deprecated/gtkaction.h> #include <gtk/deprecated/gtkactiongroup.h> +#include <gtk/deprecated/gtkalignment.h> #include <gtk/deprecated/gtkcolorsel.h> #include <gtk/deprecated/gtkcolorseldialog.h> #include <gtk/deprecated/gtkfontsel.h> diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c index 5d0bcf34c3..f78e8c412f 100644 --- a/gtk/gtkbutton.c +++ b/gtk/gtkbutton.c @@ -42,7 +42,7 @@ #include "gtkbuttonprivate.h" #include <string.h> -#include "gtkalignment.h" +#include "deprecated/gtkalignment.h" #include "gtklabel.h" #include "gtkmain.h" #include "gtkmarshalers.h" diff --git a/gtk/gtktoolitemgroup.c b/gtk/gtktoolitemgroup.c index 92227e1645..2e7de88073 100644 --- a/gtk/gtktoolitemgroup.c +++ b/gtk/gtktoolitemgroup.c @@ -372,7 +372,9 @@ gtk_tool_item_group_header_adjust_style (GtkToolItemGroup *group) break; } +G_GNUC_BEGIN_IGNORE_DEPRECATIONS gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), dy, 0, dx, 0); +G_GNUC_END_IGNORE_DEPRECATIONS } static void @@ -392,7 +394,9 @@ gtk_tool_item_group_init (GtkToolItemGroup *group) priv->label_widget = gtk_label_new (NULL); gtk_widget_set_halign (priv->label_widget, GTK_ALIGN_START); gtk_widget_set_valign (priv->label_widget, GTK_ALIGN_CENTER); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS alignment = gtk_alignment_new (0.5, 0.5, 1.0, 1.0); +G_GNUC_END_IGNORE_DEPRECATIONS gtk_container_add (GTK_CONTAINER (alignment), priv->label_widget); gtk_widget_show_all (alignment); diff --git a/gtk/gtktreeviewcolumn.c b/gtk/gtktreeviewcolumn.c index 7449380efd..c2439eadae 100644 --- a/gtk/gtktreeviewcolumn.c +++ b/gtk/gtktreeviewcolumn.c @@ -25,7 +25,7 @@ #include "gtktreeprivate.h" #include "gtkcelllayout.h" #include "gtkbutton.h" -#include "gtkalignment.h" +#include "deprecated/gtkalignment.h" #include "gtklabel.h" #include "gtkbox.h" #include "gtkmarshalers.h" @@ -869,7 +869,9 @@ gtk_tree_view_column_create_button (GtkTreeViewColumn *tree_column) G_CALLBACK (gtk_tree_view_column_button_clicked), tree_column); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS priv->alignment = gtk_alignment_new (priv->xalign, 0.5, 0.0, 0.0); +G_GNUC_END_IGNORE_DEPRECATIONS hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); priv->arrow = gtk_image_new_from_icon_name ("pan-down-symbolic", GTK_ICON_SIZE_BUTTON); @@ -934,8 +936,9 @@ gtk_tree_view_column_update_button (GtkTreeViewColumn *tree_column) current_child = gtk_bin_get_child (GTK_BIN (alignment)); /* Set up the actual button */ - gtk_alignment_set (GTK_ALIGNMENT (alignment), priv->xalign, - 0.5, 0.0, 0.0); +G_GNUC_BEGIN_IGNORE_DEPRECATIONS + gtk_alignment_set (GTK_ALIGNMENT (alignment), priv->xalign, 0.5, 0.0, 0.0); +G_GNUC_END_IGNORE_DEPRECATIONS if (priv->child) { |