[Github-comments] [geany/geany-plugins] treebrowser: fix icons in the tree and the toolbar (#927)

LarsGit223 notifications at xxxxx
Sun Oct 13 07:51:30 UTC 2019


LarsGit223 requested changes on this pull request.

Apart from the two little remarks, it looks good to me.

> -	GtkIconSet *icon_set;
-
-	icon_set = gtk_icon_factory_lookup_default(stock_id);
-
-	if (icon_set)
-		return gtk_icon_set_render_icon(icon_set, gtk_widget_get_default_style(),
-										gtk_widget_get_default_direction(),
-										GTK_STATE_NORMAL, GTK_ICON_SIZE_MENU, NULL, NULL);
-	return NULL;
-}
-#endif
-
-static GdkPixbuf *
-utils_pixbuf_from_path(gchar *path)
+static GIcon *
+utils_gicon_from_path(gchar *path)

The parameter path could be const.

>  
 	ctype = g_content_type_guess(path, NULL, 0, NULL);
 	icon = g_content_type_get_icon(ctype);
 	g_free(ctype);
 
 	if (icon != NULL)
 	{
-		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);
+		info = gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon, 16, 0);

What is usually used for icon sizes? You entered 16 but what about using a gtk constant like before?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/927#pullrequestreview-301037073
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20191013/3eaad7d9/attachment.html>


More information about the Github-comments mailing list