[Goodies-commits] r5982 - in xfce4-screenshooter-plugin/trunk: . lib
Jerome Guelfucci
jeromeg at xfce.org
Wed Nov 5 13:39:47 CET 2008
Author: jeromeg
Date: 2008-11-05 12:39:47 +0000 (Wed, 05 Nov 2008)
New Revision: 5982
Modified:
xfce4-screenshooter-plugin/trunk/ChangeLog
xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
Log:
* lib/screenshooter-dialogs.c (add_item):
- Move the detection of the icon theme out of the if-else.
- Fallbac to the "exec" icon if no icon was found for an application.
Modified: xfce4-screenshooter-plugin/trunk/ChangeLog
===================================================================
--- xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-05 11:12:42 UTC (rev 5981)
+++ xfce4-screenshooter-plugin/trunk/ChangeLog 2008-11-05 12:39:47 UTC (rev 5982)
@@ -1,6 +1,12 @@
2008-11-05 jeromeg
- * src/main.c, lib/screenshooter-plugin.c:
+ * lib/screenshooter-dialogs.c (add_item):
+ - Move the detection of the icon theme out of the if-else.
+ - Fallbac to the "exec" icon if no icon was found for an application.
+
+2008-11-05 jeromeg
+
+ * src/main.c, panel-plugin/screenshooter-plugin.c:
- If no application is selected to open the screenshots, show the save
dialog as usual. If an application is selected, save the screenshot in
/tmp without showing the save dialog, and open it with the application.
Modified: xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c
===================================================================
--- xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-05 11:12:42 UTC (rev 5981)
+++ xfce4-screenshooter-plugin/trunk/lib/screenshooter-dialogs.c 2008-11-05 12:39:47 UTC (rev 5982)
@@ -136,6 +136,7 @@
gchar *name = g_strdup (g_app_info_get_name (app_info));
GIcon *icon = g_app_info_get_icon (app_info);
GdkPixbuf *pixbuf = NULL;
+ GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
/* Get the icon */
if (G_IS_LOADABLE_ICON (icon))
@@ -157,8 +158,6 @@
if (names != NULL)
{
- GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
-
if (names[0] != NULL)
{
pixbuf =
@@ -173,6 +172,13 @@
}
}
+ if (pixbuf == NULL)
+ {
+ pixbuf = gtk_icon_theme_load_icon (icon_theme, "exec", ICON_SIZE,
+ GTK_ICON_LOOKUP_GENERIC_FALLBACK,
+ NULL);
+ }
+
/* Add to the liststore */
gtk_list_store_append (GTK_LIST_STORE (liststore), &iter);
More information about the Goodies-commits
mailing list