#include #include #include #include "iconthemewrapper.h" Glib::RefPtr procman::IconThemeWrapper::load_icon(const Glib::ustring& icon_name, int size, Gtk::IconLookupFlags flags) const { try { return Gtk::IconTheme::get_default()->load_icon(icon_name, size, flags); } catch (Gtk::IconThemeError &error) { if (error.code() != Gtk::IconThemeError::ICON_THEME_NOT_FOUND) g_error("Cannot load icon '%s' from theme: %s", icon_name.c_str(), error.what().c_str()); return Glib::RefPtr(); } catch (Gio::Error &error) { g_debug("Could not load icon '%s' : %s", icon_name.c_str(), error.what().c_str()); return Glib::RefPtr(); } }