#include "gtk/manage_window.h"
#include "eggtrayicon.h"
+#include "newmarkedmail.xpm"
+#include "unreadmarkedmail.xpm"
#include "newmail.xpm"
#include "unreadmail.xpm"
#include "nomail.xpm"
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;
typedef enum
{
TRAYICON_NEW,
+ TRAYICON_NEWMARKED,
TRAYICON_UNREAD,
TRAYICON_UNREADMARKED,
TRAYICON_NOTHING,
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;
{
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)
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);