[anjal] Make mailto: composer to take precedence over last selected folder



commit 0dc2fce0091b29bea31bd3d23539e864c5245db3
Author: Srinivasa Ragavan <sragavan novell com>
Date:   Wed Jun 10 18:28:34 2009 +0530

    Make mailto: composer to take precedence over last selected folder
---
 src/mail-conv-view.h |    2 ++
 src/mail-shell.c     |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/mail-conv-view.h b/src/mail-conv-view.h
index 484f4a2..78a69b9 100644
--- a/src/mail-conv-view.h
+++ b/src/mail-conv-view.h
@@ -26,6 +26,7 @@
 #include <gtk/gtk.h>
 #include <camel/camel.h>
 #include <mail-message-view.h>
+#include "mail-view.h"
 
 #define MAIL_CONV_VIEW_TYPE        (mail_conv_view_get_type ())
 #define MAIL_CONV_VIEW(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), MAIL_FOLDER_VIEW_TYPE, MailConvView))
@@ -41,6 +42,7 @@ typedef struct _MailConvView {
 	GtkVBox parent;
 	int type;
 	char *uri;
+	MailViewFlags flags;
 	 
 	/* Base class */
 	GtkWidget *header;
diff --git a/src/mail-shell.c b/src/mail-shell.c
index 6b46242..4fc5614 100644
--- a/src/mail-shell.c
+++ b/src/mail-shell.c
@@ -487,7 +487,8 @@ mail_shell_handle_cmdline (MailShell *shell)
 			/* Handle mailto:// */
 			if (em_utils_check_user_can_send_mail(NULL)) {
 				GtkWidget *composer = (GtkWidget *) em_utils_compose_new_message_with_mailto ((const char *)shell->priv->args[i], NULL);
-				mail_view_add_page ((MailView *)shell->mail_component->mail_view, MAIL_VIEW_COMPOSER, (gpointer)composer);
+				MailViewChild *child = mail_view_add_page ((MailView *)shell->mail_component->mail_view, MAIL_VIEW_COMPOSER, (gpointer)composer);
+				child->flags |= MAIL_VIEW_HOLD_FOCUS;
 			
 			} else {
 				g_message ("Please configure an account before anything else");



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