2004-11-24 [colin] 0.9.12cvs169
authorColin Leroy <colin@colino.net>
Wed, 24 Nov 2004 12:53:55 +0000 (12:53 +0000)
committerColin Leroy <colin@colino.net>
Wed, 24 Nov 2004 12:53:55 +0000 (12:53 +0000)
* src/plugins/pgpmime/plugin.c
Update requirements
* src/plugins/trayicon/Makefile.am
* src/plugins/trayicon/newmarkedmail.xpm
* src/plugins/trayicon/trayicon.c
* src/plugins/trayicon/unreadmarkedmail.xpm
Add new icons when there are unread marked mails
answers

ChangeLog.claws
PATCHSETS
configure.ac
src/plugins/pgpmime/plugin.c
src/plugins/trayicon/Makefile.am
src/plugins/trayicon/newmarkedmail.xpm [new file with mode: 0644]
src/plugins/trayicon/trayicon.c
src/plugins/trayicon/unreadmarkedmail.xpm [new file with mode: 0644]

index e4a8927..c18dea3 100644 (file)
@@ -1,3 +1,14 @@
+2004-11-24 [colin]     0.9.12cvs169
+
+       * src/plugins/pgpmime/plugin.c
+               Update requirements
+       * src/plugins/trayicon/Makefile.am
+       * src/plugins/trayicon/newmarkedmail.xpm
+       * src/plugins/trayicon/trayicon.c
+       * src/plugins/trayicon/unreadmarkedmail.xpm
+               Add new icons when there are unread marked mails
+               answers
+
 2004-11-23 [thorsten]  0.9.12cvs168
 
        * src/plugins/pgpmime/plugin.c
index f2d0b19..1cca940 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.94 -r 1.95 src/procmime.c; ) > 0.9.12cvs166.patchset
 ( cvs diff -u -r 1.16 -r 1.17 commitHelper; cvs diff -u -r 1.1 -r 1.2 src/partial_download.c; cvs diff -u -r 1.1 -r 1.2 src/partial_download.h; ) > 0.9.12cvs167.patchset
 ( cvs diff -u -r 1.5 -r 1.6 src/plugins/pgpmime/plugin.c; ) > 0.9.12cvs168.patchset
+( cvs diff -u -r 1.6 -r 1.7 src/plugins/pgpmime/plugin.c; cvs diff -u -r 1.5 -r 1.6 src/plugins/trayicon/Makefile.am; cvs diff -u -r 0 -r 1 src/plugins/trayicon/newmarkedmail.xpm; cvs diff -u -r 1.17 -r 1.18 src/plugins/trayicon/trayicon.c; cvs diff -u -r 0 -r 1 src/plugins/trayicon/unreadmarkedmail.xpm; ) > 0.9.12cvs169.patchset
index 8974d76..0c569d0 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=168
+EXTRA_VERSION=169
 EXTRA_RELEASE=
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
index 59221d1..d63698f 100644 (file)
@@ -38,7 +38,7 @@ gint plugin_init(gchar **error)
                return -1;
        }
 
-       if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(0, 9, 12, 34))) {
+       if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(0, 9, 12, 164))) {
                *error = g_strdup("Your sylpheed version is too old");
                return -1;
        }
index 0f01034..a01569d 100644 (file)
@@ -29,5 +29,7 @@ AM_CPPFLAGS = \
 EXTRA_DIST = \
        README \
        newmail.xpm \
+       newmarkedmail.xpm \
        nomail.xpm \
-       unreadmail.xpm
+       unreadmail.xpm \
+       unreadmarkedmail.xpm
diff --git a/src/plugins/trayicon/newmarkedmail.xpm b/src/plugins/trayicon/newmarkedmail.xpm
new file mode 100644 (file)
index 0000000..31a16aa
--- /dev/null
@@ -0,0 +1,28 @@
+/* XPM */
+static char * newmarkedmail_xpm[] = {
+"16 16 9 1",
+"      c None",
+".     c #DE3636",
+"+     c #FFFFFF",
+"@     c #FF0000",
+"#     c #A0A0A0",
+"$     c #C3C3C3",
+"%     c #808080",
+"&     c #585858",
+"*     c #000000",
+"       ..       ",
+"      .++.      ",
+"     .++@+.     ",
+"    .++@@@+.    ",
+"   .++++@+++.   ",
+"  .+++#+++#++.  ",
+" .+++#+++#+++.. ",
+"....++++#+++....",
+".+$#.++#+++.%%&.",
+".+$#.+#+++..%%&.",
+".+$#.++++.$.%%&.",
+".+$#%......%%%&.",
+".+$#%%%%%%%%%%&.",
+".+$#%%%%%%%%%%&.",
+" *$#%%%%%%%%%%. ",
+"  ............  "};
index 0371d28..fd417c5 100644 (file)
@@ -39,6 +39,8 @@
 #include "gtk/manage_window.h"
 
 #include "eggtrayicon.h"
+#include "newmarkedmail.xpm"
+#include "unreadmarkedmail.xpm"
 #include "newmail.xpm"
 #include "unreadmail.xpm"
 #include "nomail.xpm"
@@ -49,6 +51,10 @@ static GdkPixmap *newmail_pixmap;
 static GdkPixmap *newmail_bitmap;
 static GdkPixmap *unreadmail_pixmap;
 static GdkPixmap *unreadmail_bitmap;
+static GdkPixmap *newmarkedmail_pixmap;
+static GdkPixmap *newmarkedmail_bitmap;
+static GdkPixmap *unreadmarkedmail_pixmap;
+static GdkPixmap *unreadmarkedmail_bitmap;
 static GdkPixmap *nomail_pixmap;
 static GdkPixmap *nomail_bitmap;
 
@@ -63,6 +69,7 @@ guint destroy_signal_id;
 typedef enum
 {
        TRAYICON_NEW,
+       TRAYICON_NEWMARKED,
        TRAYICON_UNREAD,
        TRAYICON_UNREADMARKED,
        TRAYICON_NOTHING,
@@ -95,11 +102,18 @@ static void set_trayicon_pixmap(TrayIconType icontype)
                pixmap = newmail_pixmap;
                bitmap = newmail_bitmap;
                break;
+       case TRAYICON_NEWMARKED:
+               pixmap = newmarkedmail_pixmap;
+               bitmap = newmarkedmail_bitmap;
+               break;
        case TRAYICON_UNREAD:
-       case TRAYICON_UNREADMARKED:
                pixmap = unreadmail_pixmap;
                bitmap = unreadmail_bitmap;
                break;
+       case TRAYICON_UNREADMARKED:
+               pixmap = unreadmarkedmail_pixmap;
+               bitmap = unreadmarkedmail_bitmap;
+               break;
        default:
                pixmap = nomail_pixmap;
                bitmap = nomail_bitmap;
@@ -114,14 +128,24 @@ static void update(void)
 {
        gint new, unread, unreadmarked, total;
        gchar *buf;
+       TrayIconType icontype = TRAYICON_NOTHING;
 
        folder_count_total_msgs(&new, &unread, &unreadmarked, &total);
        buf = g_strdup_printf("New %d, Unread: %d, Total: %d", new, unread, total);
 
         gtk_tooltips_set_tip(tooltips, eventbox, buf, "");
        g_free(buf);
-
-       set_trayicon_pixmap(new > 0 ? TRAYICON_NEW : (unread > 0 ? TRAYICON_UNREAD : TRAYICON_NOTHING));
+       
+       if (new > 0 && unreadmarked > 0)
+               icontype = TRAYICON_NEWMARKED;
+       else if (new > 0)
+               icontype = TRAYICON_NEW;
+       else if (unreadmarked > 0)
+               icontype = TRAYICON_UNREADMARKED;
+       else if (unread > 0)
+               icontype = TRAYICON_UNREAD;
+
+       set_trayicon_pixmap(icontype);
 }
 
 static gboolean folder_item_update_hook(gpointer source, gpointer data)
@@ -187,6 +211,8 @@ static void create_trayicon()
         PIXMAP_CREATE(GTK_WIDGET(trayicon), nomail_pixmap, nomail_bitmap, nomail_xpm);
         PIXMAP_CREATE(GTK_WIDGET(trayicon), unreadmail_pixmap, unreadmail_bitmap, unreadmail_xpm);
         PIXMAP_CREATE(GTK_WIDGET(trayicon), newmail_pixmap, newmail_bitmap, newmail_xpm);
+        PIXMAP_CREATE(GTK_WIDGET(trayicon), unreadmarkedmail_pixmap, unreadmarkedmail_bitmap, unreadmarkedmail_xpm);
+        PIXMAP_CREATE(GTK_WIDGET(trayicon), newmarkedmail_pixmap, newmarkedmail_bitmap, newmarkedmail_xpm);
 
         eventbox = gtk_event_box_new();
         gtk_container_set_border_width(GTK_CONTAINER(eventbox), 0);
diff --git a/src/plugins/trayicon/unreadmarkedmail.xpm b/src/plugins/trayicon/unreadmarkedmail.xpm
new file mode 100644 (file)
index 0000000..fa7f875
--- /dev/null
@@ -0,0 +1,27 @@
+/* XPM */
+static char * unreadmarkedmail_xpm[] = {
+"16 16 8 1",
+"      c None",
+".     c #DE3636",
+"+     c #C3C3C3",
+"@     c #FFFFFF",
+"#     c #808080",
+"$     c #FF0000",
+"%     c #A0A0A0",
+"&     c #636363",
+"   ...........  ",
+"  .+++++++++++. ",
+" .............. ",
+" .@@@@@@@@@@@@. ",
+" .@####@@@@$$@. ",
+" .@@@@@@@@@$$@. ",
+" .@@@@@@@@@@@@. ",
+"....@@####@@....",
+".@+%.@@@@@@.##&.",
+".@+%.@@@##@.##&.",
+".@+%.@@@@@@.##&.",
+".@+%#......###&.",
+".@+%##########&.",
+".@+%##########&.",
+" .+%##########. ",
+"  ............  "};