Branch: refs/heads/master Author: Frank Lanitz frank@frank.uvena.de Committer: GitHub noreply@github.com Date: Mon, 29 Jan 2018 06:40:35 UTC Commit: 0273b50b3400ed2e3a2df2e9c547403cf54958a6 https://github.com/geany/geany-plugins/commit/0273b50b3400ed2e3a2df2e9c54740...
Log Message: ----------- Merge pull request #682 from LarsGit223/tb-defaulticon
treebrowser: fallback to "text-x-generic" icon if info lookup fails.
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 9 lines changed, 9 insertions(+), 0 deletions(-) =================================================================== @@ -224,6 +224,15 @@ utils_pixbuf_from_path(gchar *path) gtk_icon_size_lookup(GTK_ICON_SIZE_MENU, &width, NULL); info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, GTK_ICON_LOOKUP_USE_BUILTIN); g_object_unref(icon); + if (!info) + { + icon = g_themed_icon_new("text-x-generic"); + if (icon != NULL) + { + info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, width, GTK_ICON_LOOKUP_USE_BUILTIN); + g_object_unref(icon); + } + } if (!info) return NULL; ret = gtk_icon_info_load_icon (info, NULL);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
plugins-commits@lists.geany.org