------------------------------------------------------------ revno: 390 committer: Steven Sheehy <[email protected]> branch nick: trunk timestamp: Sun 2010-09-12 20:25:49 -0500 message: Don't show tab icon if it's missing in user's theme modified: linux/bookentry.cc
-- lp:linuxdcpp https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk Your team LinuxDC++ Team is subscribed to branch lp:linuxdcpp. To unsubscribe from this branch go to https://code.launchpad.net/~linuxdcpp-team/linuxdcpp/trunk/+edit-subscription
=== modified file 'linux/bookentry.cc' --- linux/bookentry.cc 2010-09-08 02:51:30 +0000 +++ linux/bookentry.cc 2010-09-13 01:25:49 +0000 @@ -158,11 +158,16 @@ iconName = "folder"; break; default: - ; + ; // Default to empty string to indicate no icon should be shown below } } - gtk_image_set_from_icon_name(GTK_IMAGE(icon), iconName.c_str(), GTK_ICON_SIZE_MENU); + // If user doesn't have the icon in their theme, default to showing no icon instead + // of showing some generic missing icon. This may occur if the user's system + // doesn't implement the full freedesktop.org Icon Naming Specification. + GtkIconTheme *iconTheme = gtk_icon_theme_get_default(); + if (!iconName.empty() && gtk_icon_theme_has_icon(iconTheme, iconName.c_str())) + gtk_image_set_from_icon_name(GTK_IMAGE(icon), iconName.c_str(), GTK_ICON_SIZE_MENU); } void BookEntry::setBold_gui()
_______________________________________________ Mailing list: https://launchpad.net/~linuxdcpp-team Post to : [email protected] Unsubscribe : https://launchpad.net/~linuxdcpp-team More help : https://help.launchpad.net/ListHelp

