Commit e69e609b authored by Benjamin Otte's avatar Benjamin Otte

style: Add missing deprecation markers

Some functions in gtkstyle.h were overlooked when we added the
GDK_DEPRECATED macros.

Also add IGNORE_DEPRECATIONS to the few remaining callers of those
functions.
parent f47f94be
......@@ -655,44 +655,63 @@ void _gtk_style_shade (const GdkColor *a,
GdkColor *b,
gdouble k);
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
gboolean gtk_style_has_context (GtkStyle *style);
GDK_DEPRECATED_IN_3_0
void gtk_widget_style_attach (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
gboolean gtk_widget_has_rc_style (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0
void gtk_widget_set_style (GtkWidget *widget,
GtkStyle *style);
GDK_DEPRECATED_IN_3_0
void gtk_widget_ensure_style (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_get_style_context)
GtkStyle * gtk_widget_get_style (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
void gtk_widget_modify_style (GtkWidget *widget,
GtkRcStyle *style);
GDK_DEPRECATED_IN_3_0_FOR(GtkStyleContext)
GtkRcStyle *gtk_widget_get_modifier_style (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_color)
void gtk_widget_modify_fg (GtkWidget *widget,
GtkStateType state,
const GdkColor *color);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_background)
void gtk_widget_modify_bg (GtkWidget *widget,
GtkStateType state,
const GdkColor *color);
GDK_DEPRECATED_IN_3_0
void gtk_widget_modify_text (GtkWidget *widget,
GtkStateType state,
const GdkColor *color);
GDK_DEPRECATED_IN_3_0
void gtk_widget_modify_base (GtkWidget *widget,
GtkStateType state,
const GdkColor *color);
GDK_DEPRECATED_IN_3_0
void gtk_widget_modify_cursor (GtkWidget *widget,
const GdkColor *primary,
const GdkColor *secondary);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_override_font)
void gtk_widget_modify_font (GtkWidget *widget,
PangoFontDescription *font_desc);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_reset_style)
void gtk_widget_reset_rc_styles (GtkWidget *widget);
GDK_DEPRECATED_IN_3_0_FOR(gtk_style_context_new)
GtkStyle* gtk_widget_get_default_style (void);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_get_path)
void gtk_widget_path (GtkWidget *widget,
guint *path_length,
gchar **path,
gchar **path_reversed);
GDK_DEPRECATED_IN_3_0
void gtk_widget_class_path (GtkWidget *widget,
guint *path_length,
gchar **path,
gchar **path_reversed);
GDK_DEPRECATED_IN_3_0_FOR(gtk_widget_render_icon_pixbuf)
GdkPixbuf *gtk_widget_render_icon (GtkWidget *widget,
const gchar *stock_id,
GtkIconSize size,
......
......@@ -1798,6 +1798,7 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
g_return_val_if_fail (icon_set != NULL, NULL);
g_return_val_if_fail (style == NULL || GTK_IS_STYLE (style), NULL);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (style && gtk_style_has_context (style))
{
g_object_get (style, "context", &context, NULL);
......@@ -1828,7 +1829,6 @@ gtk_icon_set_render_icon (GtkIconSet *icon_set,
}
gtk_style_context_set_state (context, flags);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_style_context_set_direction (context, direction);
G_GNUC_END_IGNORE_DEPRECATIONS;
......
......@@ -119,7 +119,9 @@ gtk_widget_query_size_for_orientation (GtkWidget *widget,
{
gint adjusted_min, adjusted_natural, adjusted_for_size = for_size;
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_ensure_style (widget);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (orientation == GTK_ORIENTATION_HORIZONTAL)
{
......
......@@ -3480,7 +3480,9 @@ gtk_widget_set_property (GObject *object,
gtk_widget_set_receives_default (widget, g_value_get_boolean (value));
break;
case PROP_STYLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_set_style (widget, g_value_get_object (value));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_EVENTS:
if (!gtk_widget_get_realized (widget) && gtk_widget_get_has_window (widget))
......@@ -3658,7 +3660,9 @@ gtk_widget_get_property (GObject *object,
g_value_set_boolean (value, widget->priv->composite_child);
break;
case PROP_STYLE:
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
g_value_set_object (value, gtk_widget_get_style (widget));
G_GNUC_END_IGNORE_DEPRECATIONS;
break;
case PROP_EVENTS:
eventp = g_object_get_qdata (G_OBJECT (widget), quark_event_mask);
......@@ -3805,7 +3809,9 @@ gtk_widget_init (GtkWidget *widget)
_gtk_size_request_cache_init (&priv->requests);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
priv->style = gtk_widget_get_default_style ();
G_GNUC_END_IGNORE_DEPRECATIONS;
g_object_ref (priv->style);
}
......@@ -4808,7 +4814,9 @@ gtk_widget_realize (GtkWidget *widget)
if (priv->parent && !gtk_widget_get_realized (priv->parent))
gtk_widget_realize (priv->parent);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
gtk_widget_ensure_style (widget);
G_GNUC_END_IGNORE_DEPRECATIONS;
if (priv->style_update_pending)
g_signal_emit (widget, widget_signals[STYLE_UPDATED], 0);
......@@ -7121,6 +7129,7 @@ gtk_widget_real_style_updated (GtkWidget *widget)
gtk_widget_update_pango_context (widget);
gtk_widget_update_alpha (widget);
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (priv->style != NULL &&
priv->style != gtk_widget_get_default_style ())
{
......@@ -7132,6 +7141,7 @@ gtk_widget_real_style_updated (GtkWidget *widget)
0,
widget->priv->style);
}
G_GNUC_END_IGNORE_DEPRECATIONS;
if (widget->priv->context)
{
......@@ -10814,10 +10824,12 @@ gtk_widget_real_destroy (GtkWidget *object)
l = next;
}
G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
if (priv->style)
g_object_unref (priv->style);
priv->style = gtk_widget_get_default_style ();
g_object_ref (priv->style);
G_GNUC_END_IGNORE_DEPRECATIONS;
}
static void
......
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