static GdkPixbuf * xfdesktop_regular_file_icon_peek_tooltip_pixbuf(XfdesktopIcon *icon, gint width, gint height) { GIcon *gicon = NULL; GdkPixbuf *tooltip_pix = NULL; if(!xfdesktop_file_icon_has_gicon(XFDESKTOP_FILE_ICON(icon))) gicon = xfdesktop_regular_file_icon_load_icon(icon); else g_object_get(XFDESKTOP_FILE_ICON(icon), "gicon", &gicon, NULL); tooltip_pix = xfdesktop_file_utils_get_icon(gicon, width, height, 100); return tooltip_pix; }
static GdkPixbuf * xfdesktop_regular_file_icon_peek_pixbuf(XfdesktopIcon *icon, gint width, gint height) { XfdesktopRegularFileIcon *regular_icon = XFDESKTOP_REGULAR_FILE_ICON(icon); GIcon *gicon = NULL; GdkPixbuf *pix = NULL; if(!xfdesktop_file_icon_has_gicon(XFDESKTOP_FILE_ICON(icon))) gicon = xfdesktop_regular_file_icon_load_icon(icon); else g_object_get(XFDESKTOP_FILE_ICON(icon), "gicon", &gicon, NULL); pix = xfdesktop_file_utils_get_icon(gicon, width, height, regular_icon->priv->pix_opacity); return pix; }
static GdkPixbuf * xfdesktop_volume_icon_peek_pixbuf(XfdesktopIcon *icon, gint width, gint height) { gint opacity = 100; GIcon *gicon = NULL; GdkPixbuf *pix = NULL; g_return_val_if_fail(XFDESKTOP_IS_VOLUME_ICON(icon), NULL); if(!xfdesktop_file_icon_has_gicon(XFDESKTOP_FILE_ICON(icon))) gicon = xfdesktop_volume_icon_load_icon(icon); else g_object_get(XFDESKTOP_FILE_ICON(icon), "gicon", &gicon, NULL); /* If the volume isn't mounted show it as semi-transparent */ if(!xfdesktop_volume_icon_is_mounted(icon)) opacity = 50; pix = xfdesktop_file_utils_get_icon(gicon, height, height, opacity); return pix; }