[Commits] addressbook-dbus.c 1.1.2.1 1.1.2.2 addressbook-dbus.h 1.1.2.1 1.1.2.2 claws-contacts.xml 1.1.2.1 1.1.2.2 compose.c 1.382.2.580.2.4 1.382.2.580.2.5 folder.c 1.213.2.202.2.1 1.213.2.202.2.2 folderview.c 1.207.2.220.2.1 1.207.2.220.2.2 inc.c 1.149.2.104 1.149.2.104.2.1 jpilot.c 1.18.2.32.2.1 1.18.2.32.2.2 main.c 1.115.2.239.2.4 1.115.2.239.2.5 mainwindow.c 1.274.2.328.2.4 1.274.2.328.2.5 messageview.c 1.94.2.218.2.3 1.94.2.218.2.4 messageview.h 1.19.2.26 1.19.2.26.2.1 mutt.c 1.6.10.18.2.1 1.6.10.18.2.2 pine.c 1.6.2.17.2.1 1.6.2.17.2.2 prefs_common.c 1.204.2.202.2.2 1.204.2.202.2.3 prefs_common.h 1.103.2.133.2.1 1.103.2.133.2.2 procmime.c 1.49.2.140 1.49.2.140.2.1 procmsg.c 1.150.2.117.2.2 1.150.2.117.2.3 procmsg.h 1.60.2.56.2.1 1.60.2.56.2.2 send_message.c 1.17.2.60.2.1 1.17.2.60.2.2 summaryview.c 1.395.2.430.2.4 1.395.2.430.2.5 summaryview.h 1.68.2.57.2.1 1.68.2.57.2.2 vcard.c 1.14.2.20.2.1 1.14.2.20.2.2

miras at claws-mail.org miras at claws-mail.org
Sun Feb 5 23:11:13 CET 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv2369/src

Modified Files:
      Tag: new-contacts
	addressbook-dbus.c addressbook-dbus.h claws-contacts.xml 
	compose.c folder.c folderview.c inc.c jpilot.c main.c 
	mainwindow.c messageview.c messageview.h mutt.c pine.c 
	prefs_common.c prefs_common.h procmime.c procmsg.c procmsg.h 
	send_message.c summaryview.c summaryview.h vcard.c 
Log Message:
2012-02-05 [mir]	3.7.10cvs16.22-new-contacts

	* src/addressbook-dbus.c
	* src/addressbook-dbus.h
	* src/claws-contacts.xml
	* src/compose.c
	* src/folder.c
	* src/folderview.c
	* src/inc.c
	* src/jpilot.c
	* src/main.c
	* src/mainwindow.c
	* src/messageview.c
	* src/messageview.h
	* src/mutt.c
	* src/pine.c
	* src/prefs_common.c
	* src/prefs_common.h
	* src/procmime.c
	* src/procmsg.c
	* src/procmsg.h
	* src/send_message.c
	* src/summaryview.c
	* src/summaryview.h
	* src/vcard.c
	* src/gtk/gtkutils.c
	* src/gtk/progressdialog.c
	* src/gtk/progressdialog.h
	* src/gtk/sslcertwindow.c
	    Applied patch 3.8.0cvs18 to 3.8.0cvs26 from HEAD.

Index: summaryview.h
===================================================================
RCS file: /home/claws-mail/claws/src/summaryview.h,v
retrieving revision 1.68.2.57.2.1
retrieving revision 1.68.2.57.2.2
diff -u -d -r1.68.2.57.2.1 -r1.68.2.57.2.2
--- summaryview.h	29 Nov 2011 00:15:23 -0000	1.68.2.57.2.1
+++ summaryview.h	5 Feb 2012 22:11:11 -0000	1.68.2.57.2.2
@@ -115,7 +115,6 @@
 
 	GtkCMCTreeNode *selected;
 	GtkCMCTreeNode *displayed;
-	GtkCMCTreeNode *last_displayed;
 
 	gboolean display_msg;
 
@@ -204,10 +203,11 @@
 void summary_select_next_marked	  (SummaryView		*summaryview);
 void summary_select_prev_labeled  (SummaryView		*summaryview);
 void summary_select_next_labeled  (SummaryView		*summaryview);
-void summary_select_last_read     (SummaryView		*summaryview);
 void summary_select_parent        (SummaryView		*summaryview);
 void summary_select_by_msgnum	  (SummaryView		*summaryview,
 				   guint		 msgnum);
+void summary_display_by_msgnum	  (SummaryView		*summaryview,
+				   guint		 msgnum);
 void summary_select_by_msg_list   (SummaryView		*summaryview, GSList *msginfos);
 guint summary_get_current_msgnum  (SummaryView		*summaryview);
 void summary_select_node	  (SummaryView		*summaryview,

Index: prefs_common.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.c,v
retrieving revision 1.204.2.202.2.2
retrieving revision 1.204.2.202.2.3
diff -u -d -r1.204.2.202.2.2 -r1.204.2.202.2.3
--- prefs_common.c	29 Nov 2011 00:15:22 -0000	1.204.2.202.2.2
+++ prefs_common.c	5 Feb 2012 22:11:11 -0000	1.204.2.202.2.3
@@ -1167,6 +1167,9 @@
 	{"flush_metadata", "TRUE", &prefs_common.flush_metadata, P_BOOL,
 	 NULL, NULL, NULL},
 
+	{"nav_history_length", "50", &prefs_common.nav_history_length, P_INT,
+	 NULL, NULL, NULL},
+
 	{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 

Index: inc.c
===================================================================
RCS file: /home/claws-mail/claws/src/inc.c,v
retrieving revision 1.149.2.104
retrieving revision 1.149.2.104.2.1
diff -u -d -r1.149.2.104 -r1.149.2.104.2.1
--- inc.c	5 May 2011 07:26:37 -0000	1.149.2.104
+++ inc.c	5 Feb 2012 22:11:10 -0000	1.149.2.104.2.1
@@ -57,6 +57,7 @@
 #include "filtering.h"
 #include "log.h"
 #include "hooks.h"
+#include "logwindow.h"
 
 #ifdef MAEMO
 #ifdef CHINOOK
@@ -133,6 +134,8 @@
 static void inc_put_error		(IncState	 istate,
 					 Pop3Session 	*session);
 
+static void inc_showlog_cb		(GtkWidget	*widget,
+					 gpointer	 data);
 static void inc_cancel_cb		(GtkWidget	*widget,
 					 gpointer	 data);
 static gint inc_dialog_delete_cb	(GtkWidget	*widget,
@@ -413,6 +416,8 @@
 	progress = progress_dialog_create();
 	gtk_window_set_title(GTK_WINDOW(progress->window),
 			     _("Retrieving new messages"));
+	g_signal_connect(G_OBJECT(progress->showlog_btn), "clicked",
+			 G_CALLBACK(inc_showlog_cb), dialog);
 	g_signal_connect(G_OBJECT(progress->cancel_btn), "clicked",
 			 G_CALLBACK(inc_cancel_cb), dialog);
 	g_signal_connect(G_OBJECT(progress->window), "delete_event",
@@ -1260,6 +1265,13 @@
 		inc_cancel((IncProgressDialog *)cur->data);
 }
 
+static void inc_showlog_cb(GtkWidget *widget, gpointer data)
+{
+	MainWindow *mainwin = mainwindow_get_mainwindow();
+
+	log_window_show(mainwin->logwin);
+}
+
 static void inc_cancel_cb(GtkWidget *widget, gpointer data)
 {
 	inc_cancel((IncProgressDialog *)data);

Index: summaryview.c
===================================================================
RCS file: /home/claws-mail/claws/src/summaryview.c,v
retrieving revision 1.395.2.430.2.4
retrieving revision 1.395.2.430.2.5
diff -u -d -r1.395.2.430.2.4 -r1.395.2.430.2.5
--- summaryview.c	11 Jan 2012 22:40:47 -0000	1.395.2.430.2.4
+++ summaryview.c	5 Feb 2012 22:11:11 -0000	1.395.2.430.2.5
@@ -1139,7 +1139,6 @@
 	if (!summaryview->mainwin)
 		return FALSE;
 	START_TIMING("");
-	summaryview->last_displayed = NULL;
 	summary_switch_from_to(summaryview, item);
 
 	inc_lock();
@@ -1388,7 +1387,6 @@
 
 	if (is_refresh) {
 		if (!quicksearch_is_in_typing(summaryview->quicksearch)) {
-			summaryview->last_displayed = summaryview->displayed;
 			summaryview->displayed =
 				summary_find_msg_by_msgnum(summaryview,
 							   displayed_msgnum);
@@ -2049,12 +2047,6 @@
 		summary_select_node(summaryview, node, TRUE, FALSE);
 }
 
-void summary_select_last_read(SummaryView *summaryview)
-{
-	if (summaryview->last_displayed)
-		summary_select_node(summaryview, summaryview->last_displayed, TRUE, FALSE);
-}
-
 void summary_select_parent(SummaryView *summaryview)
 {
 	GtkCMCTreeNode *node = NULL;
@@ -2073,6 +2065,14 @@
 	summary_select_node(summaryview, node, FALSE, TRUE);
 }
 
+void summary_display_by_msgnum(SummaryView *summaryview, guint msgnum)
+{
+	GtkCMCTreeNode *node;
+
+	node = summary_find_msg_by_msgnum(summaryview, msgnum);
+	summary_select_node(summaryview, node, TRUE, FALSE);
+}
+
 void summary_select_by_msg_list(SummaryView	*summaryview, GSList *msginfos)
 {
 	GtkCMCTree *ctree;
@@ -3507,7 +3507,6 @@
 			else
 				gtkut_window_popup(summaryview->ext_messageview->window);
 			msgview = summaryview->ext_messageview;
-			summaryview->last_displayed = summaryview->displayed;
 			summaryview->displayed = row;
 			val = messageview_show(msgview, msginfo, all_headers);
 			if (mimeview_tree_is_empty(msgview->mimeview))
@@ -3516,7 +3515,6 @@
 				GTK_CMCLIST(summaryview->ctree)->focus_row);
 		} else {
 			msgview = summaryview->messageview;
-			summaryview->last_displayed = summaryview->displayed;
 			summaryview->displayed = row;
 			if (!messageview_is_visible(msgview) &&
 			    gtk_window_is_active(GTK_WINDOW(summaryview->mainwin->window))) {
@@ -6528,7 +6526,6 @@
 
 	summaryview->selected = summary_find_msg_by_msgnum(summaryview, selected_msgnum);
 	summaryview->displayed = summary_find_msg_by_msgnum(summaryview, displayed_msgnum);
-	summaryview->last_displayed = summaryview->displayed;
 	if (!summaryview->displayed)
 		messageview_clear(summaryview->messageview);
 	else

Index: addressbook-dbus.h
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addressbook-dbus.h,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- addressbook-dbus.h	7 Sep 2011 15:52:24 -0000	1.1.2.1
+++ addressbook-dbus.h	5 Feb 2012 22:11:10 -0000	1.1.2.2
@@ -51,6 +51,7 @@
 } ContactData;
 
 gboolean addressbook_start_service(GError** error);
+void addressbook_install_hooks(GError** error);
 int addressbook_dbus_add_contact(ContactData* contact, GError** error);
 gboolean addrindex_dbus_load_completion(gint (*callBackFunc)
 										(const gchar* name,
@@ -66,6 +67,8 @@
 						 gboolean sourceInd,
 						 GList *msgList );
 void addressbook_connect_signals(Compose* compose);
+gchar* addressbook_get_vcard(const gchar* account, GError** error);
+gboolean addressbook_add_vcard(const gchar* abook, const gchar* vcard, GError** error);
 
 G_END_DECLS
 

Index: messageview.h
===================================================================
RCS file: /home/claws-mail/claws/src/messageview.h,v
retrieving revision 1.19.2.26
retrieving revision 1.19.2.26.2.1
diff -u -d -r1.19.2.26 -r1.19.2.26.2.1
--- messageview.h	16 Feb 2011 07:16:10 -0000	1.19.2.26
+++ messageview.h	5 Feb 2012 22:11:11 -0000	1.19.2.26.2.1
@@ -75,12 +75,15 @@
 	gboolean all_headers;
 
 	gint msginfo_update_callback_id;
+	gint msginfo_moved_callback_id;
 	gboolean updating;
 	gboolean deferred_destroy;
 	
 	gboolean show_full_text;
 	gboolean partial_display_shown;
 	GtkUIManager *ui_manager;
+	GList *trail;
+	gint trail_pos;
 };
 
 MessageView *messageview_create			(MainWindow	*mainwin);
@@ -127,4 +130,9 @@
 void messageview_show_partial_display		(MessageView 	*msgview, 
 						 MsgInfo 	*msginfo,
 						 size_t 	 length);
+gboolean messageview_nav_has_prev(MessageView *messageview);
+gboolean messageview_nav_has_next(MessageView *messageview);
+MsgInfo *messageview_nav_get_prev(MessageView *messageview);
+MsgInfo *messageview_nav_get_next(MessageView *messageview);
+
 #endif /* __MESSAGEVIEW_H__ */

Index: pine.c
===================================================================
RCS file: /home/claws-mail/claws/src/pine.c,v
retrieving revision 1.6.2.17.2.1
retrieving revision 1.6.2.17.2.2
diff -u -d -r1.6.2.17.2.1 -r1.6.2.17.2.2
--- pine.c	29 Nov 2011 00:15:21 -0000	1.6.2.17.2.1
+++ pine.c	5 Feb 2012 22:11:11 -0000	1.6.2.17.2.2
@@ -635,7 +635,7 @@
  */
 gchar *pine_find_file( void ) {
 	const gchar *homedir;
-	gchar str[ WORK_BUFLEN ];
+	gchar str[ WORK_BUFLEN + 1 ];
 	gint len;
 	FILE *fp;
 
@@ -650,7 +650,7 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strncat( str, PINE_HOME_FILE, WORK_BUFLEN );
+	strncat( str, PINE_HOME_FILE, WORK_BUFLEN - strlen(str) );
 
 	/* Attempt to open */
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: vcard.c
===================================================================
RCS file: /home/claws-mail/claws/src/vcard.c,v
retrieving revision 1.14.2.20.2.1
retrieving revision 1.14.2.20.2.2
diff -u -d -r1.14.2.20.2.1 -r1.14.2.20.2.2
--- vcard.c	29 Nov 2011 00:15:24 -0000	1.14.2.20.2.1
+++ vcard.c	5 Feb 2012 22:11:11 -0000	1.14.2.20.2.2
@@ -561,7 +561,7 @@
 gchar *vcard_find_gnomecard( void ) {
 	const gchar *homedir;
 	gchar buf[ WORK_BUFLEN ];
-	gchar str[ WORK_BUFLEN ];
+	gchar str[ WORK_BUFLEN + 1 ];
 	gchar *fileSpec;
 	gint len, lenlbl, i;
 	FILE *fp;
@@ -577,9 +577,9 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strncat( str, GNOMECARD_DIR, WORK_BUFLEN );
-	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN );
-	strncat( str, GNOMECARD_FILE, WORK_BUFLEN );
+	strncat( str, GNOMECARD_DIR, WORK_BUFLEN - strlen(str) );
+	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN - strlen(str) );
+	strncat( str, GNOMECARD_FILE, WORK_BUFLEN - strlen(str) );
 
 	fileSpec = NULL;
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: messageview.c
===================================================================
RCS file: /home/claws-mail/claws/src/messageview.c,v
retrieving revision 1.94.2.218.2.3
retrieving revision 1.94.2.218.2.4
diff -u -d -r1.94.2.218.2.3 -r1.94.2.218.2.4
--- messageview.c	3 Dec 2011 12:53:28 -0000	1.94.2.218.2.3
+++ messageview.c	5 Feb 2012 22:11:11 -0000	1.94.2.218.2.4
@@ -130,7 +130,9 @@
 					 gpointer	 data);
 static void next_labeled_cb		(GtkAction	*action,
 					 gpointer	 data);
-static void last_read_cb		(GtkAction	*action,
+static void prev_history_cb		(GtkAction	*action,
+					 gpointer	 data);
+static void next_history_cb		(GtkAction	*action,
 					 gpointer	 data);
 static void parent_cb			(GtkAction	*action,
 					 gpointer	 data);
@@ -182,6 +184,7 @@
 static void messageview_update		(MessageView	*msgview,
 					 MsgInfo	*old_msginfo);
 static gboolean messageview_update_msg	(gpointer source, gpointer data);
+static gboolean messageview_msg_moved	(gpointer source, gpointer data);
 
 static void messageview_nothing_cb	   (GtkAction *action, gpointer data)
 {
@@ -230,8 +233,10 @@
 	/* {"View/Goto/---",		NULL, "---", NULL, NULL, NULL }, */
 	{"View/Goto/PrevLabeled",	NULL, N_("Previous _labeled message"), NULL, NULL, G_CALLBACK(prev_labeled_cb) },
 	{"View/Goto/NextLabeled",	NULL, N_("Next la_beled message"), NULL, NULL, G_CALLBACK(next_labeled_cb) },
+	/* {"View/Goto/---",			NULL, "---", NULL, NULL, NULL }, */
+	{"View/Goto/PrevHistory",	NULL, N_("Previous opened message"), "<alt>Left", NULL, G_CALLBACK(prev_history_cb) },
+	{"View/Goto/NextHistory",	NULL, N_("Next opened message"), "<alt>Right", NULL, G_CALLBACK(next_history_cb) },
 	/* {"View/Goto/---",		NULL, "---", NULL, NULL, NULL }, */
-	{"View/Goto/LastRead",		NULL, N_("Last read message"), NULL, NULL, G_CALLBACK(last_read_cb) },
 	{"View/Goto/ParentMessage",	NULL, N_("Parent message"), "<control>Up", NULL, G_CALLBACK(parent_cb) },
 	/* {"View/Goto/---",		NULL, "---", NULL, NULL, NULL }, */
 	{"View/Goto/NextUnreadFolder",	NULL, N_("Next unread _folder"), "<shift>G", NULL, G_CALLBACK(goto_unread_folder_cb) },
@@ -412,6 +417,7 @@
 
 	messageview->msginfo_update_callback_id =
 		hooks_register_hook(MSGINFO_UPDATE_HOOKLIST, messageview_update_msg, (gpointer) messageview);
+	messageview->msginfo_moved_callback_id = 0;
 
 	return messageview;
 }
@@ -497,9 +503,11 @@
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "PrevLabeled", "View/Goto/PrevLabeled", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "NextLabeled", "View/Goto/NextLabeled", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "Separator5", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
-	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "LastRead", "View/Goto/LastRead", GTK_UI_MANAGER_MENUITEM)
-	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "PrevHistory", "View/Goto/PrevHistory", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "NextHistory", "View/Goto/NextHistory", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "Separator6", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
+	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "Separator7", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "NextUnreadFolder", "View/Goto/NextUnreadFolder", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(msgview->ui_manager, "/Menu/View/Goto", "OtherFolder", "View/Goto/OtherFolder", GTK_UI_MANAGER_MENUITEM)
 
@@ -714,6 +722,8 @@
 	g_signal_connect(G_OBJECT(window), "key_press_event",
 			 G_CALLBACK(key_pressed), msgview);
 #endif
+	msgview->msginfo_moved_callback_id = hooks_register_hook(MSGINFO_UPDATE_HOOKLIST,
+					messageview_msg_moved, (gpointer) msgview);
 	messageview_add_toolbar(msgview, window);
 
 	if (show) {
@@ -1133,6 +1143,118 @@
 	return brokeninfo;
 }
 
+static void messageview_register_nav(MessageView *messageview)
+{
+	gchar *id;
+	gint pos = -1;
+	GList *existing;
+
+	cm_return_if_fail(messageview);
+	cm_return_if_fail(messageview->msginfo);
+
+	id = procmsg_msginfo_get_identifier(messageview->msginfo);
+	existing = g_list_find_custom(messageview->trail, id, (GCompareFunc)g_strcmp0);
+
+	if (existing != NULL)
+		pos = g_list_position(messageview->trail, existing);
+	else
+		pos = -1;
+
+	if (pos != -1) {
+		messageview->trail_pos = pos;
+		g_free(id);
+	} else {
+		/* Cut the end of the list */
+		GList *end = g_list_nth(messageview->trail, messageview->trail_pos + 1);
+		if (end) {
+			if (end->prev) {
+				end->prev->next = NULL;
+				end->prev = NULL;
+				list_free_strings(end);
+				g_list_free(end);
+			} else {
+				list_free_strings(messageview->trail);
+				g_list_free(messageview->trail);
+				messageview->trail = NULL;
+			}
+		}
+		messageview->trail = g_list_append(messageview->trail, id);
+		messageview->trail_pos = g_list_length(messageview->trail) - 1;
+		
+		/* Cut the beginning if needed */
+		while (messageview->trail_pos > prefs_common.nav_history_length) {
+			g_free(messageview->trail->data);
+			messageview->trail = g_list_delete_link(messageview->trail,
+						messageview->trail);
+			messageview->trail_pos--;
+		}
+	}
+	messageview_set_menu_sensitive(messageview);
+}
+
+gboolean messageview_nav_has_prev(MessageView *messageview) {
+	return messageview->trail != NULL &&  messageview->trail_pos > 0;
+}
+
+gboolean messageview_nav_has_next(MessageView *messageview) {
+	if (!messageview->trail)
+		return FALSE;
+	
+	return sc_g_list_bigger(messageview->trail, messageview->trail_pos + 1);
+}
+
+MsgInfo *messageview_nav_get_prev(MessageView *messageview) {
+	GList *item;
+	MsgInfo *info;
+
+	cm_return_val_if_fail(messageview, NULL);
+	cm_return_val_if_fail(messageview->trail, NULL);
+
+	do {
+		if (!messageview_nav_has_prev(messageview))
+			return NULL;
+
+		item = g_list_nth(messageview->trail, messageview->trail_pos - 1);
+		cm_return_val_if_fail(item != NULL, NULL);
+
+		info = procmsg_get_msginfo_from_identifier((const gchar *)item->data);
+		if (info != NULL)
+			break;
+
+		g_free(item->data);
+		messageview->trail = g_list_delete_link(messageview->trail, item);
+		if (messageview->trail_pos > 0)
+			messageview->trail_pos--;
+	} while (info == NULL);
+
+	return info;
+}
+
+MsgInfo *messageview_nav_get_next(MessageView *messageview) {
+	GList *item;
+	MsgInfo *info;
+
+	cm_return_val_if_fail(messageview, NULL);
+	cm_return_val_if_fail(messageview->trail, NULL);
+
+	do {
+		if (!messageview_nav_has_next(messageview))
+			return NULL;
+
+		item = g_list_nth(messageview->trail, messageview->trail_pos + 1);
+		cm_return_val_if_fail(item != NULL, NULL);
+
+		info = procmsg_get_msginfo_from_identifier((const gchar *)item->data);
+		if (info != NULL)
+			break;
+
+		g_free(item->data);
+		messageview->trail = g_list_delete_link(messageview->trail, item);
+	} while (info == NULL);
+	
+	return info;
+}
+
 gint messageview_show(MessageView *messageview, MsgInfo *msginfo,
 		      gboolean all_headers)
 {
@@ -1244,6 +1366,7 @@
 	}
 	headerview_show(messageview->headerview, messageview->msginfo);
 
+	messageview_register_nav(messageview);
 	messageview_set_position(messageview, 0);
 
 #ifdef MAEMO
@@ -1458,6 +1581,9 @@
 	if (!messageview->deferred_destroy) {
 		hooks_unregister_hook(MSGINFO_UPDATE_HOOKLIST,
 			      messageview->msginfo_update_callback_id);
+		if (messageview->new_window)
+			hooks_unregister_hook(MSGINFO_UPDATE_HOOKLIST,
+				messageview->msginfo_moved_callback_id);
 	}
 
 	if (messageview->updating) {
@@ -1486,7 +1612,9 @@
 		toolbar_destroy(messageview->toolbar);
 		g_free(messageview->toolbar);
 	}
-	
+
+	list_free_strings(messageview->trail);
+	g_list_free(messageview->trail);
 	msgview_list = g_list_remove(msgview_list, messageview); 
 
 	if (messageview->window)
@@ -2366,28 +2494,39 @@
 	}
 }
 
-static void last_read_cb(GtkAction *action, gpointer data)
+static void prev_history_cb(GtkAction *action, gpointer data)
 {
 	MessageView *messageview = (MessageView *)data;
-	messageview->updating = TRUE;
-	summary_select_last_read(messageview->mainwin->summaryview);
-	messageview->updating = FALSE;
-
-	if (messageview->deferred_destroy) {
-		debug_print("messageview got away!\n");
-		messageview_destroy(messageview);
-		return;
+	MsgInfo *info = messageview_nav_get_prev(messageview);
+	if (info) {
+		messageview->updating = TRUE;
+		messageview_show(messageview, info, 
+					 messageview->all_headers);
+		messageview->updating = FALSE;
+		procmsg_msginfo_free(info);
+		if (messageview->deferred_destroy) {
+			debug_print("messageview got away!\n");
+			messageview_destroy(messageview);
+			return;
+		}
 	}
-	if (messageview->mainwin->summaryview->selected) {
-#ifndef GENERIC_UMPC
-		MsgInfo * msginfo = summary_get_selected_msg(messageview->mainwin->summaryview);
-		       
-		if (msginfo)
-			messageview_show(messageview, msginfo, 
+}
+
+static void next_history_cb(GtkAction *action, gpointer data)
+{
+	MessageView *messageview = (MessageView *)data;
+	MsgInfo *info = messageview_nav_get_next(messageview);
+	if (info) {
+		messageview->updating = TRUE;
+		messageview_show(messageview, info, 
 					 messageview->all_headers);
-#endif
-	} else {
-		gtk_widget_destroy(messageview->window);
+		messageview->updating = FALSE;
+		procmsg_msginfo_free(info);
+		if (messageview->deferred_destroy) {
+			debug_print("messageview got away!\n");
+			messageview_destroy(messageview);
+			return;
+		}
 	}
 }
 
@@ -2761,7 +2900,9 @@
 	if (messageview->msginfo != msginfo_update->msginfo)
 		return FALSE;
 
-	if (msginfo_update->flags & MSGINFO_UPDATE_DELETED) {
+	if ((msginfo_update->flags & MSGINFO_UPDATE_DELETED) &&
+		!messageview->new_window)
+	{
 		MsgInfo *old_msginfo = messageview->msginfo;
 		messageview_clear(messageview);
 		messageview_update(messageview, old_msginfo);
@@ -2770,6 +2911,29 @@
 	return FALSE;
 }
 
+static gboolean messageview_msg_moved(gpointer source, gpointer data)
+{
+	MsgInfoUpdate *msginfo_update = (MsgInfoUpdate *) source;
+	MessageView *messageview = (MessageView *) data;
+	MsgInfo *msg_old = messageview->msginfo;
+	MsgInfo *msg_new = msginfo_update->msginfo;
+
+	if (strcmp2(msg_new->msgid, msg_old->msgid))
+		return FALSE;
+
+	if ((msginfo_update->flags & MSGINFO_UPDATE_ADDED) &&
+	    (folder_item_get_msginfo(msg_old->folder, msg_old->msgnum) == NULL))
+	{
+		if (folder_has_parent_of_type(msg_new->folder, F_TRASH))
+			messageview_destroy(messageview);
+		else
+			messageview_show(messageview, msg_new,
+					 messageview->all_headers);
+	}
+	
+	return FALSE;
+}
+
 void messageview_set_menu_sensitive(MessageView *messageview)
 {
 	if (!messageview || !messageview->new_window) 
@@ -2780,6 +2944,8 @@
 	cm_toggle_menu_set_active_full(messageview->ui_manager, "Menu/View/Quotes/CollapseAll", (prefs_common.hide_quotes == 1));
 	cm_toggle_menu_set_active_full(messageview->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
 	cm_toggle_menu_set_active_full(messageview->ui_manager, "Menu/View/Quotes/Collapse3", (prefs_common.hide_quotes == 3));
+	cm_menu_set_sensitive_full(messageview->ui_manager, "Menu/View/Goto/PrevHistory", messageview_nav_has_prev(messageview));
+	cm_menu_set_sensitive_full(messageview->ui_manager, "Menu/View/Goto/NextHistory", messageview_nav_has_next(messageview));
 }
 
 void messageview_learn (MessageView *msgview, gboolean is_spam)

Index: addressbook-dbus.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addressbook-dbus.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- addressbook-dbus.c	7 Sep 2011 15:52:24 -0000	1.1.2.1
+++ addressbook-dbus.c	5 Feb 2012 22:11:10 -0000	1.1.2.2
@@ -42,6 +42,7 @@
 #include "addrgather.h"
 #include "folder.h"
 #include "compose.h"
+#include "hooks.h"
 
 #include "addressbook-dbus.h"
 #include "client-bindings.h"
@@ -430,3 +431,57 @@
 	}
 	dbus_connection_add_filter(bus, contact_add_signal, NULL, NULL);
 }
+
+gchar* addressbook_get_vcard(const gchar* account, GError** error) {
+	gchar* vcard = NULL;
+	
+	g_return_val_if_fail(account != NULL, vcard);
+	
+	if (! init(error)) {
+		return vcard;
+	}
+	
+	if (!org_clawsmail_Contacts_get_vcard(proxy, account, &vcard, error)) {
+		if (! *error)
+			g_set_error(error, client_object_error_quark(), 1, "Woops remote method failed");
+		g_warning ("Woops remote method failed: %s", (*error)->message);
+		g_free(vcard);
+		vcard = NULL;
+	}
+	
+	return vcard;
+}
+
+gboolean addressbook_add_vcard(const gchar* abook, const gchar* vcard, GError** error) {
+	gboolean result = FALSE;
+	
+	return result;
+}
+
+static gboolean my_compose_create_hook(gpointer source, gpointer user_data) {
+	Compose *compose = (Compose*) source;
+	GError* error = NULL;
+
+	gchar* vcard = addressbook_get_vcard("test", &error);
+	if (error) {
+		g_warning("%s", error->message);
+		g_clear_error(&error);
+	}
+	else {
+		debug_print("test.vcf:\n%s\n", vcard);
+		g_free(vcard);
+	}
+	
+	return FALSE;
+}
+
+void addressbook_install_hooks(GError** error) {
+	if ((guint)-1 == hooks_register_hook(
+			COMPOSE_CREATED_HOOKLIST, my_compose_create_hook, NULL)) {
+		g_warning("Could not register hook for adding vCards\n");
+		if (error) {
+			g_set_error(error, client_object_error_quark(), 1,
+				"Could not register hook for adding vCards");
+		}
+	}
+}

Index: procmsg.h
===================================================================
RCS file: /home/claws-mail/claws/src/procmsg.h,v
retrieving revision 1.60.2.56.2.1
retrieving revision 1.60.2.56.2.2
diff -u -d -r1.60.2.56.2.1 -r1.60.2.56.2.2
--- procmsg.h	29 Nov 2011 00:15:23 -0000	1.60.2.56.2.1
+++ procmsg.h	5 Feb 2012 22:11:11 -0000	1.60.2.56.2.2
@@ -174,7 +174,8 @@
 
 typedef enum {
 	MSGINFO_UPDATE_FLAGS = 1 << 0,
-	MSGINFO_UPDATE_DELETED = 1 << 1
+	MSGINFO_UPDATE_DELETED = 1 << 1,
+	MSGINFO_UPDATE_ADDED = 1 << 2
 } MsgInfoUpdateFlags;
 
 #include "procmime.h"
@@ -400,4 +401,6 @@
 void procmsg_msginfo_update_tags(MsgInfo *msginfo, gboolean set, gint id);
 void procmsg_msginfo_clear_tags(MsgInfo *msginfo);
 void procmsg_msginfo_commit_tags(GSList *msglist);
+MsgInfo *procmsg_get_msginfo_from_identifier(const gchar *id);
+gchar *procmsg_msginfo_get_identifier(MsgInfo *msginfo);
 #endif /* __PROCMSG_H__ */

Index: folder.c
===================================================================
RCS file: /home/claws-mail/claws/src/folder.c,v
retrieving revision 1.213.2.202.2.1
retrieving revision 1.213.2.202.2.2
diff -u -d -r1.213.2.202.2.1 -r1.213.2.202.2.2
--- folder.c	29 Nov 2011 00:15:20 -0000	1.213.2.202.2.1
+++ folder.c	5 Feb 2012 22:11:10 -0000	1.213.2.202.2.2
@@ -3066,6 +3066,8 @@
 
 static void add_msginfo_to_cache(FolderItem *item, MsgInfo *newmsginfo, MsgInfo *flagsource)
 {
+	MsgInfoUpdate msginfo_update;
+
 	/* update folder stats */
 	if (MSG_IS_NEW(newmsginfo->flags))
 		item->new_msgs++;
@@ -3092,6 +3094,10 @@
 	if (!item->cache)
 		folder_item_read_cache(item);
 
+	msginfo_update.msginfo = newmsginfo;
+	msginfo_update.flags = MSGINFO_UPDATE_ADDED;
+	hooks_invoke(MSGINFO_UPDATE_HOOKLIST, &msginfo_update);
+
 	msgcache_add_msg(item->cache, newmsginfo);
 	copy_msginfo_flags(flagsource, newmsginfo);
 	folder_item_update_with_msg(item,  F_ITEM_UPDATE_MSGCNT | F_ITEM_UPDATE_CONTENT | F_ITEM_UPDATE_ADDMSG, newmsginfo);

Index: compose.c
===================================================================
RCS file: /home/claws-mail/claws/src/compose.c,v
retrieving revision 1.382.2.580.2.4
retrieving revision 1.382.2.580.2.5
diff -u -d -r1.382.2.580.2.4 -r1.382.2.580.2.5
--- compose.c	1 Jan 2012 10:30:59 -0000	1.382.2.580.2.4
+++ compose.c	5 Feb 2012 22:11:10 -0000	1.382.2.580.2.5
@@ -5015,7 +5015,7 @@
 	compose_allow_user_actions (compose, FALSE);
 	compose->sending = TRUE;
 
-	if (compose_check_entries(compose, TRUE) == FALSE) {
+	if ((compose, TRUE) == FALSE) {
 		if (compose->batch) {
 			gtk_widget_show_all(compose->window);
 		}

Index: mutt.c
===================================================================
RCS file: /home/claws-mail/claws/src/mutt.c,v
retrieving revision 1.6.10.18.2.1
retrieving revision 1.6.10.18.2.2
diff -u -d -r1.6.10.18.2.1 -r1.6.10.18.2.2
--- mutt.c	29 Nov 2011 00:15:21 -0000	1.6.10.18.2.1
+++ mutt.c	5 Feb 2012 22:11:11 -0000	1.6.10.18.2.2
@@ -533,7 +533,7 @@
 */
 gchar *mutt_find_file( void ) {
 	const gchar *homedir;
-	gchar str[ WORK_BUFLEN ];
+	gchar str[ WORK_BUFLEN + 1 ];
 	gint len;
 	FILE *fp;
 
@@ -548,7 +548,7 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strncat( str, MUTT_HOME_FILE, WORK_BUFLEN );
+	strncat( str, MUTT_HOME_FILE, WORK_BUFLEN - strlen(str) );
 
 	/* Attempt to open */
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: procmsg.c
===================================================================
RCS file: /home/claws-mail/claws/src/procmsg.c,v
retrieving revision 1.150.2.117.2.2
retrieving revision 1.150.2.117.2.3
diff -u -d -r1.150.2.117.2.2 -r1.150.2.117.2.3
--- procmsg.c	16 Dec 2011 15:49:07 -0000	1.150.2.117.2.2
+++ procmsg.c	5 Feb 2012 22:11:11 -0000	1.150.2.117.2.3
@@ -756,6 +756,52 @@
 	return mailac;
 }
 
+gchar *procmsg_msginfo_get_identifier(MsgInfo *msginfo)
+{
+	gchar *folder_id;
+	const gchar *msgid;
+	gchar *id;
+
+	cm_return_val_if_fail(msginfo != NULL, NULL);
+	folder_id = folder_item_get_identifier(msginfo->folder);
+	msgid = msginfo->msgid;
+
+	id = g_strconcat(folder_id, G_DIR_SEPARATOR_S, msgid, NULL);
+
+	g_free(folder_id);
+
+	return id;
+}
+
+MsgInfo *procmsg_get_msginfo_from_identifier(const gchar *id)
+{
+	gchar *folder_id = g_strdup(id);
+	gchar *separator = strrchr(folder_id, G_DIR_SEPARATOR);
+	const gchar *msgid;
+	FolderItem *item;
+	MsgInfo *msginfo;
+
+	if (separator == NULL) {
+		g_free(folder_id);
+		return NULL;
+	}
+
+	*separator = '\0';
+	msgid = separator + 1;
+
+	item = folder_find_item_from_identifier(folder_id);
+
+	if (item == NULL) {
+		g_free(folder_id);
+		return NULL;
+	}
+
+	msginfo = folder_item_get_msginfo_by_msgid(item, msgid);
+	g_free(folder_id);
+
+	return msginfo;
+}
+
 static GSList *procmsg_list_sort_by_account(FolderItem *queue, GSList *list)
 {
 	GSList *result = NULL;
@@ -1147,7 +1193,8 @@
 	g_free(prtmp);
 
 	g_strchomp(buf);
-	if (buf[strlen(buf) - 1] != '&') strncat(buf, "&", sizeof(buf));
+	if (buf[strlen(buf) - 1] != '&')
+		strncat(buf, "&", sizeof(buf) - strlen(buf) - 1);
 	if (system(buf) == -1)
 		g_warning("system(%s) failed.", buf);
 }

Index: send_message.c
===================================================================
RCS file: /home/claws-mail/claws/src/send_message.c,v
retrieving revision 1.17.2.60.2.1
retrieving revision 1.17.2.60.2.2
diff -u -d -r1.17.2.60.2.1 -r1.17.2.60.2.2
--- send_message.c	29 Nov 2011 00:15:23 -0000	1.17.2.60.2.1
+++ send_message.c	5 Feb 2012 22:11:11 -0000	1.17.2.60.2.2
@@ -47,6 +47,7 @@
 #include "inputdialog.h"
 #include "alertpanel.h"
 #include "manage_window.h"
+#include "logwindow.h"
 #include "socket.h"
 #include "utils.h"
 #include "gtkutils.h"
@@ -76,6 +77,8 @@
 static SendProgressDialog *send_progress_dialog_create(void);
 static void send_progress_dialog_destroy(SendProgressDialog *dialog);
 
+static void send_showlog_button_cb	(GtkWidget	*widget,
+					 gpointer	 data);
 static void send_cancel_button_cb	(GtkWidget	*widget,
 					 gpointer	 data);
 
@@ -556,6 +559,8 @@
 	progress = progress_dialog_create();
 	gtk_window_set_title(GTK_WINDOW(progress->window),
 			     _("Sending message"));
+	g_signal_connect(G_OBJECT(progress->showlog_btn), "clicked",
+			 G_CALLBACK(send_showlog_button_cb), dialog);
 	g_signal_connect(G_OBJECT(progress->cancel_btn), "clicked",
 			 G_CALLBACK(send_cancel_button_cb), dialog);
 	g_signal_connect(G_OBJECT(progress->window), "delete_event",
@@ -595,6 +600,13 @@
 	g_free(dialog);
 }
 
+static void send_showlog_button_cb(GtkWidget *widget, gpointer data)
+{
+	MainWindow *mainwin = mainwindow_get_mainwindow();
+
+	log_window_show(mainwin->logwin);
+}
+
 static void send_cancel_button_cb(GtkWidget *widget, gpointer data)
 {
 	SendProgressDialog *dialog = (SendProgressDialog *)data;

Index: claws-contacts.xml
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/claws-contacts.xml,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -d -r1.1.2.1 -r1.1.2.2
--- claws-contacts.xml	7 Sep 2011 15:52:25 -0000	1.1.2.1
+++ claws-contacts.xml	5 Feb 2012 22:11:10 -0000	1.1.2.2
@@ -40,12 +40,16 @@
 	    <arg type="a(sss)" name="contact_emails" direction="in" />
     </method>
 
-<!--
-    <method name="AddContact1">
+    <method name="AddVCard">
+        <!-- if addressbook is NULL add to default address book -->
         <arg type="s" name="addressbook" direction="in" /> 
-	    <arg type="(a{ss}a(sss))" name="contact" direction="in" />
+	    <arg type="s" name="vcard" direction="in" />
+    </method>
+
+    <method name="GetVCard">
+        <arg type="s" name="acount" direction="in" /> 
+	    <arg type="s" name="vcard" direction="out" />
     </method>
--->
 
     <signal name="ContactMailTo">
 		<arg type="s" name="contact_add_to" direction="out" />

Index: prefs_common.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.h,v
retrieving revision 1.103.2.133.2.1
retrieving revision 1.103.2.133.2.2
diff -u -d -r1.103.2.133.2.1 -r1.103.2.133.2.2
--- prefs_common.h	29 Nov 2011 00:15:22 -0000	1.103.2.133.2.1
+++ prefs_common.h	5 Feb 2012 22:11:11 -0000	1.103.2.133.2.2
@@ -519,6 +519,7 @@
 	gboolean inherit_folder_props;
 	gboolean flush_metadata;
 
+	gint nav_history_length;
 };
 
 extern PrefsCommon prefs_common;

Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.239.2.4
retrieving revision 1.115.2.239.2.5
diff -u -d -r1.115.2.239.2.4 -r1.115.2.239.2.5
--- main.c	7 Jan 2012 02:38:22 -0000	1.115.2.239.2.4
+++ main.c	5 Feb 2012 22:11:11 -0000	1.115.2.239.2.5
@@ -1327,6 +1327,9 @@
 		g_warning("%s", error->message);
 		g_clear_error(&error);
 	}
+	else {
+		addressbook_install_hooks(&error);
+	}
 #endif
 	gtkut_widget_init();
 	stock_pixbuf_gdk(NULL, STOCK_PIXMAP_CLAWS_MAIL_ICON, &icon);
@@ -2567,7 +2570,7 @@
 		if (folder_name)
 			folderItem = folder_find_item_from_identifier(folder_name);
 		if (folder_name && folderItem == NULL) {
-			debug_print("Unknow folder item : '%s', searching folder\n",folder_name);
+			debug_print("Unknown folder item : '%s', searching folder\n",folder_name);
 			Folder* folder = folder_find_from_path(folder_name);
 			if (folder != NULL)
 				folderItem = FOLDER_ITEM(folder->node->data);

Index: folderview.c
===================================================================
RCS file: /home/claws-mail/claws/src/folderview.c,v
retrieving revision 1.207.2.220.2.1
retrieving revision 1.207.2.220.2.2
diff -u -d -r1.207.2.220.2.1 -r1.207.2.220.2.2
--- folderview.c	29 Nov 2011 00:15:20 -0000	1.207.2.220.2.1
+++ folderview.c	5 Feb 2012 22:11:10 -0000	1.207.2.220.2.2
@@ -2080,7 +2080,7 @@
 		olditem = gtk_cmctree_node_get_row_data(GTK_CMCTREE(folderview->ctree), 
 						      folderview->opened);
 		if (olditem) {
-			gchar *buf = g_strdup_printf(_("Closing Folder %s..."), 
+			gchar *buf = g_strdup_printf(_("Closing folder %s..."), 
 				olditem->path ? olditem->path:olditem->name);
 			/* will be null if we just moved the previously opened folder */
 			STATUSBAR_PUSH(folderview->mainwin, buf);
@@ -2175,7 +2175,7 @@
 
 	/* Open Folder */
 	/* TODO: wwp: avoid displaying (null) in the status bar */
-    	buf = g_strdup_printf(_("Opening Folder %s..."), item->path ? 
+    	buf = g_strdup_printf(_("Opening folder %s..."), item->path ? 
 					item->path : "(null)");
 	debug_print("%s\n", buf);
 	STATUSBAR_PUSH(folderview->mainwin, buf);

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.328.2.4
retrieving revision 1.274.2.328.2.5
diff -u -d -r1.274.2.328.2.4 -r1.274.2.328.2.5
--- mainwindow.c	11 Jan 2012 22:40:46 -0000	1.274.2.328.2.4
+++ mainwindow.c	5 Feb 2012 22:11:11 -0000	1.274.2.328.2.5
@@ -310,7 +310,9 @@
 				  gpointer	 data);
 static void next_labeled_cb	 (GtkAction	*action,
 				  gpointer	 data);
-static void last_read_cb	 (GtkAction	*action,
+static void prev_history_cb	 (GtkAction	*action,
+				  gpointer	 data);
+static void next_history_cb	 (GtkAction	*action,
 				  gpointer	 data);
 static void parent_cb		 (GtkAction	*action,
 				  gpointer	 data);
@@ -561,7 +563,9 @@
 	{"View/Goto/PrevLabeled",		NULL, N_("Previous _labeled message"), NULL, NULL, G_CALLBACK(prev_labeled_cb) },
 	{"View/Goto/NextLabeled",		NULL, N_("Next la_beled message"), NULL, NULL, G_CALLBACK(next_labeled_cb) },
 	/* {"View/Goto/---",			NULL, "---", NULL, NULL, NULL }, */
-	{"View/Goto/LastRead",			NULL, N_("Last read message"), NULL, NULL, G_CALLBACK(last_read_cb) },
+	{"View/Goto/PrevHistory",		NULL, N_("Previous opened message"), "<alt>Left", NULL, G_CALLBACK(prev_history_cb) },
+	{"View/Goto/NextHistory",		NULL, N_("Next opened message"), "<alt>Right", NULL, G_CALLBACK(next_history_cb) },
+	/* {"View/Goto/---",			NULL, "---", NULL, NULL, NULL }, */
 	{"View/Goto/ParentMessage",		NULL, N_("Parent message"), "<control>Up", NULL, G_CALLBACK(parent_cb) },
 	/* {"View/Goto/---",			NULL, "---", NULL, NULL, NULL }, */
 	{"View/Goto/NextUnreadFolder",		NULL, N_("Next unread _folder"), "<shift>G", NULL, G_CALLBACK(goto_unread_folder_cb) },
@@ -1024,7 +1028,6 @@
 	for (; sel != NULL; sel = sel->next) {
 		MsgInfo *msginfo;
 		GSList *tags = NULL;
-		gint id;
 		GtkCheckMenuItem *item;
 		msginfo = (MsgInfo *)sel->data;
 		sel_len++;
@@ -1035,7 +1038,6 @@
 
 			for (; tags; tags = tags->next) {
 				gint num_checked = GPOINTER_TO_INT(g_hash_table_lookup(menu_allsel_table, tags->data));
-				id = GPOINTER_TO_INT(tags->data);
 				item = g_hash_table_lookup(menu_table, GINT_TO_POINTER(tags->data));
 				if (item && !gtk_check_menu_item_get_active(item)) {
 					gtk_check_menu_item_set_active
@@ -1746,9 +1748,11 @@
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevLabeled", "View/Goto/PrevLabeled", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextLabeled", "View/Goto/NextLabeled", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator5", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
-	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "LastRead", "View/Goto/LastRead", GTK_UI_MANAGER_MENUITEM)
-	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevHistory", "View/Goto/PrevHistory", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextHistory", "View/Goto/NextHistory", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator6", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator7", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextUnreadFolder", "View/Goto/NextUnreadFolder", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "OtherFolder", "View/Goto/OtherFolder", GTK_UI_MANAGER_MENUITEM)
         MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Scroll", "View/Scroll", GTK_UI_MANAGER_MENU)
@@ -3242,7 +3246,6 @@
 		{"Menu/View/Goto/PrevMarked" , M_MSG_EXIST},
 		{"Menu/View/Goto/PrevLabeled", M_MSG_EXIST},
 		{"Menu/View/Goto/NextLabeled", M_MSG_EXIST},
-		{"Menu/View/Goto/LastRead"   , M_SINGLE_TARGET_EXIST},
 		{"Menu/View/Goto/ParentMessage"      , M_SINGLE_TARGET_EXIST},
 		{"Menu/View/OpenNewWindow"        , M_SINGLE_TARGET_EXIST},
 		{"Menu/View/MessageSource"            , M_SINGLE_TARGET_EXIST},
@@ -3406,7 +3409,12 @@
 		cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", FALSE);
 	if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_threads)
 		cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadMessages", FALSE);
-		
+
+	cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/Goto/PrevHistory",
+		messageview_nav_has_prev(mainwin->messageview));
+	cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/Goto/NextHistory",
+		messageview_nav_has_next(mainwin->messageview));
+
 	main_window_menu_callback_unblock(mainwin);
 }
 
@@ -3723,8 +3731,8 @@
 
 		if (messageview_is_visible(mainwin->messageview)) {
 			gtk_paned_add2(GTK_PANED(hpaned), vpaned);
-			gtk_paned_add1(GTK_PANED(vpaned),
-				       GTK_WIDGET_PTR(mainwin->summaryview));
+			gtk_paned_pack1(GTK_PANED(vpaned),
+				       GTK_WIDGET_PTR(mainwin->summaryview), TRUE, TRUE);
 		} else {
 			gtk_paned_add2(GTK_PANED(hpaned),
 				       GTK_WIDGET_PTR(mainwin->summaryview));
@@ -3902,7 +3910,7 @@
 {
 	while (mainwin_list != NULL) {
 		MainWindow *mainwin = (MainWindow*)mainwin_list->data;
-		
+
 		/* free toolbar stuff */
 		toolbar_clear_list(TOOLBAR_MAIN);
 		TOOLBAR_DESTROY_ACTIONS(mainwin->toolbar->action_list);
@@ -4835,10 +4843,33 @@
 	summary_select_next_labeled(mainwin->summaryview);
 }
 
-static void last_read_cb(GtkAction *action, gpointer data)
+static void prev_history_cb(GtkAction *action, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
-	summary_select_last_read(mainwin->summaryview);
+	MsgInfo *info = messageview_nav_get_prev(mainwin->messageview);
+	if (info) {
+		if (info->folder != mainwin->summaryview->folder_item)
+			folderview_select(mainwin->folderview, info->folder);
+		summary_display_by_msgnum(mainwin->summaryview, info->msgnum);
+		summary_display_msg_selected(mainwin->summaryview, FALSE);
+		procmsg_msginfo_free(info);
+		main_window_set_menu_sensitive(mainwindow_get_mainwindow());
+		toolbar_main_set_sensitive(mainwindow_get_mainwindow());
+	}
+}
+
+static void next_history_cb(GtkAction *action, gpointer data)
+{
+	MainWindow *mainwin = (MainWindow *)data;
+	MsgInfo *info = messageview_nav_get_next(mainwin->messageview);
+	if (info) {
+		if (info->folder != mainwin->summaryview->folder_item)
+			folderview_select(mainwin->folderview, info->folder);
+		summary_display_by_msgnum(mainwin->summaryview, info->msgnum);
+		procmsg_msginfo_free(info);
+		main_window_set_menu_sensitive(mainwindow_get_mainwindow());
+		toolbar_main_set_sensitive(mainwindow_get_mainwindow());
+	}
 }
 
 static void parent_cb(GtkAction *action, gpointer data)

Index: procmime.c
===================================================================
RCS file: /home/claws-mail/claws/src/procmime.c,v
retrieving revision 1.49.2.140
retrieving revision 1.49.2.140.2.1
diff -u -d -r1.49.2.140 -r1.49.2.140.2.1
--- procmime.c	8 Apr 2011 16:06:18 -0000	1.49.2.140
+++ procmime.c	5 Feb 2012 22:11:11 -0000	1.49.2.140.2.1
@@ -1701,15 +1701,15 @@
 			tmp[0] = '\0';
 
 			if ((tmp[1] == '0') && (tmp[2] == '\0') && 
-			    (g_slist_find_custom(concatlist, down_attr, g_str_equal) == NULL))
+			    (g_slist_find_custom(concatlist, down_attr, g_strcmp0) == NULL))
 				concatlist = g_slist_prepend(concatlist, g_strdup(tmpattr));
 
-			if (convert && (g_slist_find_custom(convlist, down_attr, g_str_equal) == NULL))
+			if (convert && (g_slist_find_custom(convlist, down_attr, g_strcmp0) == NULL))
 				convlist = g_slist_prepend(convlist, g_strdup(tmpattr));
 
 			g_free(tmpattr);
 		} else if (convert) {
-			if (g_slist_find_custom(convlist, down_attr, g_str_equal) == NULL)
+			if (g_slist_find_custom(convlist, down_attr, g_strcmp0) == NULL)
 				convlist = g_slist_prepend(convlist, g_strdup(down_attr));
 		}
 

Index: jpilot.c
===================================================================
RCS file: /home/claws-mail/claws/src/jpilot.c,v
retrieving revision 1.18.2.32.2.1
retrieving revision 1.18.2.32.2.2
diff -u -d -r1.18.2.32.2.1 -r1.18.2.32.2.2
--- jpilot.c	29 Nov 2011 00:15:21 -0000	1.18.2.32.2.1
+++ jpilot.c	5 Feb 2012 22:11:10 -0000	1.18.2.32.2.2
@@ -1595,7 +1595,7 @@
  */
 gchar *jpilot_find_pilotdb( void ) {
 	const gchar *homedir;
-	gchar str[ WORK_BUFLEN ];
+	gchar str[ WORK_BUFLEN + 1 ];
 	gint len;
 	FILE *fp;
 
@@ -1610,9 +1610,9 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strncat( str, JPILOT_DBHOME_DIR, WORK_BUFLEN );
-	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN );
-	strncat( str, JPILOT_DBHOME_FILE, WORK_BUFLEN );
+	strncat( str, JPILOT_DBHOME_DIR, WORK_BUFLEN - strlen(str) );
+	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN - strlen(str) );
+	strncat( str, JPILOT_DBHOME_FILE, WORK_BUFLEN - strlen(str) );
 
 	/* Attempt to open */
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {



More information about the Commits mailing list