Button to toggle "flagged"



I made a patch to add a button to toggle message "flagged" from
the main menu toolbar (you need to add it with customize).
Applies to 1.3.7. If people like it, perhaps it can be made part
of the next release?

Regards, Willem Riede.
diff -ur orig/balsa-icons.c src/balsa-icons.c
--- orig/balsa-icons.c	Sun Nov  4 16:40:01 2001
+++ src/balsa-icons.c	Mon May 27 11:53:19 2002
@@ -43,6 +43,7 @@
 #include "pixmaps/balsa_trash_empty.xpm"
 #include "pixmaps/balsa_next_unread.xpm"
 #include "pixmaps/balsa_next_flagged.xpm"
+#include "pixmaps/balsa_flagged.xpm"
 #include "pixmaps/balsa_show_headers.xpm"
 #include "pixmaps/balsa_show_preview.xpm"
 #include "pixmaps/balsa_marked_new.xpm"
@@ -251,6 +252,7 @@
 	{ BALSA_PIXMAP_MARKED_ALL,	    balsa_marked_all_xpm,  24, 24 },
 	{ BALSA_PIXMAP_IDENTITY,	    balsa_identity_xpm,	   24, 24 },
 	{ BALSA_PIXMAP_CLOSE_MBOX,	    balsa_close_mbox_xpm,  24, 24 },
+	{ BALSA_PIXMAP_TOGGLE_FLAGGED,      balsa_flagged_xpm,     24, 24 },
 
 	/* Menu icons */
 	{ BALSA_PIXMAP_MENU_NEW,	    menu_new_xpm,	   16, 16 },
diff -ur orig/balsa-icons.h src/balsa-icons.h
--- orig/balsa-icons.h	Sun Nov  4 16:45:04 2001
+++ src/balsa-icons.h	Mon May 27 11:47:53 2002
@@ -41,6 +41,7 @@
 #define BALSA_PIXMAP_TRASH_EMPTY		"balsa_trash_empty"
 #define BALSA_PIXMAP_NEXT_UNREAD		"balsa_next_unread"
 #define BALSA_PIXMAP_NEXT_FLAGGED		"balsa_next_flagged"
+#define BALSA_PIXMAP_TOGGLE_FLAGGED             "balsa_flagged"
 #define BALSA_PIXMAP_SHOW_HEADERS		"balsa_show_headers"
 #define BALSA_PIXMAP_SHOW_PREVIEW		"balsa_show_preview"
 #define BALSA_PIXMAP_MARKED_NEW			"balsa_marked_new"
diff -ur orig/pixmaps/balsa_flagged.xpm src/pixmaps/balsa_flagged.xpm
--- orig/pixmaps/balsa_flagged.xpm	Mon May 27 11:16:36 2002
+++ src/pixmaps/balsa_flagged.xpm	Mon May 27 11:40:35 2002
@@ -0,0 +1,69 @@
+/* XPM */
+static char *balsa_flagged_xpm[] = {
+/* columns rows colors chars-per-pixel */
+"24 24 39 1",
+"  c #000000",
+". c #3f2c01",
+"X c #473202",
+"o c #4d3603",
+"O c #553c03",
+"+ c #5b4105",
+"@ c #574419",
+"# c #5f4816",
+"$ c #634605",
+"% c #7f5903",
+"& c #635027",
+"* c #6b5627",
+"= c #705e36",
+"- c #746649",
+"; c #73684c",
+": c #777263",
+"> c #8f6404",
+", c #9b6d06",
+"< c #a07208",
+"1 c #ab7807",
+"2 c #b7820a",
+"3 c #b8830a",
+"4 c #af8932",
+"5 c #be912c",
+"6 c #c78d0b",
+"7 c #d1940c",
+"8 c #d9a93f",
+"9 c #c6a14f",
+"0 c #c8a24f",
+"q c #d7ac4e",
+"w c #daaa42",
+"e c #e1bc6c",
+"r c #e2bf72",
+"t c #e2c075",
+"y c #e3c178",
+"u c #e8cc92",
+"i c #e7d099",
+"p c #eee4c7",
+"a c None",
+/* pixels */
+"aaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaa          aaaaaaa",
+"aaaaaaa  :;==&@  aaaaaaa",
+"aaaaaaa  piee04  aaaaaaa",
+"aaaaaaa  yw773<  aaaaaaa",
+"aaaaaaa  yw773<  aaaaaaa",
+"aaaaaaa  yw773<  aaaaaaa",
+"aaaaaaa  yw773<  aaaaaaa",
+"aaaaaaa  tw773<  aaaaaaa",
+"aaaaaaa  r8773<  aaaaaaa",
+"aaaaaaa  9522,%  aaaaaaa",
+"aaaaaaa  &#++o.  aaaaaaa",
+"aaaaaaaaa      aaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaa    aaaaaaaaaa",
+"aaaaaaaaaa    aaaaaaaaaa",
+"aaaaaaaaa -u6$ aaaaaaaaa",
+"aaaaaaaaa *q1O aaaaaaaaa",
+"aaaaaaaaa $6>X aaaaaaaaa",
+"aaaaaaaaa      aaaaaaaaa",
+"aaaaaaaaa      aaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff -ur orig/toolbar-factory.c src/toolbar-factory.c
--- orig/toolbar-factory.c	Tue May  7 15:37:40 2002
+++ src/toolbar-factory.c	Mon May 27 12:04:45 2002
@@ -94,6 +94,7 @@
     BALSA_PIXMAP_SHOW_PREVIEW,
     BALSA_PIXMAP_TRASH,
     BALSA_PIXMAP_TRASH_EMPTY,
+    BALSA_PIXMAP_TOGGLE_FLAGGED,
     NULL
 };
 
@@ -125,6 +126,7 @@
     BALSA_PIXMAP_SHOW_HEADERS,
     BALSA_PIXMAP_TRASH,
     BALSA_PIXMAP_TRASH_EMPTY,
+    BALSA_PIXMAP_TOGGLE_FLAGGED,
     GNOME_STOCK_PIXMAP_CLOSE,
     NULL
 };
@@ -187,7 +189,9 @@
     {BALSA_PIXMAP_CLOSE_MBOX, N_("Close"),
      N_("Close current mailbox"), TOOLBAR_BUTTON_TYPE_BUTTON},
     {BALSA_PIXMAP_SHOW_PREVIEW, N_("Msg Preview"),
-     N_("Show preview pane"), TOOLBAR_BUTTON_TYPE_TOGGLE}
+     N_("Show preview pane"), TOOLBAR_BUTTON_TYPE_TOGGLE},
+    {BALSA_PIXMAP_TOGGLE_FLAGGED, N_("Toggle\nflagged"),
+     N_("Toggle message is flagged"), TOOLBAR_BUTTON_TYPE_BUTTON}
 };
 
 const int toolbar_button_count = sizeof(toolbar_buttons)
diff -ur orig/main-window.c src/main-window.c
--- orig/main-window.c	Tue May 14 05:59:13 2002
+++ src/main-window.c	Mon May 27 13:56:12 2002
@@ -785,7 +785,8 @@
         { BALSA_PIXMAP_SHOW_HEADERS,     show_all_headers_tool_cb },
         { BALSA_PIXMAP_TRASH_EMPTY,      (void(*)())empty_trash },
         { BALSA_PIXMAP_CLOSE_MBOX,       mailbox_close_cb },
-        { BALSA_PIXMAP_SHOW_PREVIEW,     show_preview_pane_cb }
+        { BALSA_PIXMAP_SHOW_PREVIEW,     show_preview_pane_cb },
+        { BALSA_PIXMAP_TOGGLE_FLAGGED,   toggle_flagged_message_cb }
     };
 
     BalsaWindow *window;
@@ -1028,7 +1029,8 @@
     const static gchar* tools[] = { /* toolbar items */
         BALSA_PIXMAP_REPLY,       BALSA_PIXMAP_REPLY_ALL,  
         BALSA_PIXMAP_REPLY_GROUP, BALSA_PIXMAP_FORWARD, 
-        BALSA_PIXMAP_MARKED_NEW,  BALSA_PIXMAP_PRINT
+        BALSA_PIXMAP_MARKED_NEW,  BALSA_PIXMAP_PRINT,
+        BALSA_PIXMAP_TOGGLE_FLAGGED
     };
     const static GnomeUIInfo* mods[] = { /* menu items to modify message */
         &message_menu[MENU_MESSAGE_DELETE_POS], 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]