CVS: sylpheed-claws/src folder.c,1.213.2.91,1.213.2.92 mainwindow.c,1.274.2.108,1.274.2.109 mainwindow.h,1.39.2.16,1.39.2.17 messageview.c,1.94.2.82,1.94.2.83 prefs_spelling.c,1.5.2.23,1.5.2.24 procheader.c,1.47.2.28,1.47.2.29 procmsg.c,1.150.2.61,1.150.2.62 procmsg.h,1.60.2.27,1.60.2.28 summaryview.c,1.395.2.194,1.395.2.195 toolbar.c,1.43.2.43,1.43.2.44 toolbar.h,1.19.2.10,1.19.2.11

Colin Leroy <[email protected]>
Newsgroups gmane.mail.sylpheed.claws.cvs
Message-ID <[email protected]>
Update of /cvsroot/sylpheed-claws/sylpheed-claws/src
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22830/src

Modified Files:
      Tag: gtk2
	folder.c mainwindow.c mainwindow.h messageview.c 
	prefs_spelling.c procheader.c procmsg.c procmsg.h 
	summaryview.c toolbar.c toolbar.h 
Log Message:
2006-05-12 [colin]	2.2.0cvs3

	* src/folder.c
	* src/mainwindow.c
	* src/mainwindow.h
	* src/messageview.c
	* src/prefs_spelling.c
	* src/procheader.c
	* src/procmsg.c
	* src/procmsg.h
	* src/summaryview.c
	* src/toolbar.c
	* src/toolbar.h
		Add contextual menu on Compose toolbar
                button. Fixes bug #944 (Automatic
                addresses not applied when changing account
                from compose window)
                add Mailing List support
                based on the old 0.6.5claws25 patch by
                Melvin Hadasht, with finishing touches
                by Colin
                Fix "ignore thread" when mails are threaded by
                subject (and weren't ignored although appearing
                in the thread).
                GUI rework.
                Both patches by Pawel.

Index: folder.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/folder.c,v
retrieving revision 1.213.2.91
retrieving revision 1.213.2.92
diff -u -r1.213.2.91 -r1.213.2.92
--- folder.c	25 Apr 2006 22:39:56 -0000	1.213.2.91
+++ folder.c	12 May 2006 17:42:48 -0000	1.213.2.92
@@ -1672,7 +1672,8 @@
 	guint markedcnt = 0, unreadmarkedcnt = 0;
 	guint cache_max_num, folder_max_num, cache_cur_num, folder_cur_num;
 	gboolean update_flags = 0, old_uids_valid = FALSE;
-    
+	GHashTable *subject_table = NULL;
+	
 	g_return_val_if_fail(item != NULL, -1);
 	if (item->path == NULL) return -1;
 
@@ -1682,13 +1683,17 @@
 	g_return_val_if_fail(folder->klass->get_num_list != NULL, -1);
 
 	debug_print("Scanning folder %s for cache changes.\n", item->path ? item->path : "(null)");
-
+	
 	/* Get list of messages for folder and cache */
 	if (folder->klass->get_num_list(item->folder, item, &folder_list, &old_uids_valid) < 0) {
 		debug_print("Error fetching list of message numbers\n");
 		return(-1);
 	}
 
+	if(prefs_common.thread_by_subject) {
+		subject_table = g_hash_table_new(g_str_hash, g_str_equal);
+	}
+	
 	if (old_uids_valid) {
 		if (!item->cache)
 			folder_item_read_cache(item);
@@ -1808,9 +1813,16 @@
 				procmsg_msginfo_free(msginfo);
 
 				debug_print("Remembering message %d to update...\n", folder_cur_num);
-			} else
+			} else {
 				exists_list = g_slist_prepend(exists_list, msginfo);
 
+				if(prefs_common.thread_by_subject &&
+					MSG_IS_IGNORE_THREAD(msginfo->flags) &&
+					!subject_table_lookup(subject_table, msginfo->subject)) {
+					subject_table_insert(subject_table, msginfo->subject, msginfo);
+				}
+			}
+			
 			/* Move to next folder and cache number */
 			cache_list_cur = cache_list_cur->next;
 			folder_list_cur = folder_list_cur->next;
@@ -1869,8 +1881,15 @@
 			    (item->folder->account->filter_on_recv) &&
 			    procmsg_msginfo_filter(msginfo))
 				to_filter = g_slist_prepend(to_filter, msginfo);
-			else
+			else {
 				exists_list = g_slist_prepend(exists_list, msginfo);
+				
+				if(prefs_common.thread_by_subject &&
+					MSG_IS_IGNORE_THREAD(msginfo->flags) &&
+					!subject_table_lookup(subject_table, msginfo->subject)) {
+					subject_table_insert(subject_table, msginfo->subject, msginfo);
+				}
+			}
 		}
 		filtering_move_and_copy_msgs(to_filter);
 		for (elem = to_filter; elem; elem = g_slist_next(elem)) {
@@ -1888,7 +1907,7 @@
 
 	folder_item_set_batch(item, TRUE);
 	for (elem = exists_list; elem != NULL; elem = g_slist_next(elem)) {
-		MsgInfo *msginfo;
+		MsgInfo *msginfo, *parent_msginfo;
 
 		msginfo = elem->data;
 		if (MSG_IS_IGNORE_THREAD(msginfo->flags) && (MSG_IS_NEW(msginfo->flags) || MSG_IS_UNREAD(msginfo->flags)))
@@ -1896,6 +1915,15 @@
 		if (!MSG_IS_IGNORE_THREAD(msginfo->flags) && procmsg_msg_has_flagged_parent(msginfo, MSG_IGNORE_THREAD)) {
 			procmsg_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0, MSG_NEW | MSG_UNREAD, 0);
 		}
+		if(prefs_common.thread_by_subject && !msginfo->inreplyto &&
+			!msginfo->references && !MSG_IS_IGNORE_THREAD(msginfo->flags) &&
+			(parent_msginfo = subject_table_lookup(subject_table, msginfo->subject)))
+		{
+			if(MSG_IS_IGNORE_THREAD(parent_msginfo->flags)) {
+				procmsg_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0,
+						MSG_NEW | MSG_UNREAD, 0);
+			}
+		}
 		if ((folder_has_parent_of_type(item, F_OUTBOX) ||
 		     folder_has_parent_of_type(item, F_QUEUE)  ||
 		     folder_has_parent_of_type(item, F_DRAFT)  ||
@@ -1917,7 +1945,11 @@
 	}
 	folder_item_set_batch(item, FALSE);
 	g_slist_free(exists_list);
-
+	
+	if(prefs_common.thread_by_subject) {
+		g_hash_table_destroy(subject_table);
+	}
+	
 	item->new_msgs = newcnt;
 	item->unread_msgs = unreadcnt;
 	item->total_msgs = totalcnt;
@@ -1928,7 +1960,7 @@
 
 	folder_item_update(item, update_flags);
 	folder_item_update_thaw();
-
+	
 	return 0;
 }
 

Index: mainwindow.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/mainwindow.c,v
retrieving revision 1.274.2.108
retrieving revision 1.274.2.109
diff -u -r1.274.2.108 -r1.274.2.109
--- mainwindow.c	21 Apr 2006 16:52:18 -0000	1.274.2.108
+++ mainwindow.c	12 May 2006 17:42:48 -0000	1.274.2.109
@@ -402,6 +402,8 @@
 					  gpointer	 data);
 static void account_receive_menu_cb	 (GtkMenuItem	*menuitem,
 					  gpointer	 data);
+static void account_compose_menu_cb	 (GtkMenuItem	*menuitem,
+					  gpointer	 data);
 
 static void prefs_open_cb	(GtkMenuItem	*menuitem,
 				 gpointer 	 data);
@@ -443,6 +445,17 @@
 						 GtkWidget 	*widget);
 gboolean mainwindow_progressindicator_hook	(gpointer 	 source,
 						 gpointer 	 userdata);
+
+static gint mailing_list_create_submenu(GtkItemFactory *ifactory,
+				       MsgInfo *msginfo);
+
+static gint mailing_list_populate_submenu(GtkWidget *menu, const gchar * list_header);
+	
+static void get_url_part(const gchar **buf, gchar *url_decoded, gint maxlen);
+
+static void mailing_list_compose(GtkWidget *w, gpointer *data);
+ 
+static void mailing_list_open_uri(GtkWidget *w, gpointer *data);
 #define  SEPARATE_ACTION 500 
 static void mainwindow_quicksearch		(MainWindow 	*mainwin, 
 						 guint 		 action, 
@@ -708,6 +721,15 @@
 	{N_("/_Message/_Forward"),		"<control><alt>F", main_window_reply_cb, COMPOSE_FORWARD_INLINE, NULL},
 	{N_("/_Message/For_ward as attachment"),	NULL, main_window_reply_cb, COMPOSE_FORWARD_AS_ATTACH, NULL},
 	{N_("/_Message/Redirect"),		NULL, main_window_reply_cb, COMPOSE_REDIRECT, NULL},
+
+	{N_("/_Message/Mailing-_List"),			NULL, NULL, 0, "<Branch>"},
+	{N_("/_Message/Mailing-_List/Post"),		NULL, NULL, 0, "<Branch>"},
+	{N_("/_Message/Mailing-_List/Help"),		NULL, NULL, 0, "<Branch>"},
+ 	{N_("/_Message/Mailing-_List/Subscribe"),	NULL, NULL, 0, "<Branch>"},
+ 	{N_("/_Message/Mailing-_List/Unsubscribe"),	NULL, NULL, 0, "<Branch>"},
+	{N_("/_Message/Mailing-_List/View archive"),	NULL, NULL, 0, "<Branch>"},
+ 	{N_("/_Message/Mailing-_List/Contact owner"),	NULL, NULL, 0, "<Branch>"},
+ 	
 	{N_("/_Message/---"),			NULL, NULL, 0, "<Separator>"},
 	{N_("/_Message/M_ove..."),		"<control>O", move_to_cb, 0, NULL},
 	{N_("/_Message/_Copy..."),		"<shift><control>O", copy_to_cb, 0, NULL},
@@ -1052,6 +1074,9 @@
 	gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0);
 	ifactory = gtk_item_factory_from_widget(menubar);
 
+/*	gtk_widget_show(gtk_item_factory_get_item(ifactory,"/Message/Mailing-List"));
+	main_create_mailing_list_menu (mainwin, NULL); */
+
 	menu_set_sensitive(ifactory, "/Help/Manual", manual_available(MANUAL_MANUAL_LOCAL));
 
 	if (prefs_common.toolbar_detachable) {
@@ -1260,6 +1285,8 @@
 	/* create actions menu */
 	main_window_update_actions_menu(mainwin);
 
+	main_create_mailing_list_menu (mainwin, NULL);
+
 	/* attach accel groups to main window */
 #define	ADD_MENU_ACCEL_GROUP_TO_WINDOW(menu,win)			\
 	gtk_window_add_accel_group					\
@@ -1596,6 +1623,42 @@
 	}
 }
 
+static void main_window_set_toolbar_combo_compose_menu(MainWindow *mainwin,
+						       GList *account_list)
+{
+	GList *cur_ac, *cur_item;
+	GtkWidget *menuitem;
+	PrefsAccount *ac_prefs;
+	GtkWidget *menu = NULL;
+
+	if (mainwin->toolbar->compose_mail_btn == NULL
+	||  mainwin->toolbar->compose_combo == NULL) /* button doesn't exist */
+		return;
+
+	menu = mainwin->toolbar->compose_combo->menu;
+
+	/* destroy all previous menu item */
+	cur_item = GTK_MENU_SHELL(menu)->children;
+	while (cur_item != NULL) {
+		GList *next = cur_item->next;
+		gtk_widget_destroy(GTK_WIDGET(cur_item->data));
+		cur_item = next;
+	}
+
+	for (cur_ac = account_list; cur_ac != NULL; cur_ac = cur_ac->next) {
+		ac_prefs = (PrefsAccount *)cur_ac->data;
+
+		menuitem = gtk_menu_item_new_with_label
+			(ac_prefs->account_name
+			 ? ac_prefs->account_name : _("Untitled"));
+		gtk_widget_show(menuitem);
+		gtk_menu_append(GTK_MENU(menu), menuitem);
+		g_signal_connect(G_OBJECT(menuitem), "activate",
+				 G_CALLBACK(account_compose_menu_cb),
+				 ac_prefs);
+	}
+}
+
 void main_window_set_account_menu(GList *account_list)
 {
 	GList *cur;
@@ -1606,6 +1669,7 @@
 		main_window_set_account_selector_menu(mainwin, account_list);
 		main_window_set_account_receive_menu(mainwin, account_list);
 		main_window_set_toolbar_combo_receive_menu(mainwin, account_list);
+		main_window_set_toolbar_combo_compose_menu(mainwin, account_list);
 	}
 }
 
@@ -1617,6 +1681,7 @@
 	for (cur = mainwin_list; cur != NULL; cur = cur->next) {
 		mainwin = (MainWindow *)cur->data;
 		main_window_set_toolbar_combo_receive_menu(mainwin, account_list);
+		main_window_set_toolbar_combo_compose_menu(mainwin, account_list);
 	}
 }
 
@@ -2187,6 +2252,178 @@
 	main_window_menu_callback_unblock(mainwin);
 }
 
+void main_create_mailing_list_menu (MainWindow *mainwin, MsgInfo *msginfo)
+{
+	GtkItemFactory *ifactory;
+	gint is_menu = 0;
+	ifactory = gtk_item_factory_from_widget(mainwin->menubar);
+	
+	if (msginfo) 
+		is_menu = mailing_list_create_submenu (ifactory, msginfo);
+	if (is_menu)
+		gtk_widget_set_sensitive (gtk_item_factory_get_item
+				(ifactory,"/Message/Mailing-List"), TRUE);
+	else
+		gtk_widget_set_sensitive (gtk_item_factory_get_item
+				(ifactory,"/Message/Mailing-List"), FALSE);
+}
+
+static gint mailing_list_create_submenu (GtkItemFactory *ifactory, MsgInfo *msginfo)
+{
+	gint menu_nb = 0;
+	GtkWidget *menuitem;
+
+	/* Mailing list post */
+	if (msginfo && !strcmp2 (msginfo->list_post, "NO")) {
+		msginfo->list_post = g_strdup (_("No posting allowed"));
+ 	}
+ 	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/Post");
+ 		
+ 	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_post);
+ 
+ 	/* Mailing list help */
+	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/Help");
+	
+	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_help);
+
+	/* Mailing list subscribe */
+	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/Subscribe");
+	
+	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_subscribe);
+		
+	/* Mailing list unsubscribe */
+	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/Unsubscribe");
+	
+	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_unsubscribe);
+	
+	/* Mailing list view archive */
+	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/View archive");
+	
+	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_archive);
+	
+	/* Mailing list contact owner */
+	menuitem = gtk_item_factory_get_item (ifactory, "/Message/Mailing-List/Contact owner");
+	
+	menu_nb += mailing_list_populate_submenu (menuitem, msginfo->list_owner);
+	
+	return menu_nb;
+}
+
+static gint mailing_list_populate_submenu (GtkWidget *menuitem, const gchar * list_header)
+{
+	GtkWidget *item, *menu;
+	const gchar *url_pt ;
+	gchar url_decoded[BUFFSIZE];
+	GList *amenu, *alist;
+	gint menu_nb = 0;
+	
+	menu = GTK_WIDGET(GTK_MENU_ITEM(menuitem)->submenu);
+	
+	/* First delete old submenu */
+	/* FIXME: we can optimize this, and only change/add/delete necessary items */
+	for (amenu = (GTK_MENU_SHELL(menu)->children) ; amenu; ) {
+		alist = amenu->next;
+		item = GTK_WIDGET (amenu->data);
+		gtk_widget_destroy (item);
+		amenu = alist;
+	}
+	if (list_header) {
+		for (url_pt = list_header; url_pt && *url_pt;) {
+			get_url_part (&url_pt, url_decoded, BUFFSIZE);
+			item = NULL;
+			if (!g_strncasecmp(url_decoded, "mailto:", 7)) {
+ 				item = gtk_menu_item_new_with_label ((url_decoded));
+				gtk_signal_connect (GTK_OBJECT(item), "activate",
+						GTK_SIGNAL_FUNC(mailing_list_compose), NULL);
+			}
+ 			else if (!g_strncasecmp (url_decoded, "http:", 5) ||
+				 !g_strncasecmp (url_decoded, "https:",6)) {
+
+				item = gtk_menu_item_new_with_label ((url_decoded));
+				gtk_signal_connect (GTK_OBJECT(item), "activate",
+						GTK_SIGNAL_FUNC(mailing_list_open_uri), NULL);
+			} 
+			if (item) {
+				gtk_menu_append (GTK_MENU(menu), item);
+				gtk_widget_show (item);
+				menu_nb++;
+			}
+		}
+	}
+	if (menu_nb)
+		gtk_widget_set_sensitive (menuitem, TRUE);
+	else
+		gtk_widget_set_sensitive (menuitem, FALSE);
+		
+
+	return menu_nb;
+}
+
+static void get_url_part (const gchar **buffer, gchar *url_decoded, gint maxlen)
+{
+	gchar tmp[BUFFSIZE];
+	const gchar *buf;
+	gint i = 0;
+	buf = *buffer;
+	
+	if (buf == 0x00) {
+		url_decoded = 0x00;
+		return;
+	}
+	/* Ignore spaces, comments  and tabs () */
+	for (;*buf == ' ' || *buf == '(' || *buf == '\t'; buf++)
+		if (*buf == '(')
+			for (;*buf != ')' && *buf != 0x00; buf++);
+	
+	/* First non space and non comment must be a < */
+	if (*buf =='<' ) {
+		buf++;
+		for (i = 0; *buf != '>' && *buf != 0x00 && i<maxlen; tmp[i++] = *(buf++));
+		buf++;
+	}
+	else 
+		/* else, we finish parsing and ignore everything */
+		for (;buf != 0x00; buf++);
+	
+	tmp[i]       = 0x00;
+	*url_decoded = 0x00;
+	
+	if (i == maxlen) {
+		for (;*buf != 0x00; buf++);
+		return;
+	}
+	decode_uri (url_decoded, (const gchar *)tmp);
+
+	/* Prepare the work for the next url in the list */
+	/* after the closing bracket >, ignore space, comments and tabs */
+	for (;*buf == ' ' || *buf == '(' || *buf == '\t'; buf++)
+		if (*buf == '(')
+			for (;*buf != ')' && *buf != 0x00; buf++);
+	/* now first non space, non comment must be a comma */
+	if (*buf != ',')
+		for (;*buf != 0x00; buf++);
+	else
+		buf++;
+	*buffer = buf;
+}
+	
+static void mailing_list_compose (GtkWidget *w, gpointer *data)
+{
+	gchar *mailto;
+
+	gtk_label_get (GTK_LABEL (GTK_BIN (w)->child), (gchar **) &mailto);
+	compose_new(NULL, mailto+7, NULL);
+}
+ 
+ static void mailing_list_open_uri (GtkWidget *w, gpointer *data)
+{
+ 
+ 	gchar *mailto;
+ 
+ 	gtk_label_get (GTK_LABEL (GTK_BIN (w)->child), (gchar **) &mailto);
+ 	open_uri (mailto, prefs_common.uri_cmd);
+} 
+	
 void main_window_popup(MainWindow *mainwin)
 {
 	gtkut_window_popup(mainwin->window);
@@ -3377,6 +3614,15 @@
 	inc_account_mail(mainwin, account);
 }
 
+static void account_compose_menu_cb(GtkMenuItem *menuitem, gpointer data)
+{
+	MainWindow *mainwin = (MainWindow *)mainwin_list->data;
+	PrefsAccount *account = (PrefsAccount *)data;
+	FolderItem *item = mainwin->summaryview->folder_item;	
+
+	compose_new_with_folderitem(account, item);
+}
+
 static void prefs_open_cb(GtkMenuItem *menuitem, gpointer data)
 {
 	prefs_gtk_open();

Index: mainwindow.h
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/mainwindow.h,v
retrieving revision 1.39.2.16
retrieving revision 1.39.2.17
diff -u -r1.39.2.16 -r1.39.2.17
--- mainwindow.h	10 Apr 2006 16:51:13 -0000	1.39.2.16
+++ mainwindow.h	12 May 2006 17:42:48 -0000	1.39.2.17
@@ -162,6 +162,10 @@
 GtkWidget *main_window_get_folder_window	(MainWindow	*mainwin);
 GtkWidget *main_window_get_message_window	(MainWindow	*mainwin);
 
+/* Mailing list support */
+void main_create_mailing_list_menu 	(MainWindow *mainwin, MsgInfo *msginfo);
+gint mailing_list_get_list_post_mailto 	(gchar **url, gchar *mailto, gint maxlen);
+
 void main_window_separation_change	(MainWindow	*mainwin,
 					 SeparateType	 type);
 

Index: messageview.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/messageview.c,v
retrieving revision 1.94.2.82
retrieving revision 1.94.2.83
diff -u -r1.94.2.82 -r1.94.2.83
--- messageview.c	16 Mar 2006 19:16:58 -0000	1.94.2.82
+++ messageview.c	12 May 2006 17:42:48 -0000	1.94.2.83
@@ -46,6 +46,7 @@
 #include "addressbook.h"
 #include "alertpanel.h"
 #include "inputdialog.h"
+#include "mainwindow.h"
 #include "manage_window.h"
 #include "procmsg.h"
 #include "procheader.h"
@@ -839,6 +840,8 @@
 
 	messageview_set_position(messageview, 0);
 
+	main_create_mailing_list_menu(messageview->mainwin, messageview->msginfo);
+
 	if (messageview->msginfo->partial_recv)
 		partial_recv_show(messageview->noticeview, 
 				  messageview->msginfo);

Index: prefs_spelling.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/prefs_spelling.c,v
retrieving revision 1.5.2.23
retrieving revision 1.5.2.24
diff -u -r1.5.2.23 -r1.5.2.24
--- prefs_spelling.c	13 Apr 2006 13:57:32 -0000	1.5.2.23
+++ prefs_spelling.c	12 May 2006 17:42:48 -0000	1.5.2.24
@@ -47,14 +47,15 @@
 
 	GtkWidget *window;		/* do not modify */
 
+	GtkWidget *automatic_frame;
+	GtkWidget *dictionary_frame;
+	GtkWidget *path_frame;
+	
 	GtkWidget *enable_aspell_checkbtn;
 	GtkWidget *recheck_when_changing_dict_checkbtn;
 	GtkWidget *check_while_typing_checkbtn;
 	GtkWidget *use_alternate_checkbtn;
 
-	GtkWidget *table;
-
-	GtkWidget *aspell_path_label;
 	GtkWidget *aspell_path_entry;
 	GtkWidget *aspell_path_select;
 
@@ -75,10 +76,12 @@
 
 static void prefs_spelling_enable(SpellingPage *spelling, gboolean enable)
 {
-	gtk_widget_set_sensitive(spelling->check_while_typing_checkbtn,	enable);
-	gtk_widget_set_sensitive(spelling->recheck_when_changing_dict_checkbtn, enable);
-	gtk_widget_set_sensitive(spelling->use_alternate_checkbtn,	enable);
-	gtk_widget_set_sensitive(spelling->table,			enable);
+	gtk_widget_set_sensitive(spelling->automatic_frame, enable);
+	gtk_widget_set_sensitive(spelling->dictionary_frame, enable);
+	gtk_widget_set_sensitive(spelling->path_frame, enable);
+	gtk_widget_set_sensitive(spelling->misspelled_label, enable);
+	gtk_widget_set_sensitive(spelling->misspelled_colorbtn, enable);
+	gtk_widget_set_sensitive(spelling->use_alternate_checkbtn, enable);
 }
 
 static void prefs_spelling_checkbtn_enable_aspell_toggle_cb
@@ -141,16 +144,19 @@
 {
 	SpellingPage *prefs_spelling = (SpellingPage *) _page;
 
-	GtkWidget *vbox1, *vbox2;
+	GtkWidget *vbox1, *vbox2, *hbox;
 
 	GtkWidget *enable_aspell_checkbtn;
 	GtkWidget *check_while_typing_checkbtn;
 	GtkWidget *recheck_when_changing_dict_checkbtn;
 	GtkWidget *use_alternate_checkbtn;
 
-	GtkWidget *table;
+	GtkWidget *label;
+
+	GtkWidget *automatic_frame;
+	GtkWidget *dictionary_frame;
+	GtkWidget *path_frame;
 
-	GtkWidget *aspell_path_label;
 	GtkWidget *aspell_path_hbox;
 	GtkWidget *aspell_path_entry;
 	GtkWidget *aspell_path_select;
@@ -181,16 +187,6 @@
 	gtk_widget_show(enable_aspell_checkbtn);
 	gtk_box_pack_start(GTK_BOX(vbox2), enable_aspell_checkbtn, TRUE, TRUE, 0);
 
-	check_while_typing_checkbtn = gtk_check_button_new_with_label(
-			_("Check while typing"));
-	gtk_widget_show(check_while_typing_checkbtn);
-	gtk_box_pack_start(GTK_BOX(vbox2), check_while_typing_checkbtn, TRUE, TRUE, 0);
-
-	recheck_when_changing_dict_checkbtn = gtk_check_button_new_with_label(
-			_("Re-check message when changing dictionary"));
-	gtk_widget_show(recheck_when_changing_dict_checkbtn);
-	gtk_box_pack_start(GTK_BOX(vbox2), recheck_when_changing_dict_checkbtn, TRUE, TRUE, 0);
-
 	use_alternate_checkbtn = gtk_check_button_new_with_label(
 			_("Enable alternate dictionary"));
 	gtk_widget_show(use_alternate_checkbtn);
@@ -200,27 +196,11 @@
 	gtk_tooltips_set_tip(tooltips, use_alternate_checkbtn, 
 			_("Faster switching with last used dictionary"), NULL);
 
-	
-	table = gtk_table_new(4, 2, FALSE);
-	gtk_widget_show(table);
-	gtk_table_set_row_spacings(GTK_TABLE(table), 4);
-	gtk_table_set_col_spacings(GTK_TABLE(table), 8);
-	gtk_box_pack_start(GTK_BOX(vbox2), table, TRUE, TRUE, 0);
-
-	
-	aspell_path_label = gtk_label_new(_("Dictionaries path:"));
-	gtk_widget_show(aspell_path_label);
-	gtk_table_attach(GTK_TABLE(table), aspell_path_label, 0, 1, 0, 1,
-			(GtkAttachOptions) (GTK_FILL),
-			(GtkAttachOptions) (0), 0, 0);
-	gtk_label_set_justify(GTK_LABEL(aspell_path_label), GTK_JUSTIFY_RIGHT);
-	gtk_misc_set_alignment(GTK_MISC(aspell_path_label), 1, 0.5);
-
+	PACK_FRAME(vbox1, path_frame, _("Dictionary path"));
 	aspell_path_hbox = gtk_hbox_new(FALSE, 8);
 	gtk_widget_show(aspell_path_hbox);
-	gtk_table_attach(GTK_TABLE(table), aspell_path_hbox, 1, 2, 0, 1,
-			 (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
-			 (GtkAttachOptions) (GTK_FILL), 0, 0);
+	gtk_container_add(GTK_CONTAINER(path_frame), aspell_path_hbox);
+	gtk_container_set_border_width(GTK_CONTAINER(aspell_path_hbox), 8);	
 
 	aspell_path_entry = gtk_entry_new();
 	gtk_widget_show(aspell_path_entry);
@@ -231,60 +211,89 @@
 	gtk_widget_show(aspell_path_select);
 	gtk_box_pack_start(GTK_BOX(aspell_path_hbox), aspell_path_select, FALSE, FALSE, 0);
 
+	PACK_FRAME(vbox1, automatic_frame, _("Automatic spelling"));
+	vbox2 = gtk_vbox_new(FALSE, VSPACING_NARROW);
+	gtk_widget_show(vbox2);
+	gtk_container_add(GTK_CONTAINER(automatic_frame), vbox2);
+	gtk_container_set_border_width(GTK_CONTAINER(vbox2), 8);
 	
-	default_dict_label = gtk_label_new(_("Default dictionary:"));
+	check_while_typing_checkbtn = gtk_check_button_new_with_label(
+			_("Check while typing"));
+	gtk_widget_show(check_while_typing_checkbtn);
+	gtk_box_pack_start(GTK_BOX(vbox2), check_while_typing_checkbtn, TRUE, TRUE, 0);
+
+	recheck_when_changing_dict_checkbtn = gtk_check_button_new_with_label(
+			_("Re-check message when changing dictionary"));
+	gtk_widget_show(recheck_when_changing_dict_checkbtn);
+	gtk_box_pack_start(GTK_BOX(vbox2), recheck_when_changing_dict_checkbtn, TRUE, TRUE, 0);
+	
+	PACK_FRAME(vbox1, dictionary_frame, _("Dictionary"));
+	vbox2 = gtk_vbox_new(FALSE, VSPACING_NARROW);
+	gtk_widget_show(vbox2);
+	gtk_container_add(GTK_CONTAINER(dictionary_frame), vbox2);
+	gtk_container_set_border_width(GTK_CONTAINER(vbox2), 8);
+	
+	hbox = gtk_hbox_new(FALSE, 10);
+	gtk_widget_show(hbox);
+	gtk_box_pack_start(GTK_BOX(vbox2), hbox, TRUE, TRUE, 0);
+	
+	default_dict_label = gtk_label_new(_("Default dictionary"));
 	gtk_widget_show(default_dict_label);
-	gtk_table_attach(GTK_TABLE(table), default_dict_label, 0, 1, 1, 2,
-			(GtkAttachOptions) (GTK_FILL),
-			(GtkAttachOptions) (0), 0, 0);
-	gtk_label_set_justify(GTK_LABEL(default_dict_label), GTK_JUSTIFY_RIGHT);
+	gtk_label_set_justify(GTK_LABEL(default_dict_label), GTK_JUSTIFY_LEFT);
 	gtk_misc_set_alignment(GTK_MISC(default_dict_label), 1, 0.5);
-
+	gtk_box_pack_start(GTK_BOX(hbox), default_dict_label, FALSE, FALSE, 0);
+	
+	label = gtk_label_new("");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
+	
 	default_dict_optmenu = gtk_option_menu_new();
 	gtk_widget_show(default_dict_optmenu);
-	gtk_table_attach(GTK_TABLE(table), default_dict_optmenu, 1, 2, 1, 2,
-			(GtkAttachOptions) (GTK_FILL),
-			(GtkAttachOptions) (0), 0, 0);
+	gtk_widget_set_size_request(default_dict_optmenu, 180, -1);
+
 	default_dict_optmenu_menu = gtk_menu_new();
 	gtk_option_menu_set_menu(GTK_OPTION_MENU(default_dict_optmenu),
 			default_dict_optmenu_menu);
+	gtk_box_pack_start(GTK_BOX(hbox), default_dict_optmenu, FALSE, FALSE, 0);
 
+	hbox = gtk_hbox_new(FALSE, 10);
+	gtk_widget_show(hbox);
+	gtk_box_pack_start(GTK_BOX(vbox2), hbox, TRUE, TRUE, 0);
 	
-	sugmode_label = gtk_label_new(_("Default suggestion mode:"));
+	sugmode_label = gtk_label_new(_("Default suggestion mode"));
 	gtk_widget_show(sugmode_label);
-	gtk_table_attach(GTK_TABLE(table), sugmode_label, 0, 1, 2, 3,
-			(GtkAttachOptions) (GTK_FILL),
-			(GtkAttachOptions) (0), 0, 0);
-	gtk_label_set_justify(GTK_LABEL(sugmode_label), GTK_JUSTIFY_RIGHT);
+	gtk_label_set_justify(GTK_LABEL(sugmode_label), GTK_JUSTIFY_LEFT);
 	gtk_misc_set_alignment(GTK_MISC(sugmode_label), 1, 0.5);
+	gtk_box_pack_start(GTK_BOX(hbox), sugmode_label, FALSE, FALSE, 0);
+
+	label = gtk_label_new("");
+	gtk_widget_show(label);
+	gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
 
 	sugmode_optmenu = gtk_option_menu_new();
 	gtk_widget_show(sugmode_optmenu);
-	gtk_table_attach(GTK_TABLE(table), sugmode_optmenu, 1, 2, 2, 3,
-			(GtkAttachOptions) (GTK_FILL),
-			(GtkAttachOptions) (0), 0, 0);
+	gtk_widget_set_size_request(sugmode_optmenu, 180, -1); 
+	
 	sugmode_optmenu_menu = gtk_menu_new();
 	gtk_option_menu_set_menu(GTK_OPTION_MENU(sugmode_optmenu),
 			sugmode_optmenu_menu);
-
+	gtk_box_pack_start(GTK_BOX(hbox), sugmode_optmenu, FALSE, FALSE, 0);
 	
+	misspelled_hbox = gtk_hbox_new(FALSE, 10);
+	gtk_widget_show(misspelled_hbox);
+	gtk_box_pack_start(GTK_BOX(vbox1), misspelled_hbox, FALSE, FALSE, 0);
+		
 	misspelled_label = gtk_label_new(_("Misspelled word color:"));
 	gtk_widget_show(misspelled_label);
-	gtk_table_attach(GTK_TABLE(table), misspelled_label, 0, 1, 3, 4,
-			 (GtkAttachOptions) (GTK_FILL),
-			 (GtkAttachOptions) (0), 0, 0);
+	gtk_box_pack_start(GTK_BOX(misspelled_hbox), misspelled_label,
+		FALSE, FALSE, 0);
 	gtk_label_set_justify(GTK_LABEL(misspelled_label), GTK_JUSTIFY_RIGHT);
 	gtk_misc_set_alignment(GTK_MISC(misspelled_label), 1, 0.5);
 
-	misspelled_hbox = gtk_hbox_new(FALSE, 0);
-	gtk_widget_show(misspelled_hbox);
-	gtk_table_attach(GTK_TABLE(table), misspelled_hbox, 1, 2, 3, 4,
-			 (GtkAttachOptions) (GTK_FILL),
-			 (GtkAttachOptions) (GTK_FILL), 0, 0);
-
 	misspelled_colorbtn = gtk_button_new_with_label("");
 	gtk_widget_show(misspelled_colorbtn);
-	gtk_box_pack_start(GTK_BOX(misspelled_hbox), misspelled_colorbtn, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(misspelled_hbox), misspelled_colorbtn,
+		FALSE, FALSE, 0);
 	gtk_widget_set_size_request(misspelled_colorbtn, 30, 20);
 	tooltips = gtk_tooltips_new();
 	gtk_tooltips_set_tip(tooltips, misspelled_colorbtn,
@@ -321,14 +330,15 @@
 	gtkut_set_widget_bgcolor_rgb(misspelled_colorbtn, prefs_spelling->misspell_col);
 
 	prefs_spelling->window			= GTK_WIDGET(window);
+	prefs_spelling->automatic_frame =	automatic_frame;
+	prefs_spelling->dictionary_frame =	dictionary_frame;
+	prefs_spelling->path_frame =	path_frame;
 	prefs_spelling->enable_aspell_checkbtn	= enable_aspell_checkbtn;
 	prefs_spelling->check_while_typing_checkbtn
 		= check_while_typing_checkbtn;
 	prefs_spelling->recheck_when_changing_dict_checkbtn
 		= recheck_when_changing_dict_checkbtn;
 	prefs_spelling->use_alternate_checkbtn	= use_alternate_checkbtn;
-	prefs_spelling->table			= table;
-	prefs_spelling->aspell_path_label	= aspell_path_label;
 	prefs_spelling->aspell_path_entry	= aspell_path_entry;
 	prefs_spelling->aspell_path_select	= aspell_path_select;
 	prefs_spelling->default_dict_label	= default_dict_label;

Index: procheader.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/procheader.c,v
retrieving revision 1.47.2.28
retrieving revision 1.47.2.29
diff -u -r1.47.2.28 -r1.47.2.29
--- procheader.c	26 Mar 2006 16:52:33 -0000	1.47.2.28
+++ procheader.c	12 May 2006 17:42:48 -0000	1.47.2.29
@@ -358,6 +358,12 @@
 	H_SC_PARTIALLY_RETRIEVED = 20,
 	H_SC_ACCOUNT_SERVER = 21,
 	H_SC_ACCOUNT_LOGIN = 22,
+ 	H_LIST_POST	   = 23,
+	H_LIST_SUBSCRIBE   = 24,
+ 	H_LIST_UNSUBSCRIBE = 25,
+ 	H_LIST_HELP        = 26,
+ 	H_LIST_ARCHIVE     = 27,
+ 	H_LIST_OWNER       = 28,
 };
 
 static HeaderEntry hentry_full[] = {{"Date:",		NULL, FALSE},
@@ -383,6 +389,12 @@
 				   {"SC-Partially-Retrieved:", NULL, FALSE},
 				   {"SC-Account-Server:", NULL, FALSE},
 				   {"SC-Account-Login:",NULL, FALSE},
+				   {"List-Post:",	NULL, TRUE},
+				   {"List-Subscribe:",	NULL, TRUE},
+				   {"List-Unsubscribe:",NULL, TRUE},
+				   {"List-Help:",	NULL, TRUE},
+ 				   {"List-Archive:",	NULL, TRUE},
+ 				   {"List-Owner:",	NULL, TRUE},
 				   {NULL,		NULL, FALSE}};
 
 static HeaderEntry hentry_short[] = {{"Date:",		NULL, FALSE},
@@ -609,6 +621,23 @@
 			if (msginfo->fromspace) break;
 			msginfo->fromspace = g_strdup(hp);
 			break;
+ 		case H_LIST_POST:
+			msginfo->list_post = g_strdup(hp);
+			break;
+		case H_LIST_SUBSCRIBE:
+			msginfo->list_subscribe = g_strdup(hp);
+			break;
+		case H_LIST_UNSUBSCRIBE:
+			msginfo->list_unsubscribe = g_strdup(hp);
+			break;
+		case H_LIST_HELP:
+			msginfo->list_help = g_strdup(hp);
+			break;
+		case H_LIST_ARCHIVE:
+			msginfo->list_archive = g_strdup(hp);
+			break;
+		case H_LIST_OWNER:
+			msginfo->list_owner = g_strdup(hp);
 		default:
 			break;
 		}

Index: procmsg.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/procmsg.c,v
retrieving revision 1.150.2.61
retrieving revision 1.150.2.62
diff -u -r1.150.2.61 -r1.150.2.62
--- procmsg.c	18 Apr 2006 16:21:10 -0000	1.150.2.61
+++ procmsg.c	12 May 2006 17:42:48 -0000	1.150.2.62
@@ -1209,6 +1209,18 @@
 
 	/* CLAWS: make sure we add the missing members; see: 
 	 * procheader.c::procheader_get_headernames() */
+	if (!msginfo->list_post)
+		msginfo->list_post = g_strdup(full_msginfo->list_post);
+	if (!msginfo->list_subscribe)
+		msginfo->list_subscribe = g_strdup(full_msginfo->list_subscribe);
+	if (!msginfo->list_unsubscribe)
+		msginfo->list_unsubscribe = g_strdup(full_msginfo->list_unsubscribe);
+	if (!msginfo->list_help)
+		msginfo->list_help = g_strdup(full_msginfo->list_help);
+	if (!msginfo->list_archive)
+		msginfo->list_archive= g_strdup(full_msginfo->list_archive);
+	if (!msginfo->list_owner)
+		msginfo->list_owner = g_strdup(full_msginfo->list_owner);
 	if (!msginfo->xface)
 		msginfo->xface = g_strdup(full_msginfo->xface);
 	if (!msginfo->face)
@@ -1266,6 +1278,13 @@
 	g_free(msginfo->inreplyto);
 	g_free(msginfo->xref);
 
+	g_free(msginfo->list_post);
+	g_free(msginfo->list_subscribe);
+	g_free(msginfo->list_unsubscribe);
+	g_free(msginfo->list_help);
+	g_free(msginfo->list_archive);
+	g_free(msginfo->list_owner);
+
 	g_free(msginfo->partial_recv);
 	g_free(msginfo->account_server);
 	g_free(msginfo->account_login);
@@ -1517,7 +1536,9 @@
 				mailval = send_message_smtp(&tmp_ac, to_list, fp);
 			}
 		}
-	}
+	} else if (!to_list && !newsgroup_list) 
+		mailval = -1;
+
 
 	fseek(fp, filepos, SEEK_SET);
 	if (newsgroup_list && (mailval == 0)) {

Index: procmsg.h
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/procmsg.h,v
retrieving revision 1.60.2.27
retrieving revision 1.60.2.28
diff -u -r1.60.2.27 -r1.60.2.28
--- procmsg.h	16 Mar 2006 18:13:22 -0000	1.60.2.27
+++ procmsg.h	12 May 2006 17:42:48 -0000	1.60.2.28
@@ -218,6 +218,14 @@
 	gchar *account_server;
 	gchar *account_login;
 	gint planned_download;
+
+ 	/* Mailing list support */
+ 	gchar *list_post;
+ 	gchar *list_subscribe;
+ 	gchar *list_unsubscribe;
+ 	gchar *list_help;
+ 	gchar *list_archive;
+ 	gchar *list_owner;
 };
 
 struct _MsgFileInfo

Index: summaryview.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/summaryview.c,v
retrieving revision 1.395.2.194
retrieving revision 1.395.2.195
diff -u -r1.395.2.194 -r1.395.2.195
--- summaryview.c	25 Apr 2006 06:33:14 -0000	1.395.2.194
+++ summaryview.c	12 May 2006 17:42:48 -0000	1.395.2.195
@@ -751,6 +751,7 @@
 	summary_clear_list(summaryview);
 	summary_set_column_titles(summaryview);
 	summary_colorlabel_menu_create(summaryview, FALSE);
+	main_create_mailing_list_menu (summaryview->mainwin, NULL);	
 	summary_set_menu_sensitive(summaryview);
 
 }

Index: toolbar.c
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/toolbar.c,v
retrieving revision 1.43.2.43
retrieving revision 1.43.2.44
diff -u -r1.43.2.43 -r1.43.2.44
--- toolbar.c	6 Apr 2006 10:58:16 -0000	1.43.2.43
+++ toolbar.c	12 May 2006 17:42:48 -0000	1.43.2.44
@@ -1432,6 +1432,7 @@
 	ComboButton *replylist_combo;
 	ComboButton *replysender_combo;
 	ComboButton *fwd_combo;
+	ComboButton *compose_combo;
 
 	GtkTooltips *toolbar_tips;
 	ToolbarSylpheedActions *action_item;
@@ -1523,6 +1524,14 @@
 			gtk_tooltips_set_tip(GTK_TOOLTIPS(toolbar_tips), 
 					     toolbar_data->compose_news_btn,
 					   _("Compose News"), NULL);
+			compose_combo = gtkut_combo_button_create(toolbar_data->compose_mail_btn, NULL, 0,
+					"<Compose>", (gpointer)toolbar_item);
+			gtk_button_set_relief(GTK_BUTTON(compose_combo->arrow),
+					      GTK_RELIEF_NONE);
+			gtk_toolbar_append_widget(GTK_TOOLBAR(toolbar),
+				  		  GTK_WIDGET_PTR(compose_combo),
+				 		  _("Compose with selected Account"), "Compose");
+			toolbar_data->compose_combo = compose_combo;
 			break;
 		case A_LEARN_SPAM:
 			icon_ham = stock_pixmap_widget(container, STOCK_PIXMAP_HAM_BTN);
@@ -1857,6 +1866,9 @@
 	if (toolbar->getall_btn)
 		SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->getall_combo),
 			M_HAVE_ACCOUNT|M_UNLOCKED);
+	if (toolbar->compose_mail_btn)
+		SET_WIDGET_COND(GTK_WIDGET_PTR(toolbar->compose_combo),
+			M_HAVE_ACCOUNT);
 	SET_WIDGET_COND(toolbar->compose_news_btn, M_HAVE_ACCOUNT);
 	SET_WIDGET_COND(toolbar->reply_btn,
 			M_HAVE_ACCOUNT|M_SINGLE_TARGET_EXIST);
@@ -1987,6 +1999,7 @@
 	toolbar->send_btn         	= NULL;
 	toolbar->compose_mail_btn 	= NULL;
 	toolbar->compose_news_btn 	= NULL;
+	toolbar->compose_combo	 	= NULL;
 	toolbar->reply_btn        	= NULL;
 	toolbar->replysender_btn  	= NULL;
 	toolbar->replyall_btn     	= NULL;

Index: toolbar.h
===================================================================
RCS file: /cvsroot/sylpheed-claws/sylpheed-claws/src/toolbar.h,v
retrieving revision 1.19.2.10
retrieving revision 1.19.2.11
diff -u -r1.19.2.10 -r1.19.2.11
--- toolbar.h	1 Mar 2006 15:13:46 -0000	1.19.2.10
+++ toolbar.h	12 May 2006 17:42:48 -0000	1.19.2.11
@@ -56,6 +56,7 @@
 
 	GtkWidget *compose_mail_btn;
 	GtkWidget *compose_news_btn;
+	ComboButton *compose_combo;
 
 	GtkWidget *reply_btn;
 	ComboButton *reply_combo;



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.