Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 22 Apr 2013 18:18:18 UTC Commit: 659276730a4f94dd6072475878c5a7423bf01fae https://github.com/geany/geany/commit/659276730a4f94dd6072475878c5a7423bf01f...
Log Message: ----------- Don't use deprecated gtk_icon_set_render_icon() on GTK3
Modified Paths: -------------- src/ui_utils.c
Modified: src/ui_utils.c 6 files changed, 6 insertions(+), 0 deletions(-) =================================================================== @@ -2701,9 +2701,15 @@ GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size) icon_set = gtk_icon_factory_lookup_default(stock_id); if (icon_set) { +#if GTK_CHECK_VERSION(3, 0, 0) + GtkStyleContext *ctx = gtk_style_context_new(); + icon = gtk_icon_set_render_icon_pixbuf(icon_set, ctx, size); + g_object_unref(ctx); +#else icon = gtk_icon_set_render_icon(icon_set, gtk_widget_get_default_style(), gtk_widget_get_default_direction(), GTK_STATE_NORMAL, size, NULL, NULL); +#endif } } return icon;
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).