[geany/geany] 195d2e: Don't try and query the theme when we don't have a screen
Colomban Wendling
git-noreply at xxxxx
Sun Jun 14 22:09:12 UTC 2015
Branch: refs/heads/master
Author: Colomban Wendling <ban at herbesfolles.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 14 Jun 2015 22:09:12 UTC
Commit: 195d2e3a77f6922b7575c52c5abb11b44667bb6d
https://github.com/geany/geany/commit/195d2e3a77f6922b7575c52c5abb11b44667bb6d
Log Message:
-----------
Don't try and query the theme when we don't have a screen
This happens when generating tags.
Modified Paths:
--------------
src/ui_utils.c
Modified: src/ui_utils.c
6 lines changed, 4 insertions(+), 2 deletions(-)
===================================================================
@@ -2969,12 +2969,14 @@ GIcon *ui_get_mime_icon(const gchar *mime_type)
ctype = g_content_type_from_mime_type(mime_type);
if (ctype)
{
+ GdkScreen *screen = gdk_screen_get_default();
+
icon = g_content_type_get_icon(ctype);
- if (icon)
+ if (screen && icon)
{
GtkIconInfo *icon_info;
- icon_info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, 16, 0);
+ icon_info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_for_screen(screen), icon, 16, 0);
if (!icon_info)
{
g_object_unref(icon);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list