b=714068 use gtk_icon_theme_get_icon_sizes instead of gtk_icon_theme_has_icon to determine whether GtkWindow will use an icon r=karlt

--HG--
extra : transplant_source : %01%D7%07%9BU%7E%0C%C7t%E6ye%3Av%CC%02%FB%99%1B%D1
This commit is contained in:
Jean-Alexandre Anglès d'Auriac 2012-01-11 15:41:28 +13:00
parent 916440efcf
commit 0da3e3cffe

View File

@ -1830,8 +1830,11 @@ nsWindow::SetIcon(const nsAString& aIconSpec)
nsCOMPtr<nsILocalFile> iconFile;
nsCAutoString path;
bool foundIcon = gtk_icon_theme_has_icon(gtk_icon_theme_get_default(),
iconName.get());
gint *iconSizes =
gtk_icon_theme_get_icon_sizes(gtk_icon_theme_get_default(),
iconName.get());
bool foundIcon = (iconSizes[0] != 0);
g_free(iconSizes);
if (!foundIcon) {
// Look for icons with the following suffixes appended to the base name