Default icon size is 24 in list mode
This commit is contained in:
parent
769e16a93e
commit
e401a3cdda
|
@ -246,10 +246,18 @@ static int _new_pixbufs(Browser * browser)
|
||||||
browser->theme = gtk_icon_theme_new();
|
browser->theme = gtk_icon_theme_new();
|
||||||
gtk_icon_theme_set_custom_theme(browser->theme, "gnome");
|
gtk_icon_theme_set_custom_theme(browser->theme, "gnome");
|
||||||
if((browser->pb_file = gtk_icon_theme_load_icon(browser->theme,
|
if((browser->pb_file = gtk_icon_theme_load_icon(browser->theme,
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
"gnome-fs-regular", 48, 0, NULL)) == NULL)
|
"gnome-fs-regular", 48, 0, NULL)) == NULL)
|
||||||
|
#else
|
||||||
|
"gnome-fs-regular", 24, 0, NULL)) == NULL)
|
||||||
|
#endif
|
||||||
return FALSE;
|
return FALSE;
|
||||||
browser->pb_folder = gtk_icon_theme_load_icon(browser->theme,
|
browser->pb_folder = gtk_icon_theme_load_icon(browser->theme,
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
"gnome-fs-directory", 48, 0, NULL);
|
"gnome-fs-directory", 48, 0, NULL);
|
||||||
|
#else
|
||||||
|
"gnome-fs-directory", 24, 0, NULL);
|
||||||
|
#endif
|
||||||
return browser->pb_folder != NULL;
|
return browser->pb_folder != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -169,14 +169,23 @@ GdkPixbuf * mime_icon(Mime * mime, GtkIconTheme * theme, char const * type)
|
||||||
return mime->types[i].icon;
|
return mime->types[i].icon;
|
||||||
strncpy(&buf[11], type, sizeof(buf)-11);
|
strncpy(&buf[11], type, sizeof(buf)-11);
|
||||||
for(; (p = strchr(&buf[11], '/')) != NULL; *p = '-');
|
for(; (p = strchr(&buf[11], '/')) != NULL; *p = '-');
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
if((mime->types[i].icon = gtk_icon_theme_load_icon(theme, buf, 48, 0,
|
if((mime->types[i].icon = gtk_icon_theme_load_icon(theme, buf, 48, 0,
|
||||||
|
#else
|
||||||
|
if((mime->types[i].icon = gtk_icon_theme_load_icon(theme, buf, 24, 0,
|
||||||
|
#endif
|
||||||
NULL)) == NULL)
|
NULL)) == NULL)
|
||||||
{
|
{
|
||||||
if((p = strchr(&buf[11], '-')) != NULL)
|
if((p = strchr(&buf[11], '-')) != NULL)
|
||||||
{
|
{
|
||||||
*p = '\0';
|
*p = '\0';
|
||||||
|
#if GTK_CHECK_VERSION(2, 6, 0)
|
||||||
mime->types[i].icon = gtk_icon_theme_load_icon(theme,
|
mime->types[i].icon = gtk_icon_theme_load_icon(theme,
|
||||||
buf, 48, 0, NULL);
|
buf, 48, 0, NULL);
|
||||||
|
#else
|
||||||
|
mime->types[i].icon = gtk_icon_theme_load_icon(theme,
|
||||||
|
buf, 24, 0, NULL);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mime->types[i].icon;
|
return mime->types[i].icon;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user