|
[totem/gnome-2-26] Fix crash when a (storage) volume has an emblem: msg#08184svn-commits-list
commit bfc5f434cd87b0d3f933f602eef13dbb1a91f580 Author: Bastien Nocera <hadess@xxxxxxxxxx> Date: Fri Jul 31 19:03:04 2009 +0100 Fix crash when a (storage) volume has an emblem See https://bugzilla.redhat.com/show_bug.cgi?id=514914 src/totem-menu.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) --- diff --git a/src/totem-menu.c b/src/totem-menu.c index 28b8b73..ec59fea 100644 --- a/src/totem-menu.c +++ b/src/totem-menu.c @@ -802,12 +802,22 @@ add_drive_to_menu (GDrive *drive, guint position, Totem *totem) /* Work out an icon to display */ icon = g_volume_get_icon (i->data); icon_name = NULL; - icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon)); - for (j = 0; icon_names[j] != NULL; j++) { - icon_name = icon_names[j]; - if (gtk_icon_theme_has_icon (theme, icon_name) != FALSE) - break; + if (G_IS_EMBLEMED_ICON (icon) != FALSE) { + GIcon *new_icon; + new_icon = g_emblemed_icon_get_icon (G_EMBLEMED_ICON (icon)); + g_object_unref (icon); + icon = new_icon; + } + + if (G_IS_THEMED_ICON (icon)) { + icon_names = g_themed_icon_get_names (G_THEMED_ICON (icon)); + + for (j = 0; icon_names[j] != NULL; j++) { + icon_name = icon_names[j]; + if (gtk_icon_theme_has_icon (theme, icon_name) != FALSE) + break; + } } /* Get the volume's pretty name for the menu label */ _______________________________________________ SVN-commits-list mailing list (read only) http://mail.gnome.org/mailman/listinfo/svn-commits-list Want to limit the commits to a few modules? Go to above URL, log in to edit your options and select the modules ('topics') you want.
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |