Author: colossus
Date: 2006-11-15 13:13:58 +0000 (Wed, 15 Nov 2006)
New Revision: 23887

Modified:
   xarchiver/trunk/pixmaps/add.png
   xarchiver/trunk/pixmaps/add_button.png
   xarchiver/trunk/pixmaps/extract.png
   xarchiver/trunk/pixmaps/extract_button.png
   xarchiver/trunk/src/support.c
Log:
Changed the add and extract buttons with those from the Tango icon set.
Moved some lines regarding g_free() in support.c to avoid memory leaks.


Modified: xarchiver/trunk/pixmaps/add.png
===================================================================
(Binary files differ)

Modified: xarchiver/trunk/pixmaps/add_button.png
===================================================================
(Binary files differ)

Modified: xarchiver/trunk/pixmaps/extract.png
===================================================================
(Binary files differ)

Modified: xarchiver/trunk/pixmaps/extract_button.png
===================================================================
(Binary files differ)

Modified: xarchiver/trunk/src/support.c
===================================================================
--- xarchiver/trunk/src/support.c       2006-11-15 12:43:45 UTC (rev 23886)
+++ xarchiver/trunk/src/support.c       2006-11-15 13:13:58 UTC (rev 23887)
@@ -30,28 +30,30 @@
        GError *error = NULL;
     GtkWidget *file_image;
        gchar *path;
-       path = g_strconcat(DATADIR, "/xarchiver/pixmaps/", filename, NULL);
-       GdkPixbuf *file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
-       if(!file_pixbuf)
+       GdkPixbuf *file_pixbuf = NULL;
+
+       path = g_strconcat("/usr/share/", "/xarchiver/pixmaps/", filename, 
NULL);
+       file_pixbuf = gdk_pixbuf_new_from_file (path, &error);
+       g_free (path);
+       if ( file_pixbuf == NULL )
        {
                /* perhaps xarchiver has not been installed and is being 
executed from source dir */
                g_free (error);
-               g_free (path);
                error = NULL;
                path = g_strconcat("./pixmaps/", filename, NULL);
-               file_pixbuf = gdk_pixbuf_new_from_file(path, &error);
+               file_pixbuf = gdk_pixbuf_new_from_file (path, &error);
+               g_free(path);
     }
     if (file_pixbuf)
     {
-               file_image = gtk_image_new_from_pixbuf(file_pixbuf);
-               g_object_unref(file_pixbuf);
+               file_image = gtk_image_new_from_pixbuf (file_pixbuf);
+               g_object_unref (file_pixbuf);
     }
     else
        {
                g_free(error);
                file_image = gtk_image_new_from_stock(GTK_STOCK_MISSING_IMAGE, 
size);
     }
-    g_free(path);
     return file_image;
 }
 

_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to