PATCH: send/receive option



hello,

i often put my written mails in the oubox and sent them later
when i am online again, now pressing check and then sent outbox
emails are usually two steps, this little patch changes this.

it creates a new icon (selectable through the toolbar factory)
that places a new icon in the toolbar. when pressing this icon,
the mails get sent and at the same time it checks for new mails.
a menu entry is available too.

this patch requires the NEW ICONS PATCH.

1) get todays cvs
2) patch the new icons (ignore some minor warnings)
3) patch this stuff over it

-- 
Name....: Ali Akcaagac
Status..: Student Of Computer & Economic Science
E-Mail..: mailto:ali.akcaagac@stud.fh-wilhelmshaven.de
WWW.....: http://www.fh-wilhelmshaven.de/~akcaagaa
diff -ruN balsa-cvs/src/balsa-icons.c balsa/src/balsa-icons.c
--- balsa-cvs/src/balsa-icons.c	Tue Oct 16 12:29:19 2001
+++ balsa/src/balsa-icons.c	Tue Oct 16 13:24:02 2001
@@ -37,6 +37,7 @@
 #include "pixmaps/balsa_print.xpm"
 #include "pixmaps/balsa_save.xpm"
 #include "pixmaps/balsa_send.xpm"
+#include "pixmaps/balsa_send_receive.xpm"
 #include "pixmaps/balsa_trash.xpm"
 #include "pixmaps/balsa_trash_empty.xpm"
 #include "pixmaps/balsa_next_unread.xpm"
@@ -79,6 +80,7 @@
 #include "pixmaps/menu_previous.xpm"
 #include "pixmaps/menu_save.xpm"
 #include "pixmaps/menu_send.xpm"
+#include "pixmaps/menu_send_receive.xpm"
 #include "pixmaps/menu_compose.xpm"
 #include "pixmaps/menu_attachment.xpm"
 #include "pixmaps/menu_receive.xpm"
@@ -235,6 +237,7 @@
 	{ BALSA_PIXMAP_PRINT,			balsa_print_xpm,	24, 24 },
 	{ BALSA_PIXMAP_SAVE,			balsa_save_xpm,		24, 24 },
 	{ BALSA_PIXMAP_SEND,			balsa_send_xpm,		24, 24 },
+	{ BALSA_PIXMAP_SEND_RECEIVE,		balsa_send_receive_xpm,	24, 24 },
 	{ BALSA_PIXMAP_TRASH,			balsa_trash_xpm,	24, 24 },
 	{ BALSA_PIXMAP_TRASH_EMPTY,		balsa_trash_empty_xpm,	24, 24 },
 	{ BALSA_PIXMAP_NEXT_UNREAD,		balsa_next_unread_xpm,	24, 24 },
@@ -259,6 +262,7 @@
 	{ BALSA_PIXMAP_MENU_PREVIOUS,		menu_previous_xpm,	16, 16 },
 	{ BALSA_PIXMAP_MENU_SAVE,		menu_save_xpm,		16, 16 },
 	{ BALSA_PIXMAP_MENU_SEND,		menu_send_xpm,		16, 16 },
+	{ BALSA_PIXMAP_MENU_SEND_RECEIVE,	menu_send_receive_xpm,	16, 16 },
 	{ BALSA_PIXMAP_MENU_COMPOSE,		menu_compose_xpm,	16, 16 },
 	{ BALSA_PIXMAP_MENU_ATTACHMENT,		menu_attachment_xpm,	16, 16 },
 	{ BALSA_PIXMAP_MENU_RECEIVE,		menu_receive_xpm,	16, 16 },
diff -ruN balsa-cvs/src/balsa-icons.h balsa/src/balsa-icons.h
--- balsa-cvs/src/balsa-icons.h	Tue Oct 16 12:29:19 2001
+++ balsa/src/balsa-icons.h	Tue Oct 16 13:24:02 2001
@@ -35,6 +35,7 @@
 #define BALSA_PIXMAP_PRINT			"balsa_print"
 #define BALSA_PIXMAP_SAVE			"balsa_save"
 #define BALSA_PIXMAP_SEND			"balsa_send"
+#define BALSA_PIXMAP_SEND_RECEIVE		"balsa_send_receive"
 #define BALSA_PIXMAP_TRASH			"balsa_trash"
 #define BALSA_PIXMAP_TRASH_EMPTY		"balsa_trash_empty"
 #define BALSA_PIXMAP_NEXT_UNREAD		"balsa_next_unread"
@@ -58,6 +59,7 @@
 #define BALSA_PIXMAP_MENU_PREVIOUS		"menu_previous"
 #define BALSA_PIXMAP_MENU_SAVE			"menu_save"
 #define BALSA_PIXMAP_MENU_SEND			"menu_send"
+#define BALSA_PIXMAP_MENU_SEND_RECEIVE		"menu_send_receive"
 #define BALSA_PIXMAP_MENU_COMPOSE		"menu_compose"
 #define BALSA_PIXMAP_MENU_ATTACHMENT		"menu_attachment"
 #define BALSA_PIXMAP_MENU_RECEIVE		"menu_receive"
diff -ruN balsa-cvs/src/main-window.c balsa/src/main-window.c
--- balsa-cvs/src/main-window.c	Tue Oct 16 12:29:19 2001
+++ balsa/src/main-window.c	Tue Oct 16 13:24:02 2001
@@ -307,19 +307,26 @@
      check_new_messages_cb, NULL, NULL, GNOME_APP_PIXMAP_STOCK,
      BALSA_PIXMAP_MENU_RECEIVE, 'M', GDK_CONTROL_MASK, NULL},
 #define MENU_FILE_SEND_QUEUED_POS 4
-    /* Ctrl-S */
+    /* Ctrl-A */
     {
      GNOME_APP_UI_ITEM, N_("_Send Queued Mail"),
      N_("Send mail from the outbox"),
      send_outbox_messages_cb, NULL, NULL, GNOME_APP_PIXMAP_STOCK,
      BALSA_PIXMAP_MENU_SEND, 'A', GDK_CONTROL_MASK, NULL},
+#define MENU_FILE_SEND_RECEIVE_POS 5
+    /* Ctrl-B */
+    {
+     GNOME_APP_UI_ITEM, N_("Send and _Receive Mail"),
+     N_("Send and Receive messages"),
+     send_receive_messages_cb, NULL, NULL, GNOME_APP_PIXMAP_STOCK,
+     BALSA_PIXMAP_MENU_SEND_RECEIVE, 'B', GDK_CONTROL_MASK, NULL},
     GNOMEUIINFO_SEPARATOR,
-#define MENU_FILE_PRINT_POS 6
+#define MENU_FILE_PRINT_POS 7
     { GNOME_APP_UI_ITEM, N_("_Print..."), NULL,
       message_print_cb, NULL, NULL, GNOME_APP_PIXMAP_STOCK,
       BALSA_PIXMAP_MENU_PRINT, 'P', GDK_CONTROL_MASK, NULL},
     GNOMEUIINFO_SEPARATOR,
-#define MENU_FILE_ADDRESS_POS 8
+#define MENU_FILE_ADDRESS_POS 9
     {
      GNOME_APP_UI_ITEM, N_("_Address Book..."),
      N_("Open the address book"),
@@ -708,6 +715,7 @@
         const char* icon_id;
         void (*callback)(GtkWidget *, gpointer);
     } callback_table[] = {
+        { BALSA_PIXMAP_SEND_RECEIVE,     send_receive_messages_cb },
         { BALSA_PIXMAP_RECEIVE,          check_new_messages_cb },
         { BALSA_PIXMAP_TRASH,            trash_message_cb },
         { BALSA_PIXMAP_NEW,              new_message_cb },
@@ -1714,6 +1722,21 @@
 }
 
 void
+send_receive_messages_cb(GtkWidget * widget, gpointer data)
+{
+#if ENABLE_ESMTP
+    libbalsa_process_queue(balsa_app.outbox, balsa_app.encoding_style,
+                           balsa_app.smtp_server, balsa_app.smtp_authctx,
+                           balsa_app.smtp_tls_mode,
+                           balsa_app.send_rfc2646_format_flowed);
+#else
+    libbalsa_process_queue(balsa_app.outbox, balsa_app.encoding_style,
+                           balsa_app.send_rfc2646_format_flowed);
+#endif
+    check_new_messages_real(widget, data, TYPE_CALLBACK);
+}
+
+void
 check_new_messages_cb(GtkWidget * widget, gpointer data)
 {
     check_new_messages_real(widget, data, TYPE_CALLBACK);
diff -ruN balsa-cvs/src/main-window.h balsa/src/main-window.h
--- balsa-cvs/src/main-window.h	Tue Oct 16 12:23:17 2001
+++ balsa/src/main-window.h	Tue Oct 16 13:24:02 2001
@@ -78,6 +78,7 @@
 gboolean mail_progress_notify_cb(void);
 gboolean send_progress_notify_cb(void);
 gint check_new_messages_auto_cb(gpointer data);
+void send_receive_messages_cb(GtkWidget *, gpointer data);
 void check_new_messages_cb(GtkWidget *, gpointer data);
 void check_new_messages_real(GtkWidget *, gpointer data, int type);
 void empty_trash(void);
diff -ruN balsa-cvs/src/pixmaps/balsa_send_receive.xpm balsa/src/pixmaps/balsa_send_receive.xpm
--- balsa-cvs/src/pixmaps/balsa_send_receive.xpm	Thu Jan  1 01:00:00 1970
+++ balsa/src/pixmaps/balsa_send_receive.xpm	Tue Oct 16 13:24:02 2001
@@ -0,0 +1,116 @@
+/* XPM */
+static char * balsa_send_receive_xpm[] = {
+"24 23 90 1",
+" 	c None",
+".	c #000000",
+"+	c #F7EFD0",
+"@	c #CC900A",
+"#	c #F7EFD1",
+"$	c #EED680",
+"%	c #D1940C",
+"&	c #C38909",
+"*	c #F6ECC9",
+"=	c #B98208",
+"-	c #A59458",
+";	c #D1BC70",
+">	c #E9D17B",
+",	c #D0991D",
+"'	c #B07C08",
+")	c #916608",
+"!	c #D8E6D2",
+"~	c #B9C9B1",
+"{	c #7D9A69",
+"]	c #6F9059",
+"^	c #F3E3A8",
+"/	c #AE7B0A",
+"(	c #D7E5D0",
+"_	c #AECCA1",
+":	c #669447",
+"<	c #557C3B",
+"[	c #F4E4AD",
+"}	c #D3E3CB",
+"|	c #F5E9BC",
+"1	c #D0E1C9",
+"2	c #535353",
+"3	c #FFFFFF",
+"4	c #C6B26A",
+"5	c #848484",
+"6	c #D5D5D5",
+"7	c #ABABAB",
+"8	c #DBE7D6",
+"9	c #B9C3B5",
+"0	c #BDCEB6",
+"a	c #A9C79C",
+"b	c #6E9952",
+"c	c #65894C",
+"d	c #748C64",
+"e	c #668154",
+"f	c #EEEEEE",
+"g	c #4F4F4F",
+"h	c #838383",
+"i	c #D1D1D1",
+"j	c #DDDDDD",
+"k	c #A8A8A8",
+"l	c #58833C",
+"m	c #E4E4E4",
+"n	c #373737",
+"o	c #B3B3B3",
+"p	c #9D9D9D",
+"q	c #7E7E7E",
+"r	c #737373",
+"s	c #7D7D7D",
+"t	c #CCCCCC",
+"u	c #F5F5F5",
+"v	c #CECECE",
+"w	c #949494",
+"x	c #E1EBDC",
+"y	c #5E8A41",
+"z	c #414141",
+"A	c #C4C4C4",
+"B	c #BBBBBB",
+"C	c #AAAAAA",
+"D	c #3C3C3C",
+"E	c #E0EADB",
+"F	c #639144",
+"G	c #FBFBFB",
+"H	c #404040",
+"I	c #DFDFDF",
+"J	c #959595",
+"K	c #8E8E8E",
+"L	c #3E3E3E",
+"M	c #4D4D4D",
+"N	c #818181",
+"O	c #C6C6C6",
+"P	c #6A6A6A",
+"Q	c #434343",
+"R	c #A0A0A0",
+"S	c #C8C8C8",
+"T	c #636363",
+"U	c #B9B9B9",
+"V	c #D4D4D4",
+"W	c #ACACAC",
+"X	c #7C7C7C",
+"Y	c #BCBCBC",
+"                        ",
+"     ..                 ",
+"    .+@.                ",
+"   .#$%&.               ",
+"  .*$$%%=.    ......    ",
+" .*-;>,')).   .!~{].    ",
+"....^$%/....  .(_:<.    ",
+"   .[$%/.     .}_:<.    ",
+" ...|$%/.......1_:<.... ",
+".23.$4//.567.890abcde.  ",
+".fg......hijk.8__::l.   ",
+".3mnopqrsptuvw.x_:y.    ",
+".3umzABotttujCD.EF.     ",
+".3GumHIuuuuujgJK...     ",
+".3uuumLuuuuuMNOvkw.     ",
+".3GuuuPQuuugPRmumS.     ",
+".3uuuTUUgugJOrOumS.     ",
+".3GuTOumVgWOmuXmmS.     ",
+".3urVuuuummuuuuXmS.     ",
+".3XVmmmmmmmmmmmmXS.     ",
+".rYYYYYYYYYYYYYYYT.     ",
+" .................      ",
+"                        "};
diff -ruN balsa-cvs/src/pixmaps/menu_send_receive.xpm balsa/src/pixmaps/menu_send_receive.xpm
--- balsa-cvs/src/pixmaps/menu_send_receive.xpm	Thu Jan  1 01:00:00 1970
+++ balsa/src/pixmaps/menu_send_receive.xpm	Tue Oct 16 13:24:02 2001
@@ -0,0 +1,58 @@
+/* XPM */
+static char * menu_send_receive_xpm[] = {
+"16 16 39 1",
+" 	c None",
+".	c #000000",
+"+	c #F7EFD0",
+"@	c #F7EFD1",
+"#	c #EED680",
+"$	c #C38909",
+"%	c #F6ECC9",
+"&	c #D1940C",
+"*	c #B98208",
+"=	c #A59458",
+"-	c #D1BC70",
+";	c #E9D17B",
+">	c #B07C08",
+",	c #916608",
+"'	c #F3E3A8",
+")	c #AE7B0A",
+"!	c #F4E4AD",
+"~	c #F5E9BC",
+"{	c #D8E6D2",
+"]	c #B9C9B1",
+"^	c #6F9059",
+"/	c #C6B26A",
+"(	c #D7E5D0",
+"_	c #AECCA1",
+":	c #557C3B",
+"<	c #D3E3CB",
+"[	c #D0E1C9",
+"}	c #DBE7D6",
+"|	c #B9C3B5",
+"1	c #BDCEB6",
+"2	c #A9C79C",
+"3	c #65894C",
+"4	c #748C64",
+"5	c #668154",
+"6	c #669447",
+"7	c #58833C",
+"8	c #E1EBDC",
+"9	c #5E8A41",
+"0	c #E0EADB",
+"    .           ",
+"   .+.          ",
+"  .@#$.         ",
+" .%##&*.        ",
+".%=-;>,,.       ",
+"...'#)...       ",
+"  .!#).  .....  ",
+"  .~#).  .{]^.  ",
+"  .#/).  .(_:.  ",
+"  .....  .<_:.  ",
+"       ...[_:...",
+"       .}|12345.",
+"        .}__67. ",
+"         .8_9.  ",
+"          .0.   ",
+"           .    "};
diff -ruN balsa-cvs/src/toolbar-factory.c balsa/src/toolbar-factory.c
--- balsa-cvs/src/toolbar-factory.c	Tue Oct 16 12:29:20 2001
+++ balsa/src/toolbar-factory.c	Tue Oct 16 13:24:02 2001
@@ -79,6 +79,7 @@
 
 static char *toolbar0_legal[]={
     "",
+    BALSA_PIXMAP_SEND_RECEIVE,
     BALSA_PIXMAP_RECEIVE,
     BALSA_PIXMAP_TRASH,
     BALSA_PIXMAP_NEW,
diff -ruN balsa-cvs/src/toolbar-prefs.c balsa/src/toolbar-prefs.c
--- balsa-cvs/src/toolbar-prefs.c	Tue Oct 16 12:29:20 2001
+++ balsa/src/toolbar-prefs.c	Tue Oct 16 13:24:23 2001
@@ -98,6 +98,8 @@
      N_("Print current message"), TOOLBAR_BUTTON_TYPE_BUTTON},
     {BALSA_PIXMAP_SEND, N_("Send"),
      N_("Send this message"), TOOLBAR_BUTTON_TYPE_BUTTON},
+    {BALSA_PIXMAP_SEND_RECEIVE, N_("Send /\nReceive"),
+     N_("Send and Receive messages"), TOOLBAR_BUTTON_TYPE_BUTTON},
     {BALSA_PIXMAP_ATTACHMENT, N_("Attach"),
      N_("Add attachments to this message"), TOOLBAR_BUTTON_TYPE_BUTTON},
     {BALSA_PIXMAP_SAVE, N_("Save"),


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