Commit 04703689 authored by Matthias Clasen's avatar Matthias Clasen

Deprecate GtkAligment

This has been dangling ever since 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=645781
parent 4928d5e4
......@@ -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 \
......
......@@ -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));
......
......@@ -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))
/*
......
......@@ -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,
......
......@@ -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>
......
......@@ -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"
......
......@@ -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);
......
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment