示例#1
0
static GdkPixbuf*
get_icon_for_device(const char *mountpoint)
{
    const char* icon_name = get_icon_for_path(mountpoint);
    if (!strcmp(icon_name, ""))
        // FIXME: defaults to a safe value
        icon_name = "drive-harddisk"; // get_icon_for_path("/");
    return gtk_icon_theme_load_icon (gtk_icon_theme_get_default (), icon_name, 24, GTK_ICON_LOOKUP_USE_BUILTIN, NULL);
}
示例#2
0
static Glib::RefPtr<Gdk::Pixbuf>
get_icon_for_device(const char *mountpoint)
{
	procman::IconThemeWrapper icon_theme;
	string icon_name = get_icon_for_path(mountpoint);
	if (icon_name == "")
		// FIXME: defaults to a safe value
		icon_name = "drive-harddisk"; // get_icon_for_path("/");
	return icon_theme->load_icon(icon_name, 24, Gtk::ICON_LOOKUP_USE_BUILTIN);
}