2006-02-24 [colin] 2.0.0cvs82
[claws.git] / src / stock_pixmap.c
index 1d7c2b790d622168dd389f130d05bbb7ec0d49e1..90b3400f66c42daf3f0400ef6cbdab43d76b0fc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2001 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #include "defs.h"
 #include "pixmaps/outbox.xpm"
 #include "pixmaps/outbox_hrm.xpm"
 #include "pixmaps/trash.xpm"
+#include "pixmaps/trash_btn.xpm"
 #include "pixmaps/trash_hrm.xpm"
 #include "pixmaps/drafts_close.xpm"
 #include "pixmaps/drafts_open.xpm"
 #include "pixmaps/drafts_close_mark.xpm"
 #include "pixmaps/drafts_open_mark.xpm"
 #include "pixmaps/dir_noselect.xpm"
+#include "pixmaps/spam.xpm"
+#include "pixmaps/empty.xpm"
 
 typedef struct _StockPixmapData        StockPixmapData;
 
@@ -289,8 +292,11 @@ static StockPixmapData pixmaps[] =
        {mime_message_xpm                       , NULL, NULL, "mime_message", NULL},
        {sylpheed_icon_xpm                      , NULL, NULL, "sylpheed_icon", NULL},
        {read_xpm                               , NULL, NULL, "read", NULL},
+       {trash_btn_xpm                          , NULL, NULL, "trash_btn", NULL},
        {sylpheed_logo_xpm                      , NULL, NULL, "sylpheed_logo", NULL},
-        {dir_noselect_xpm                       , NULL, NULL, "dir_noselect" , NULL}
+        {dir_noselect_xpm                       , NULL, NULL, "dir_noselect" , NULL},
+        {spam_xpm                               , NULL, NULL, "spam" , NULL},
+        {empty_xpm                              , NULL, NULL, "empty" , NULL}
 };
 
 /* return newly constructed GtkPixmap from GdkPixmap */
@@ -315,11 +321,10 @@ gint stock_pixbuf_gdk(GtkWidget *window, StockPixmap icon, GdkPixbuf **pixbuf)
 {
        StockPixmapData *pix_d;
 
-       g_return_val_if_fail(window != NULL, -1);
-       g_return_val_if_fail(icon >= 0 && icon < N_STOCK_PIXMAPS, -1);
-
-       if (pixbuf) 
+       if (pixbuf)
                *pixbuf = NULL;
+               
+       g_return_val_if_fail(icon >= 0 && icon < N_STOCK_PIXMAPS, -1);
 
        pix_d = &pixmaps[icon];
 
@@ -605,7 +610,7 @@ static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, GdkEventE
                gdk_draw_rectangle(drawable, gc_pix, TRUE, left, top, 
                                   data->overlay_width, data->overlay_height);
        }
-       gdk_gc_destroy(gc_pix);
+       g_object_unref(gc_pix);
        
        return TRUE;
 }