Avoid calling gtk_icon_size_lookup() twice unnecessarily.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5333 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
ad222465b3
commit
2ab1bb9387
@ -2472,9 +2472,10 @@ GdkPixbuf *ui_get_mime_icon(const gchar *mime_type, GtkIconSize size)
|
|||||||
GtkIconTheme *theme;
|
GtkIconTheme *theme;
|
||||||
gint real_size;
|
gint real_size;
|
||||||
|
|
||||||
g_return_val_if_fail(gtk_icon_size_lookup(size, &real_size, NULL), NULL);
|
if (!gtk_icon_size_lookup(size, &real_size, NULL))
|
||||||
gtk_icon_size_lookup(size, &real_size, NULL);
|
{
|
||||||
|
g_return_val_if_reached(NULL);
|
||||||
|
}
|
||||||
theme = gtk_icon_theme_get_default();
|
theme = gtk_icon_theme_get_default();
|
||||||
ctype = g_content_type_from_mime_type(mime_type);
|
ctype = g_content_type_from_mime_type(mime_type);
|
||||||
gicon = g_content_type_get_icon(ctype);
|
gicon = g_content_type_get_icon(ctype);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user