[gtk+] Deprecate gtk_icon_info_load_symbolic_for_style
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Deprecate gtk_icon_info_load_symbolic_for_style
- Date: Sat, 4 Dec 2010 15:24:42 +0000 (UTC)
commit 53c2114356ed4e008519866946d5171d13dc0ff7
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Nov 24 19:57:10 2010 -0500
Deprecate gtk_icon_info_load_symbolic_for_style
We might end removing it altogether since it is a bit silly to have
Since: 3.0
Deprecated: 3.0
gtk/gtkicontheme.c | 4 +++-
gtk/gtkicontheme.h | 2 ++
gtk/gtkimage.c | 24 ++++++++++++------------
3 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/gtk/gtkicontheme.c b/gtk/gtkicontheme.c
index da551e5..2211020 100644
--- a/gtk/gtkicontheme.c
+++ b/gtk/gtkicontheme.c
@@ -3273,7 +3273,7 @@ gtk_icon_info_load_symbolic_for_context (GtkIconInfo *icon_info,
GError **error)
{
GdkPixbuf *pixbuf;
- GdkRGBA *color;
+ GdkRGBA *color = NULL;
gchar *css_fg, *css_success;
gchar *css_warning, *css_error;
@@ -3348,6 +3348,8 @@ gtk_icon_info_load_symbolic_for_context (GtkIconInfo *icon_info,
* Return value: (transfer full): a #GdkPixbuf representing the loaded icon
*
* Since: 3.0
+ *
+ * Deprecated: 3.0: Use gtk_icon_info_load_symbolic_for_context() instead
**/
GdkPixbuf *
gtk_icon_info_load_symbolic_for_style (GtkIconInfo *icon_info,
diff --git a/gtk/gtkicontheme.h b/gtk/gtkicontheme.h
index 07042ef..9ee87e1 100644
--- a/gtk/gtkicontheme.h
+++ b/gtk/gtkicontheme.h
@@ -183,11 +183,13 @@ GdkPixbuf * gtk_icon_info_load_symbolic_for_context (GtkIconInfo
GtkStyleContext *context,
gboolean *was_symbolic,
GError **error);
+#ifndef GTK_DISABLE_DEPRECATED
GdkPixbuf * gtk_icon_info_load_symbolic_for_style (GtkIconInfo *icon_info,
GtkStyle *style,
GtkStateType state,
gboolean *was_symbolic,
GError **error);
+#endif
void gtk_icon_info_set_raw_coordinates (GtkIconInfo *icon_info,
gboolean raw_coordinates);
diff --git a/gtk/gtkimage.c b/gtk/gtkimage.c
index ce0fcbe..184451e 100644
--- a/gtk/gtkimage.c
+++ b/gtk/gtkimage.c
@@ -1469,15 +1469,15 @@ ensure_pixbuf_for_icon_name (GtkImage *image,
MIN (width, height), flags);
if (info)
{
- GtkStyle *style;
+ GtkStyleContext *context;
gboolean was_symbolic;
- style = gtk_widget_get_style (GTK_WIDGET (image));
+ context = gtk_widget_get_style_context (GTK_WIDGET (image));
priv->data.name.pixbuf =
- gtk_icon_info_load_symbolic_for_style (info,
- style, state,
- &was_symbolic,
- NULL);
+ gtk_icon_info_load_symbolic_for_context (info,
+ context,
+ &was_symbolic,
+ NULL);
priv->was_symbolic = was_symbolic;
gtk_icon_info_free (info);
}
@@ -1544,15 +1544,15 @@ ensure_pixbuf_for_gicon (GtkImage *image,
MIN (width, height), flags);
if (info)
{
- GtkStyle *style;
+ GtkStyleContext *context;
gboolean was_symbolic;
- style = gtk_widget_get_style (GTK_WIDGET (image));
+ context = gtk_widget_get_style_context (GTK_WIDGET (image));
priv->data.gicon.pixbuf =
- gtk_icon_info_load_symbolic_for_style (info,
- style, state,
- &was_symbolic,
- NULL);
+ gtk_icon_info_load_symbolic_for_context (info,
+ context,
+ &was_symbolic,
+ NULL);
priv->was_symbolic = was_symbolic;
gtk_icon_info_free (info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]