2006-08-18 [paul] 2.4.0cvs64
[claws.git] / src / stock_pixmap.c
index f6bbe602a4e0cee8100fb51e90c2faeee100c9fd..bb79a6ebe143d05c4fee5e1248e51a8f155143a6 100644 (file)
@@ -71,8 +71,8 @@
 #include "pixmaps/paste.xpm"
 #include "pixmaps/preferences.xpm"
 #include "pixmaps/properties.xpm"
-#include "pixmaps/sylpheed_icon.xpm"
-#include "pixmaps/sylpheed_logo.xpm"
+#include "pixmaps/sylpheed-claws_icon.xpm"
+#include "pixmaps/sylpheed-claws_logo.xpm"
 #include "pixmaps/address_book.xpm"
 #include "pixmaps/unread.xpm"
 #include "pixmaps/read.xpm"
@@ -292,10 +292,10 @@ static StockPixmapData pixmaps[] =
        {privacy_emblem_failed_xpm              , NULL, NULL, "privacy_emblem_failed", NULL},   
        {privacy_emblem_warn_xpm                , NULL, NULL, "privacy_emblem_warn", NULL},
        {mime_message_xpm                       , NULL, NULL, "mime_message", NULL},
-       {sylpheed_icon_xpm                      , NULL, NULL, "sylpheed_icon", NULL},
+       {sylpheed_claws_icon_xpm                , NULL, NULL, "sylpheed_claws_icon", NULL},
        {read_xpm                               , NULL, NULL, "read", NULL},
        {trash_btn_xpm                          , NULL, NULL, "trash_btn", NULL},
-       {sylpheed_logo_xpm                      , NULL, NULL, "sylpheed_logo", NULL},
+       {sylpheed_claws_logo_xpm                , NULL, NULL, "sylpheed_claws_logo", NULL},
         {dir_noselect_xpm                       , NULL, NULL, "dir_noselect" , NULL},
         {spam_xpm                               , NULL, NULL, "spam" , NULL},
         {spam_btn_xpm                           , NULL, NULL, "spam_btn" , NULL},
@@ -350,7 +350,7 @@ gint stock_pixbuf_gdk(GtkWidget *window, StockPixmap icon, GdkPixbuf **pixbuf)
                                        if (err) g_error_free(err);
                                }                                       
                                if (pix) {
-                                       if (pix_d->icon_path != NULL) g_free(pix_d->icon_path);
+                                       g_free(pix_d->icon_path);
                                        pix_d->icon_path = g_strdup(prefs_common.pixmap_theme_path);
                                }
                                g_free(icon_file_name);
@@ -366,7 +366,7 @@ gint stock_pixbuf_gdk(GtkWidget *window, StockPixmap icon, GdkPixbuf **pixbuf)
        if (!pix_d->pixbuf) {
                pix_d->pixbuf = gdk_pixbuf_new_from_xpm_data((const gchar **) pix_d->data);
                if (pix_d->pixbuf) {
-                       if (pix_d->icon_path != NULL) g_free(pix_d->icon_path);
+                       g_free(pix_d->icon_path);
                        pix_d->icon_path = g_strdup(DEFAULT_PIXMAP_THEME);      
                }
        }
@@ -410,7 +410,7 @@ gint stock_pixmap_gdk(GtkWidget *window, StockPixmap icon,
                                if (is_file_exist(icon_file_name))
                                        PIXMAP_CREATE_FROM_FILE(window, pix, pix_d->mask, icon_file_name);
                                if (pix) {
-                                       if (pix_d->icon_path != NULL) g_free(pix_d->icon_path);
+                                       g_free(pix_d->icon_path);
                                        pix_d->icon_path = g_strdup(prefs_common.pixmap_theme_path);
                                }
                                g_free(icon_file_name);
@@ -426,7 +426,7 @@ gint stock_pixmap_gdk(GtkWidget *window, StockPixmap icon,
        if (!pix_d->pixmap) {
                PIXMAP_CREATE(window, pix_d->pixmap, pix_d->mask, pix_d->data);
                if (pix_d->pixmap) {
-                       if (pix_d->icon_path != NULL) g_free(pix_d->icon_path);
+                       g_free(pix_d->icon_path);
                        pix_d->icon_path = g_strdup(DEFAULT_PIXMAP_THEME);      
                }
        }
@@ -466,8 +466,10 @@ static void stock_pixmap_find_themes_in_dir(GList **list, const gchar *dirname)
                                filetoexist = g_strconcat(fullentry, G_DIR_SEPARATOR_S, pixmaps[i].file, ".xpm", NULL);
                                if (is_file_exist(filetoexist)) {
                                        *list = g_list_append(*list, fullentry);
+                                       g_free(filetoexist);
                                        break;
                                }
+                               g_free(filetoexist);
                        }
                        g_free(filetoexist);
                        if (i == N_STOCK_PIXMAPS) 
@@ -507,8 +509,7 @@ void stock_pixmap_themes_list_free(GList *list)
        GList *ptr;
 
        for (ptr = g_list_first(list); ptr != NULL; ptr = g_list_next(ptr)) 
-               if (ptr->data)
-                       g_free(ptr->data);
+               g_free(ptr->data);
        g_list_free(list);              
 }