[Commits] account.c 1.61.2.98 1.61.2.98.2.1 action.c 1.12.2.66 1.12.2.66.2.1 addr_compl.c 1.27.2.53.2.1 1.27.2.53.2.2 addrbook.c 1.22.2.24 1.22.2.24.2.1 addrbook.h 1.7.2.4 1.7.2.4.10.1 addrcustomattr.c 1.1.2.9 1.1.2.9.2.1 addrduplicates.c 1.1.2.17 1.1.2.17.2.1 addressadd.c 1.9.2.32.2.1 1.9.2.32.2.2 addressbook.c 1.60.2.143 1.60.2.143.2.1 addressbook_foldersel.c 1.1.2.19 1.1.2.19.2.1 addrgather.c 1.5.10.33.2.1 1.5.10.33.2.2 alertpanel.c 1.17.2.43 1.17.2.43.2.1 browseldap.c 1.2.4.26 1.2.4.26.2.1 codeconv.c 1.65.2.73 1.65.2.73.2.1 compose.c 1.382.2.580.2.1 1.382.2.580.2.2 editaddress.c 1.14.2.60 1.14.2.60.2.1 editaddress_other_attributes_ldap.c 1.1.2.15 1.1.2.15.2.1 editbook.c 1.5.12.16 1.5.12.16.2.1 editgroup.c 1.11.2.26 1.11.2.26.2.1 editjpilot.c 1.5.12.18 1.5.12.18.2.1 editldap.c 1.8.2.40 1.8.2.40.2.1 editldap_basedn.c 1.10.2.18 1.10.2.18.2.1 edittags.c 1.1.2.24 1.1.2.24.2.1 editvcard.c 1.5.12.17 1.5.12.17.2.1 exphtmldlg.c 1.3.2.28 1.3.2.28.2.1 expldifdlg.c 1.1.4.33 1.1.4.33.2.1 export.c 1.8.2.31 1.8.2.31.2.1 exportldif.c 1.1.4.22 1.1.4.22.2.1 filtering.c 1.60.2.57.2.1 1.60.2.57.2.2 filtering.h 1.21.2.19 1.21.2.19.2.1 folder.c 1.213.2.202 1.213.2.202.2.1 folder.h 1.87.2.64 1.87.2.64.2.1 folder_item_prefs.c 1.2.2.37 1.2.2.37.2.1 foldersel.c 1.26.2.46 1.26.2.46.2.1 folderview.c 1.207.2.220 1.207.2.220.2.1 grouplistdialog.c 1.14.2.28 1.14.2.28.2.1 headerview.c 1.8.2.33.2.1 1.8.2.33.2.2 image_viewer.c 1.1.2.30 1.1.2.30.2.1 imap_gtk.c 1.1.2.66 1.1.2.66.2.1 import.c 1.13.2.30 1.13.2.30.2.1 importldif.c 1.14.2.26 1.14.2.26.2.1 importmutt.c 1.4.12.22 1.4.12.22.2.1 importpine.c 1.1.14.22 1.1.14.22.2.1 jpilot.c 1.18.2.32 1.18.2.32.2.1 ldif.c 1.12.2.23 1.12.2.23.2.1 main.c 1.115.2.239.2.1 1.115.2.239.2.2 mainwindow.c 1.274.2.328.2.1 1.274.2.328.2.2 mainwindow.h 1.39.2.61 1.39.2.61.2.1 message_search.c 1.3.12.39 1.3.12.39.2.1 messageview.c 1.94.2.218.2.1 1.94.2.218.2.2 mh_gtk.c 1.2.2.39 1.2.2.39.2.1 mimeview.c 1.83.2.170 1.83.2.170.2.1 mimeview.h 1.20.2.32 1.20.2.32.2.1 mutt.c 1.6.10.18 1.6.10.18.2.1 news.c 1.101.2.67 1.101.2.67.2.1 noticeview.c 1.5.2.25 1.5.2.25.2.1 pine.c 1.6.2.17 1.6.2.17.2.1 prefs_account.c 1.105.2.168 1.105.2.168.2.1 prefs_actions.c 1.60.2.73 1.60.2.73.2.1 prefs_actions.h 1.5.2.7 1.5.2.7.2.1 prefs_common.c 1.204.2.202.2.1 1.204.2.202.2.2 prefs_common.h 1.103.2.133 1.103.2.133.2.1 prefs_compose_writing.c 1.1.2.30 1.1.2.30.2.1 prefs_customheader.c 1.16.2.41 1.16.2.41.2.1 prefs_display_header.c 1.16.2.43 1.16.2.43.2.1 prefs_ext_prog.c 1.3.2.26 1.3.2.26.2.1 prefs_filtering.c 1.59.2.82 1.59.2.82.2.1 prefs_filtering_action.c 1.1.4.69.2.1 1.1.4.69.2.2 prefs_folder_column.c 1.1.2.18 1.1.2.18.2.1 prefs_folder_item.c 1.52.2.83 1.52.2.83.2.1 prefs_image_viewer.c 1.1.2.16 1.1.2.16.2.1 prefs_logging.c 1.1.2.19 1.1.2.19.2.1 prefs_matcher.c 1.43.2.89.2.1 1.43.2.89.2.2 prefs_message.c 1.1.2.33 1.1.2.33.2.1 prefs_msg_colors.c 1.1.2.42 1.1.2.42.2.1 prefs_other.c 1.1.2.41 1.1.2.41.2.1 prefs_receive.c 1.1.2.28 1.1.2.28.2.1 prefs_send.c 1.1.2.28 1.1.2.28.2.1 prefs_spelling.c 1.5.2.42 1.5.2.42.2.1 prefs_summaries.c 1.1.2.66 1.1.2.66.2.1 prefs_summary_column.c 1.10.2.27 1.10.2.27.2.1 prefs_summary_open.c 1.1.2.10 1.1.2.10.2.1 prefs_template.c 1.12.2.75 1.12.2.75.2.1 prefs_toolbar.c 1.30.2.67 1.30.2.67.2.1 prefs_wrapping.c 1.1.2.22 1.1.2.22.2.1 printing.c 1.1.2.31 1.1.2.31.2.1 procheader.c 1.47.2.54 1.47.2.54.2.1 procheader.h 1.11.2.12 1.11.2.12.2.1 procmsg.c 1.150.2.117 1.150.2.117.2.1 procmsg.h 1.60.2.56 1.60.2.56.2.1 quote_fmt.c 1.8.2.44 1.8.2.44.2.1 send_message.c 1.17.2.60 1.17.2.60.2.1 sourcewindow.c 1.9.2.26 1.9.2.26.2.1 ssl_manager.c 1.3.2.35 1.3.2.35.2.1 statusbar.c 1.5.2.29 1.5.2.29.2.1 stock_pixmap.c 1.25.2.68 1.25.2.68.2.1 summary_search.c 1.15.2.65 1.15.2.65.2.1 summaryview.c 1.395.2.430.2.1 1.395.2.430.2.2 summaryview.h 1.68.2.57 1.68.2.57.2.1 textview.c 1.96.2.232.2.1 1.96.2.232.2.2 textview.h 1.12.2.27 1.12.2.27.2.1 undo.c 1.13.2.22 1.13.2.22.2.1 uri_opener.c 1.1.2.14 1.1.2.14.2.1 vcard.c 1.14.2.20 1.14.2.20.2.1 wizard.c 1.1.2.84 1.1.2.84.2.1

miras at claws-mail.org miras at claws-mail.org
Tue Nov 29 01:15:26 CET 2011


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

Modified Files:
      Tag: new-contacts
	account.c action.c addr_compl.c addrbook.c addrbook.h 
	addrcustomattr.c addrduplicates.c addressadd.c addressbook.c 
	addressbook_foldersel.c addrgather.c alertpanel.c browseldap.c 
	codeconv.c compose.c editaddress.c 
	editaddress_other_attributes_ldap.c editbook.c editgroup.c 
	editjpilot.c editldap.c editldap_basedn.c edittags.c 
	editvcard.c exphtmldlg.c expldifdlg.c export.c exportldif.c 
	filtering.c filtering.h folder.c folder.h folder_item_prefs.c 
	foldersel.c folderview.c grouplistdialog.c headerview.c 
	image_viewer.c imap_gtk.c import.c importldif.c importmutt.c 
	importpine.c jpilot.c ldif.c main.c mainwindow.c mainwindow.h 
	message_search.c messageview.c mh_gtk.c mimeview.c mimeview.h 
	mutt.c news.c noticeview.c pine.c prefs_account.c 
	prefs_actions.c prefs_actions.h prefs_common.c prefs_common.h 
	prefs_compose_writing.c prefs_customheader.c 
	prefs_display_header.c prefs_ext_prog.c prefs_filtering.c 
	prefs_filtering_action.c prefs_folder_column.c 
	prefs_folder_item.c prefs_image_viewer.c prefs_logging.c 
	prefs_matcher.c prefs_message.c prefs_msg_colors.c 
	prefs_other.c prefs_receive.c prefs_send.c prefs_spelling.c 
	prefs_summaries.c prefs_summary_column.c prefs_summary_open.c 
	prefs_template.c prefs_toolbar.c prefs_wrapping.c printing.c 
	procheader.c procheader.h procmsg.c procmsg.h quote_fmt.c 
	send_message.c sourcewindow.c ssl_manager.c statusbar.c 
	stock_pixmap.c summary_search.c summaryview.c summaryview.h 
	textview.c textview.h undo.c uri_opener.c vcard.c wizard.c 
Log Message:
2011-11-29 [mir]	3.7.10cvs16.4-new-contacts

	* AUTHORS
	* configure.ac
	* doc/man/claws-mail.1
	* manual/advanced.xml
	* manual/es/advanced.xml
	* po/bg.po
	* po/ca.po
	* po/cs.po
	* po/de.po
	* po/en_GB.po
	* po/es.po
	* po/fi.po
	* po/fr.po
	* po/hu.po
	* po/id.po
	* po/it.po
	* po/ja.po
	* po/lt.po
	* po/nl.po
	* po/pl.po
	* po/pt_BR.po
	* po/pt_PT.po
	* po/ru.po
	* po/sk.po
	* po/sv.po
	* po/uk.po
	* po/zh_CN.po
	* src/account.c
	* src/action.c
	* src/addr_compl.c
	* src/addrbook.c
	* src/addrbook.h
	* src/addrcustomattr.c
	* src/addrduplicates.c
	* src/addressadd.c
	* src/addressbook.c
	* src/addressbook_foldersel.c
	* src/addrgather.c
	* src/alertpanel.c
	* src/browseldap.c
	* src/codeconv.c
	* src/compose.c
	* src/editaddress.c
	* src/editaddress_other_attributes_ldap.c
	* src/editbook.c
	* src/editgroup.c
	* src/editjpilot.c
	* src/editldap.c
	* src/editldap_basedn.c
	* src/edittags.c
	* src/editvcard.c
	* src/exphtmldlg.c
	* src/expldifdlg.c
	* src/export.c
	* src/exportldif.c
	* src/filtering.c
	* src/filtering.h
	* src/folder.c
	* src/folder.h
	* src/folder_item_prefs.c
	* src/foldersel.c
	* src/folderview.c
	* src/grouplistdialog.c
	* src/headerview.c
	* src/image_viewer.c
	* src/imap_gtk.c
	* src/import.c
	* src/importldif.c
	* src/importmutt.c
	* src/importpine.c
	* src/jpilot.c
	* src/ldif.c
	* src/main.c
	* src/mainwindow.c
	* src/mainwindow.h
	* src/message_search.c
	* src/messageview.c
	* src/mh_gtk.c
	* src/mimeview.c
	* src/mimeview.h
	* src/mutt.c
	* src/news.c
	* src/noticeview.c
	* src/pine.c
	* src/prefs_account.c
	* src/prefs_actions.c
	* src/prefs_actions.h
	* src/prefs_common.c
	* src/prefs_common.h
	* src/prefs_compose_writing.c
	* src/prefs_customheader.c
	* src/prefs_display_header.c
	* src/prefs_ext_prog.c
	* src/prefs_filtering.c
	* src/prefs_filtering_action.c
	* src/prefs_folder_column.c
	* src/prefs_folder_item.c
	* src/prefs_image_viewer.c
	* src/prefs_logging.c
	* src/prefs_matcher.c
	* src/prefs_message.c
	* src/prefs_msg_colors.c
	* src/prefs_other.c
	* src/prefs_receive.c
	* src/prefs_send.c
	* src/prefs_spelling.c
	* src/prefs_summaries.c
	* src/prefs_summary_column.c
	* src/prefs_summary_open.c
	* src/prefs_template.c
	* src/prefs_toolbar.c
	* src/prefs_wrapping.c
	* src/printing.c
	* src/procheader.c
	* src/procheader.h
	* src/procmsg.c
	* src/procmsg.h
	* src/quote_fmt.c
	* src/send_message.c
	* src/sourcewindow.c
	* src/ssl_manager.c
	* src/statusbar.c
	* src/stock_pixmap.c
	* src/summary_search.c
	* src/summaryview.c
	* src/summaryview.h
	* src/textview.c
	* src/textview.h
	* src/undo.c
	* src/uri_opener.c
	* src/vcard.c
	* src/wizard.c
	* src/common/defs.h
	* src/common/ssl.c
	* src/gtk/Makefile.am
	* src/gtk/about.c
	* src/gtk/authors.h
	* src/gtk/colorlabel.c
	* src/gtk/colorsel.c
	* src/gtk/combobox.c
	* src/gtk/description_window.c
	* src/gtk/foldersort.c
	* src/gtk/gtkaspell.c
	* src/gtk/gtkaspell.h
	* src/gtk/gtkcmclist.c
	* src/gtk/gtkcmclist.h
	* src/gtk/gtkcmctree.c
	* src/gtk/gtkcmctree.h
	* src/gtk/gtkcmoptionmenu.c
	* src/gtk/gtksctree.c
	* src/gtk/gtkshruler.c
	* src/gtk/gtkshruler.h
	* src/gtk/gtkutils.c
	* src/gtk/gtkutils.h
	* src/gtk/gtkvscrollbutton.c
	* src/gtk/icon_legend.c
	* src/gtk/inputdialog.c
	* src/gtk/logwindow.c
	* src/gtk/menu.c
	* src/gtk/menu.h
	* src/gtk/pluginwindow.c
	* src/gtk/prefswindow.c
	* src/gtk/progressdialog.c
	* src/gtk/quicksearch.c
	* src/gtk/spell_entry.c
	* src/plugins/bogofilter/bogofilter_gtk.c
	* src/plugins/dillo_viewer/dillo_prefs.c
	* src/plugins/dillo_viewer/dillo_viewer.c
	* src/plugins/pgpcore/passphrase.c
	* src/plugins/pgpcore/prefs_gpg.c
	* src/plugins/pgpcore/select-keys.c
	* src/plugins/spamassassin/spamassassin_gtk.c
	* src/plugins/trayicon/trayicon.c
	* src/plugins/trayicon/trayicon_prefs.c
	    Applied patch 3.7.10cvs17 to 3.7.10cvs106 from the
	    gtk2 branch making new-addressbook branch in sync
	    with head. 

Index: summaryview.h
===================================================================
RCS file: /home/claws-mail/claws/src/summaryview.h,v
retrieving revision 1.68.2.57
retrieving revision 1.68.2.57.2.1
diff -u -d -r1.68.2.57 -r1.68.2.57.2.1
--- summaryview.h	16 Feb 2011 07:16:17 -0000	1.68.2.57
+++ summaryview.h	29 Nov 2011 00:15:23 -0000	1.68.2.57.2.1
@@ -302,6 +302,8 @@
 
 void summary_toggle_show_read_messages
 				  (SummaryView *summaryview);
+void summary_toggle_show_read_threads
+				  (SummaryView *summaryview);
 void summary_toggle_show_del_messages
 				  (SummaryView *summaryview);
 

Index: prefs_other.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_other.c,v
retrieving revision 1.1.2.41
retrieving revision 1.1.2.41.2.1
diff -u -d -r1.1.2.41 -r1.1.2.41.2.1
--- prefs_other.c	10 Apr 2011 17:19:04 -0000	1.1.2.41
+++ prefs_other.c	29 Nov 2011 00:15:22 -0000	1.1.2.41.2.1
@@ -159,7 +159,7 @@
 static gboolean prefs_keybind_key_pressed(GtkWidget *widget, GdkEventKey *event,
 					  gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_keybind_cancel();
 	return FALSE;
 }
@@ -446,7 +446,7 @@
 
 	GtkWidget *label_iotimeout;
 	GtkWidget *spinbtn_iotimeout;
-	GtkObject *spinbtn_iotimeout_adj;
+	GtkAdjustment *spinbtn_iotimeout_adj;
 
 	GtkWidget *vbox2;
 	GtkWidget *checkbtn_askonclean;
@@ -461,7 +461,6 @@
 	GtkWidget *flush_metadata_safer_radiobtn;
 
 	gchar *shred_binary = NULL;
-	CLAWS_TIP_DECL();
 
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);

Index: summaryview.c
===================================================================
RCS file: /home/claws-mail/claws/src/summaryview.c,v
retrieving revision 1.395.2.430.2.1
retrieving revision 1.395.2.430.2.2
diff -u -d -r1.395.2.430.2.1 -r1.395.2.430.2.2
--- summaryview.c	7 Sep 2011 15:52:27 -0000	1.395.2.430.2.1
+++ summaryview.c	29 Nov 2011 00:15:23 -0000	1.395.2.430.2.2
@@ -130,6 +130,8 @@
 					     guint action);
 static void summary_set_hide_del_msgs_menu (SummaryView *summaryview,
 					     guint action);
+static void summary_set_hide_read_threads_menu (SummaryView *summaryview,
+					     guint action);
 
 static GtkCMCTreeNode *summary_find_prev_msg
 					(SummaryView		*summaryview,
@@ -517,7 +519,6 @@
 	GtkWidget *toggle_arrow;
 	GtkWidget *toggle_search;
 	QuickSearch *quicksearch;
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating summary view...\n");
 	summaryview = g_new0(SummaryView, 1);
@@ -796,8 +797,10 @@
 	g_object_ref(summaryview->hbox_l);
 	g_object_ref(summaryview->statlabel_msgs);
 	
-	gtkut_container_remove(GTK_CONTAINER(summaryview->hbox_l->parent), summaryview->hbox_l);
-	gtkut_container_remove(GTK_CONTAINER(summaryview->statlabel_msgs->parent), summaryview->statlabel_msgs);
+	gtkut_container_remove(GTK_CONTAINER(
+		gtk_widget_get_parent(summaryview->hbox_l)), summaryview->hbox_l);
+	gtkut_container_remove(GTK_CONTAINER(
+		gtk_widget_get_parent(summaryview->statlabel_msgs)), summaryview->statlabel_msgs);
 
 	switch (prefs_common.layout_mode) {
 	case NORMAL_LAYOUT:
@@ -881,7 +884,7 @@
 	if (prefs_common.derive_from_normal_font || !SMALL_FONT) {
 		font_desc = pango_font_description_new();
 		size = pango_font_description_get_size
-			(summaryview->ctree->style->font_desc);
+			(gtk_widget_get_style(summaryview->ctree)->font_desc);
 		pango_font_description_set_size(font_desc, size * PANGO_SCALE_SMALL);
 	} else {
 		font_desc = pango_font_description_from_string(SMALL_FONT);
@@ -1216,6 +1219,7 @@
 				item?item->no_select:FALSE);
 		summary_set_hide_read_msgs_menu(summaryview, FALSE);
 		summary_set_hide_del_msgs_menu(summaryview, FALSE);
+		summary_set_hide_read_threads_menu(summaryview, FALSE);
 		summary_clear_all(summaryview);
 		summaryview->folder_item = item;
 		summary_thaw(summaryview);
@@ -1256,12 +1260,15 @@
 		mlist = folder_item_get_msg_list(item);
 	}
 
-	if ((summaryview->folder_item->hide_read_msgs || summaryview->folder_item->hide_del_msgs) &&
+	if ((summaryview->folder_item->hide_read_msgs
+             || summaryview->folder_item->hide_del_msgs
+             || summaryview->folder_item->hide_read_threads) &&
 	    quicksearch_is_active(summaryview->quicksearch) == FALSE) {
 		GSList *not_killed;
 		
 		summary_set_hide_read_msgs_menu(summaryview, summaryview->folder_item->hide_read_msgs);
 		summary_set_hide_del_msgs_menu(summaryview, summaryview->folder_item->hide_del_msgs);
+		summary_set_hide_read_threads_menu(summaryview, summaryview->folder_item->hide_read_threads);
 		not_killed = NULL;
 		for(cur = mlist ; cur != NULL && cur->data != NULL ; cur = g_slist_next(cur)) {
 			MsgInfo * msginfo = (MsgInfo *) cur->data;
@@ -1296,6 +1303,7 @@
 	} else {
 		summary_set_hide_read_msgs_menu(summaryview, FALSE);
 		summary_set_hide_del_msgs_menu(summaryview, FALSE);
+		summary_set_hide_read_threads_menu(summaryview, FALSE);
 	}
 
 	if (quicksearch_is_active(summaryview->quicksearch)) {
@@ -1706,7 +1714,7 @@
 	&&  summaryview->messageview->mimeview
 	&&  summaryview->messageview->mimeview->textview)
 		cm_toggle_menu_set_active_full(summaryview->mainwin->ui_manager, "Menus/SummaryViewPopup/View/AllHeaders",
-			summaryview->messageview->mimeview->textview->show_all_headers);
+			prefs_common.show_all_headers);
 #endif
 	summary_unlock(summaryview);
 }
@@ -2453,9 +2461,7 @@
 	goffset sel_size = 0, n_size = 0;
 	MsgInfo *msginfo;
 	gchar *name;
-#if GTK_CHECK_VERSION(2, 12, 0)
 	gchar *tooltip;
-#endif
 	
 	if (!summaryview->folder_item) {
 		gtk_label_set_text(GTK_LABEL(summaryview->statlabel_folder), "");
@@ -2478,6 +2484,7 @@
 	
 	if (summaryview->folder_item->hide_read_msgs 
 	|| summaryview->folder_item->hide_del_msgs
+	|| summaryview->folder_item->hide_read_threads
 	|| quicksearch_is_active(summaryview->quicksearch)) {
 		rowlist = GTK_CMCLIST(summaryview->ctree)->row_list;
 		for (cur = rowlist; cur != NULL && cur->data != NULL; cur = cur->next) {
@@ -2572,7 +2579,6 @@
 
 		gtk_label_set_text(GTK_LABEL(summaryview->statlabel_msgs), str);
 		g_free(str);
-#if GTK_CHECK_VERSION(2, 12, 0)
 		tooltip = g_strdup_printf(_("<b>Message summary</b>\n"
 					    "<b>New:</b> %d\n"
 					    "<b>Unread:</b> %d\n"
@@ -2592,7 +2598,6 @@
 		gtk_widget_set_tooltip_markup(GTK_WIDGET(summaryview->statlabel_msgs),
 				            tooltip); 
 		g_free(tooltip);
-#endif
 	} else {
 		gchar *ssize, *tsize;
 		if (n_selected) {
@@ -2731,7 +2736,7 @@
 void summary_reflect_tags_changes(SummaryView *summaryview)
 {
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 	GtkCMCTreeNode *node;
 	GtkCMCTree *ctree = GTK_CMCTREE(summaryview->ctree);
 	gboolean froze = FALSE;
@@ -2742,9 +2747,11 @@
 	cm_return_if_fail(menu != NULL);
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(cur->data), NULL);
 	}
+	g_list_free(children);
 	summary_tags_menu_create(summaryview, TRUE);
 
 	START_LONG_OPERATION(summaryview, TRUE);
@@ -2924,6 +2931,30 @@
 	msginfo->thread_date = most_recent;
 }
 
+static gboolean summary_update_is_read(GNode *node, gpointer data)
+{
+	MsgInfo *msginfo = node->data;
+	gboolean *all_read = (gboolean *)data;
+
+	if (MSG_IS_UNREAD(msginfo->flags)) {
+		*all_read = FALSE;
+		return TRUE;
+	}
+	return FALSE;
+}	
+
+static gboolean summary_thread_is_read(GNode *gnode)
+{
+	MsgInfo *msginfo = (MsgInfo *)gnode->data;
+	gboolean all_read = TRUE;
+
+	if (!msginfo)
+		return all_read;
+
+	g_node_traverse(gnode, G_IN_ORDER, G_TRAVERSE_ALL, -1, summary_update_is_read, &all_read);
+    return all_read;
+}
+
 static gboolean summary_insert_gnode_func(GtkCMCTree *ctree, guint depth, GNode *gnode,
 				   GtkCMCTreeNode *cnode, gpointer data)
 {
@@ -2937,7 +2968,7 @@
 
 	summary_set_header(summaryview, text, msginfo);
 
-	gtk_sctree_set_node_info(ctree, cnode, text[col_pos[S_COL_SUBJECT]], 2,
+	gtk_cmctree_set_node_info(ctree, cnode, text[col_pos[S_COL_SUBJECT]], 2,
 				NULL, NULL, FALSE, summaryview->threaded && !summaryview->thread_collapsed);
 #define SET_TEXT(col) {						\
 	gtk_cmctree_node_set_text(ctree, cnode, col_pos[col], 	\
@@ -3017,10 +3048,14 @@
 		
 		for (gnode = root->children; gnode != NULL;
 		     gnode = gnode->next) {
-			summary_find_thread_age(gnode);
-			node = gtk_sctree_insert_gnode
-				(ctree, NULL, node, gnode,
-				 summary_insert_gnode_func, summaryview);
+            if (!summaryview->folder_item->hide_read_threads ||
+                    !summary_thread_is_read(gnode))
+            {
+                summary_find_thread_age(gnode);
+                node = gtk_sctree_insert_gnode
+                    (ctree, NULL, node, gnode,
+                     summary_insert_gnode_func, summaryview);
+            }
 		}
 
 		g_node_destroy(root);
@@ -3138,13 +3173,9 @@
 	gchar *from_text = NULL, *to_text = NULL, *tags_text = NULL;
 	gboolean should_swap = FALSE;
 	gboolean vert = (prefs_common.layout_mode == VERTICAL_LAYOUT);
-#if GTK_CHECK_VERSION(2,12,0)
 	static const gchar *color_dim_rgb = NULL;
 	if (!color_dim_rgb)
 		color_dim_rgb = gdk_color_to_string(&summaryview->color_dim);
-#else
-	static const gchar *color_dim_rgb = "#888888";
-#endif
 	text[col_pos[S_COL_FROM]]   = "";
 	text[col_pos[S_COL_TO]]     = "";
 	text[col_pos[S_COL_SUBJECT]]= "";
@@ -3436,7 +3467,8 @@
 	gint val;
 	START_TIMING("");
 	if (!new_window) {
-		if (summaryview->displayed == row)
+		if (summaryview->displayed == row &&
+		    messageview_is_visible(summaryview->messageview))
 			return;
 		else if (summaryview->messageview)
 			summaryview->messageview->filtered = FALSE;
@@ -3475,7 +3507,7 @@
 			summaryview->last_displayed = summaryview->displayed;
 			summaryview->displayed = row;
 			val = messageview_show(msgview, msginfo, all_headers);
-			if (GTK_CMCLIST(msgview->mimeview->ctree)->row_list == NULL)
+			if (mimeview_tree_is_empty(msgview->mimeview))
 				gtk_widget_grab_focus(summaryview->ctree);
 			gtkut_ctree_node_move_if_on_the_edge(ctree, row,
 				GTK_CMCLIST(summaryview->ctree)->focus_row);
@@ -3483,12 +3515,13 @@
 			msgview = summaryview->messageview;
 			summaryview->last_displayed = summaryview->displayed;
 			summaryview->displayed = row;
-			if (!messageview_is_visible(msgview)) {
+			if (!messageview_is_visible(msgview) &&
+			    gtk_window_is_active(GTK_WINDOW(summaryview->mainwin->window))) {
 				main_window_toggle_message_view(summaryview->mainwin);
 				GTK_EVENTS_FLUSH();
 			}
 			val = messageview_show(msgview, msginfo, all_headers);
-			if (GTK_CMCLIST(msgview->mimeview->ctree)->row_list == NULL)
+			if (mimeview_tree_is_empty(msgview->mimeview))
 				gtk_widget_grab_focus(summaryview->ctree);
 			gtkut_ctree_node_move_if_on_the_edge(ctree, row,
 				GTK_CMCLIST(summaryview->ctree)->focus_row);
@@ -3645,6 +3678,8 @@
 {
 	if (prefs_common.layout_mode == SMALL_LAYOUT)
 		return;
+	if (summary_is_locked(summaryview))
+		return;
 	if (!messageview_is_visible(summaryview->messageview) &&
 	    summaryview->selected && summary_is_list(summaryview))
 		summary_display_msg(summaryview,
@@ -5787,7 +5822,7 @@
 	GtkMenuShell *menu;
 	GtkCheckMenuItem **items;
 	gint n;
-	GList *cur, *sel;
+	GList *children, *cur, *sel;
 
 	summaryview = (SummaryView *)data;
 	cm_return_if_fail(summaryview != NULL);
@@ -5807,7 +5842,8 @@
 			  GINT_TO_POINTER(1));
 
 	/* clear items. get item pointers. */
-	for (n = 0, cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (n = 0, cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gtk_check_menu_item_set_active
 				(GTK_CHECK_MENU_ITEM(cur->data), FALSE);
@@ -5816,6 +5852,8 @@
 		}
 	}
 
+	g_list_free(children);
+
 	if (n == (N_COLOR_LABELS + 1)) {
 		/* iterate all messages and set the state of the appropriate
 		 * items */
@@ -5828,7 +5866,7 @@
 				 GTK_CMCTREE_NODE(sel->data));
 			if (msginfo) {
 				clabel = MSG_GET_COLORLABEL_VALUE(msginfo->flags);
-				if (!items[clabel]->active)
+				if (!gtk_check_menu_item_get_active(items[clabel]))
 					gtk_check_menu_item_set_active
 						(items[clabel], TRUE);
 			}
@@ -5911,7 +5949,7 @@
 							  gpointer data)
 {
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 	GList *sel;
 	GHashTable *menu_table = g_hash_table_new_full(
 					g_direct_hash,
@@ -5937,7 +5975,8 @@
 			  GINT_TO_POINTER(1));
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gint id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cur->data),
 				"tag_id"));
@@ -5949,6 +5988,8 @@
 		}
 	}
 
+	g_list_free(children);
+
 	/* iterate all messages and set the state of the appropriate
 	 * items */
 	sel_len = 0;
@@ -5970,7 +6011,7 @@
 				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 && !item->active) {
+				if (item && !gtk_check_menu_item_get_active(item)) {
 					gtk_check_menu_item_set_active
 						(item, TRUE);
 				}
@@ -5980,7 +6021,8 @@
 		}
 	}
 
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gint id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cur->data),
 				"tag_id"));
@@ -5991,6 +6033,7 @@
 				gtk_check_menu_item_set_inconsistent(GTK_CHECK_MENU_ITEM(cur->data), FALSE);
 		}
 	}
+	g_list_free(children);
 	g_hash_table_destroy(menu_table);
 	g_hash_table_destroy(menu_allsel_table);
 	/* reset "dont_toggle" state */
@@ -6120,7 +6163,7 @@
 	return TRUE;
 }
 
-#if GTK_CHECK_VERSION(2,12,0) && !GENERIC_UMPC
+#if !GENERIC_UMPC
 static gchar *summaryview_get_tooltip_text(SummaryView *summaryview, MsgInfo *info, gint column)
 {
 	MsgFlags flags;
@@ -6325,15 +6368,9 @@
 	gtk_cmclist_set_column_width(GTK_CMCLIST(ctree), col_pos[S_COL_TAGS],
 				   prefs_common.summary_col_size[S_COL_TAGS]);
 
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 
 	gtk_sctree_set_stripes(GTK_SCTREE(ctree), prefs_common.use_stripes_in_summaries);
 
@@ -6434,7 +6471,7 @@
 			 G_CALLBACK(summary_drag_motion_cb),
 			 summaryview);
 
-#if GTK_CHECK_VERSION(2,12,0) && !GENERIC_UMPC
+#if !GENERIC_UMPC
 	g_object_set (G_OBJECT(ctree), "has-tooltip", TRUE, NULL);
 	g_signal_connect(G_OBJECT(ctree), "query-tooltip", 
 			 G_CALLBACK(tooltip_cb),
@@ -6579,7 +6616,7 @@
 	if (summaryview->selected) {
 		gboolean handled = FALSE;
 		switch (event->keyval) {
-		case GDK_space:		/* Page down or go to the next */
+		case GDK_KEY_space:		/* Page down or go to the next */
 			handled = TRUE;
 			if (event->state & GDK_CONTROL_MASK) {
 				handled = FALSE;
@@ -6602,12 +6639,12 @@
 				}				
 			}
 			break;
-		case GDK_BackSpace:	/* Page up */
+		case GDK_KEY_BackSpace:	/* Page up */
 			handled = TRUE;
 			mimeview_scroll_page(messageview->mimeview, TRUE);
 			break;
-		case GDK_Return:	/* Scroll up/down one line */
-		case GDK_KP_Enter:
+		case GDK_KEY_Return:	/* Scroll up/down one line */
+		case GDK_KEY_KP_Enter:
 			handled = TRUE;
 			if (summaryview->displayed != summaryview->selected) {
 #ifndef GENERIC_UMPC
@@ -6629,21 +6666,21 @@
 		return TRUE;
 
 	switch (event->keyval) {
-	case GDK_Left:		/* Move focus */
+	case GDK_KEY_Left:		/* Move focus */
 		adj = gtk_scrolled_window_get_hadjustment
 			(GTK_SCROLLED_WINDOW(summaryview->scrolledwin));
-		if (adj->lower != adj->value)
+		if (gtk_adjustment_get_lower(adj) != gtk_adjustment_get_value(adj))
 			break;
 		/* FALLTHROUGH */	
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		gtk_widget_grab_focus(summaryview->folderview->ctree);
 		mainwindow_exit_folder(summaryview->mainwin);
 		return TRUE;
-	case GDK_Home:
-	case GDK_End:
+	case GDK_KEY_Home:
+	case GDK_KEY_End:
 		if ((node = summaryview->selected) != NULL) {
 			GtkCMCTreeNode *next = NULL;
-			next = (event->keyval == GDK_Home)
+			next = (event->keyval == GDK_KEY_Home)
 					? gtk_cmctree_node_nth(ctree, 0)
 					: gtk_cmctree_node_nth(ctree, 
 						g_list_length(GTK_CMCLIST(ctree)->row_list)-1);
@@ -6671,16 +6708,17 @@
 	}
 
 	switch (event->keyval) {
-	case GDK_Delete:
+	case GDK_KEY_Delete:
 		BREAK_ON_MODIFIER_KEY();
 		summary_delete_trash(summaryview);
 		break;
-	case GDK_y:
-	case GDK_t:
-	case GDK_l:
-	case GDK_o:
-	case GDK_c:
-	case GDK_a:
+	case GDK_KEY_y:
+	case GDK_KEY_t:
+	case GDK_KEY_l:
+	case GDK_KEY_o:
+	case GDK_KEY_c:
+	case GDK_KEY_a:
+	case GDK_KEY_z:
 		if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) == 0) {
 			g_signal_stop_emission_by_name(G_OBJECT(widget), 
                                        "key_press_event");
@@ -7034,7 +7072,7 @@
 				 GDK_ACTION_MOVE|GDK_ACTION_COPY|GDK_ACTION_DEFAULT, button, event);
 	gtk_drag_set_icon_default(context);
 	if (prefs_common.layout_mode == SMALL_LAYOUT) {
-		GtkWidget *paned = GTK_WIDGET_PTR(summaryview)->parent;
+		GtkWidget *paned = gtk_widget_get_parent(GTK_WIDGET_PTR(summaryview));
 		if (paned && GTK_IS_PANED(paned)) {
 	        	mainwindow_reset_paned(GTK_PANED(paned));
 		}
@@ -7111,14 +7149,14 @@
 
 		if (mail_list != NULL) {
 			gtk_selection_data_set(selection_data,
-					       selection_data->target, 8,
+					       gtk_selection_data_get_target(selection_data), 8,
 					       mail_list, strlen(mail_list));
 			g_free(mail_list);
 		} 
 	} else if (info == TARGET_DUMMY) {
 		if (GTK_CMCLIST(summaryview->ctree)->selection)
 			gtk_selection_data_set(selection_data,
-					       selection_data->target, 8,
+					       gtk_selection_data_get_target(selection_data), 8,
 					       "Dummy-Summaryview", 
 					       strlen("Dummy-Summaryview")+1);
 	} else if (info == TARGET_MAIL_CM_PATH_LIST) {
@@ -7150,7 +7188,7 @@
 
 		if (path_list != NULL) {
 			gtk_selection_data_set(selection_data,
-					       selection_data->target, 8,
+					       gtk_selection_data_get_target(selection_data), 8,
 					       path_list, strlen(path_list));
 			g_free(path_list);
 		}
@@ -7200,7 +7238,8 @@
 			gtk_drag_finish(drag_context, FALSE, FALSE, time);			
 			return;
 		} else {
-			folderview_finish_dnd(data->data, drag_context, time, item);
+			folderview_finish_dnd(gtk_selection_data_get_data(data),
+				drag_context, time, item);
 		}
 	}
 }
@@ -7657,6 +7696,21 @@
  	summary_show(summaryview, summaryview->folder_item);
 }
  
+void summary_toggle_show_read_threads(SummaryView *summaryview)
+{
+	FolderItemUpdateData source;
+	if (summaryview->folder_item->hide_read_threads)
+ 		summaryview->folder_item->hide_read_threads = 0;
+ 	else
+ 		summaryview->folder_item->hide_read_threads = 1;
+
+	source.item = summaryview->folder_item;
+	source.update_flags = F_ITEM_UPDATE_NAME;
+	source.msg = NULL;
+	hooks_invoke(FOLDER_ITEM_UPDATE_HOOKLIST, &source);
+ 	summary_show(summaryview, summaryview->folder_item);
+}
+ 
 static void summary_set_hide_read_msgs_menu (SummaryView *summaryview,
  					     guint action)
 {
@@ -7670,6 +7724,19 @@
  			  GINT_TO_POINTER(0));
 }
 
+static void summary_set_hide_read_threads_menu (SummaryView *summaryview,
+ 					     guint action)
+{
+ 	GtkWidget *widget;
+
+ 	widget = gtk_ui_manager_get_widget(summaryview->mainwin->ui_manager, "/Menu/View/HideReadThreads");
+ 	g_object_set_data(G_OBJECT(widget), "dont_toggle",
+ 			  GINT_TO_POINTER(1));
+ 	gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM(widget), action);
+ 	g_object_set_data(G_OBJECT(widget), "dont_toggle",
+ 			  GINT_TO_POINTER(0));
+}
+
 static void summary_set_hide_del_msgs_menu (SummaryView *summaryview,
  					     guint action)
 {
@@ -7733,20 +7800,22 @@
 void summary_reflect_prefs_custom_colors(SummaryView *summaryview)
 {
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 
 	/* re-create colorlabel submenu */
 	menu = GTK_MENU_SHELL(summaryview->colorlabel_menu);
 	cm_return_if_fail(menu != NULL);
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		g_signal_handlers_disconnect_matched
 			 (gtk_ui_manager_get_accel_group(summaryview->mainwin->ui_manager), 
 			 G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC,
 			 0, 0, NULL, mainwin_accel_changed_cb, cur->data);
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(cur->data), NULL);
 	}
+	g_list_free(children);
 	summary_colorlabel_menu_create(summaryview, TRUE);
 }
 

Index: importpine.c
===================================================================
RCS file: /home/claws-mail/claws/src/importpine.c,v
retrieving revision 1.1.14.22
retrieving revision 1.1.14.22.2.1
diff -u -d -r1.1.14.22 -r1.1.14.22.2.1
--- importpine.c	16 Feb 2011 07:16:03 -0000	1.1.14.22
+++ importpine.c	29 Nov 2011 00:15:21 -0000	1.1.14.22.2.1
@@ -174,7 +174,7 @@
 }
 
 static gboolean imp_pine_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: prefs_folder_item.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_folder_item.c,v
retrieving revision 1.52.2.83
retrieving revision 1.52.2.83.2.1
diff -u -d -r1.52.2.83 -r1.52.2.83.2.1
--- prefs_folder_item.c	9 May 2011 18:59:13 -0000	1.52.2.83
+++ prefs_folder_item.c	29 Nov 2011 00:15:22 -0000	1.52.2.83.2.1
@@ -249,7 +249,6 @@
 	GtkWidget *enable_processing_when_opening_rec_checkbtn;
 	GtkWidget *newmailcheck_rec_checkbtn;
 	GtkWidget *offlinesync_rec_checkbtn;
-	CLAWS_TIP_DECL();
 
 	page->item	   = item;
 
@@ -629,8 +628,9 @@
 {
 	FolderItemPrefs *prefs = folder->prefs;
 	gchar *buf;
-	gboolean all = FALSE;
+	gboolean all = FALSE, summary_update_needed = FALSE;
 	SpecialFolderItemType type = F_NORMAL;
+	FolderView *folderview = mainwindow_get_mainwindow()->folderview;
 
 	if (folder->path == NULL)
 		return;
@@ -643,14 +643,20 @@
 	type = combobox_get_active_data(GTK_COMBO_BOX(page->folder_type));
 	if (all && folder->stype != type && page->item->parent_stype == F_NORMAL) {
 		folder_item_change_type(folder, type);
+		summary_update_needed = TRUE;
 	}
 
 #ifndef G_OS_WIN32
 	if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->simplify_subject_rec_checkbtn))) {
+		gboolean old_simplify_subject = prefs->enable_simplify_subject;
+		int regexp_diffs = strcmp2(prefs->simplify_subject_regexp, gtk_editable_get_chars(
+					GTK_EDITABLE(page->entry_simplify_subject), 0, -1));
 		prefs->enable_simplify_subject =
 			gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_simplify_subject));
 		ASSIGN_STRING(prefs->simplify_subject_regexp,
 			      gtk_editable_get_chars(GTK_EDITABLE(page->entry_simplify_subject), 0, -1));
+		if (old_simplify_subject != prefs->enable_simplify_subject || regexp_diffs != 0)
+			summary_update_needed = TRUE;
 	}
 #endif	
 	if (all || gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->folder_chmod_rec_checkbtn))) {
@@ -695,6 +701,11 @@
 	}
 
 	folder_item_prefs_save_config(folder);
+
+	if (folder->opened && summary_update_needed) {
+		summary_set_prefs_from_folderitem(folderview->summaryview, folder);
+		summary_show(folderview->summaryview, folder);
+	}	
 }	
 
 static gboolean general_save_recurse_func(GNode *node, gpointer data)
@@ -1665,8 +1676,12 @@
 
 static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
 {
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	static GdkColor red;
 	static gboolean colors_initialised = FALSE;
+#else
+	static GdkColor red = { (guint32)0, (guint16)0xff, (guint16)0x70, (guint16)0x70 };
+#endif
 	static gchar buf[BUFFSIZE];
 	FolderItemGeneralPage *page = (FolderItemGeneralPage *)data;
 	gchar *test_string, *regexp;
@@ -1692,17 +1707,20 @@
 		return;
 	}
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (!colors_initialised) {
 		gdk_color_parse("#ff7070", &red);
 		colors_initialised = gdk_colormap_alloc_color(
 			gdk_colormap_get_system(), &red, FALSE, TRUE);
 	}
+#endif
 
 	preg = summary_compile_simplify_regexp(regexp);
-	if (colors_initialised) {
+#if !GTK_CHECK_VERSION(3, 0, 0)
+	if (colors_initialised)
 		gtk_widget_modify_base(page->entry_simplify_subject,
 				GTK_STATE_NORMAL, preg ? NULL : &red);
-	}
+#endif
 
 	if (preg != NULL) {
 		string_remove_match(buf, BUFFSIZE, test_string, preg);

Index: prefs_filtering.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_filtering.c,v
retrieving revision 1.59.2.82
retrieving revision 1.59.2.82.2.1
diff -u -d -r1.59.2.82 -r1.59.2.82.2.1
--- prefs_filtering.c	16 Feb 2011 07:16:12 -0000	1.59.2.82
+++ prefs_filtering.c	29 Nov 2011 00:15:22 -0000	1.59.2.82.2.1
@@ -114,6 +114,8 @@
 static gint prefs_filtering_deleted	(GtkWidget	*widget,
 					 GdkEventAny	*event,
 					 gpointer	 data);
+static void prefs_filtering_row_selected(GtkTreeSelection *selection,
+					 GtkTreeView *list_view);
 static gboolean prefs_filtering_key_pressed(GtkWidget	*widget,
 					 GdkEventKey	*event,
 					 gpointer	 data);
@@ -330,7 +332,6 @@
 	GtkWidget *bottom_btn;
 	GtkWidget *table;
 	static GdkGeometry geometry;
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating filtering configuration window...\n");
 
@@ -645,97 +646,13 @@
 static void rename_path(GSList * filters,
 			const gchar * old_path, const gchar * new_path)
 {
-	gchar *base;
-	gchar *prefix;
-	gchar *suffix;
-	gchar *dest_path;
-	gchar *old_path_with_sep;
-	gint destlen;
-	gint prefixlen;
-	gint oldpathlen;
-        GSList * action_cur;
         GSList * cur;
-	const gchar *separator=G_DIR_SEPARATOR_S;
-	gboolean matched = FALSE;
-#ifdef G_OS_WIN32
-again:
-#endif
-	oldpathlen = strlen(old_path);
-	old_path_with_sep = g_strconcat(old_path,separator,NULL);
 
 	for (cur = filters; cur != NULL; cur = cur->next) {
 		FilteringProp   *filtering = (FilteringProp *)cur->data;
-                
-                for(action_cur = filtering->action_list ; action_cur != NULL ;
-                    action_cur = action_cur->next) {
-
-                        FilteringAction *action = action_cur->data;
-                        
-                        if (action->type == MATCHACTION_SET_TAG ||
-			    action->type == MATCHACTION_UNSET_TAG)
-				continue;
-                        if (!action->destination) 
-				continue;
-                        
-                        destlen = strlen(action->destination);
-                        
-                        if (destlen > oldpathlen) {
-                                prefixlen = destlen - oldpathlen;
-                                suffix = action->destination + prefixlen;
-                                
-                                if (!strncmp(old_path, suffix, oldpathlen)) {
-                                        prefix = g_malloc0(prefixlen + 1);
-                                        strncpy2(prefix, action->destination, prefixlen);
-                                        
-                                        base = suffix + oldpathlen;
-                                        while (*base == G_DIR_SEPARATOR) base++;
-                                        if (*base == '\0')
-                                                dest_path = g_strconcat(prefix,
-                                                    separator,
-                                                    new_path, NULL);
-                                        else
-                                                dest_path = g_strconcat(prefix,
-                                                    separator,
-                                                    new_path,
-                                                    separator,
-                                                    base, NULL);
-                                        
-                                        g_free(prefix);
-                                        g_free(action->destination);
-                                        action->destination = dest_path;
-					matched = TRUE;
-                                } else { /* for non-leaf folders */
-                                        /* compare with trailing slash */
-                                        if (!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) {
-                                                
-                                                suffix = action->destination + oldpathlen + 1;
-                                                dest_path = g_strconcat(new_path,
-                                                    separator,
-                                                    suffix, NULL);
-                                                g_free(action->destination);
-                                                action->destination = dest_path;
-						matched = TRUE;
-                                        }
-                                }
-                        } else {
-                                /* folder-moving a leaf */
-                                if (!strcmp(old_path, action->destination)) {
-                                        dest_path = g_strdup(new_path);
-                                        g_free(action->destination);
-                                        action->destination = dest_path;
-					matched = TRUE;
-                                }
-                        }
-                }
+		filtering_action_list_rename_path(filtering->action_list,
+						  old_path, new_path);
         }
-	
-	g_free(old_path_with_sep);
-#ifdef G_OS_WIN32
-	if (!strcmp(separator, G_DIR_SEPARATOR_S) && !matched) {
-		separator = "/";
-		goto again;
-	}
-#endif
 }
 
 static gboolean prefs_filtering_rename_path_func(GNode *node, gpointer data)
@@ -1262,7 +1179,9 @@
 
 	filteringprop_free(prop);
 
-	prefs_filtering_reset_dialog();
+	prefs_filtering_row_selected(gtk_tree_view_get_selection(
+				GTK_TREE_VIEW(filtering.cond_list_view)),
+				GTK_TREE_VIEW(filtering.cond_list_view));
 	modified = TRUE;
 }
 
@@ -1532,7 +1451,7 @@
 static gboolean prefs_filtering_key_pressed(GtkWidget *widget, GdkEventKey *event,
 				     gpointer data)
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		prefs_filtering_cancel(NULL, NULL);
 		return TRUE;			
 	}
@@ -1778,6 +1697,21 @@
 #endif
 };
 
+static void prefs_filtering_row_selected(GtkTreeSelection *selection,
+					 GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_filtering_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_filtering_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				    GtkTreeView *list_view)
 {
@@ -1881,6 +1815,8 @@
 	
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_filtering_row_selected), list_view);
 
 	/* create the columns */
 	prefs_filtering_create_list_view_columns(GTK_WIDGET(list_view));

Index: messageview.c
===================================================================
RCS file: /home/claws-mail/claws/src/messageview.c,v
retrieving revision 1.94.2.218.2.1
retrieving revision 1.94.2.218.2.2
diff -u -d -r1.94.2.218.2.1 -r1.94.2.218.2.2
--- messageview.c	7 Sep 2011 15:52:26 -0000	1.94.2.218.2.1
+++ messageview.c	29 Nov 2011 00:15:21 -0000	1.94.2.218.2.2
@@ -635,6 +635,9 @@
 	hildon_window_set_menu(HILDON_WINDOW(window), GTK_MENU(menubar));
 #endif
 
+	cm_toggle_menu_set_active_full(msgview->ui_manager, "Menu/View/AllHeaders",
+					prefs_common.show_all_headers);
+
 	if (prefs_common.toolbar_detachable) {
 		handlebox = gtk_handle_box_new();
 	} else {
@@ -1070,7 +1073,7 @@
 
 	/* send it */
 	path = folder_item_fetch_msg(queue, num);
-	ok = procmsg_send_message_queue(path, &foo, queue, num, &queued_removed);
+	ok = procmsg_send_message_queue_with_lock(path, &foo, queue, num, &queued_removed);
 	g_free(path);
 	g_free(foo);
 	if (ok == 0 && !queued_removed)
@@ -1135,7 +1138,7 @@
 {
 	gchar *text = NULL;
 	gchar *file;
-	MimeInfo *mimeinfo, *encinfo, *brokeninfo;
+	MimeInfo *mimeinfo, *encinfo, *brokeninfo, *root;
 	gchar *subject = NULL;
 	cm_return_val_if_fail(msginfo != NULL, -1);
 
@@ -1243,9 +1246,6 @@
 
 	messageview_set_position(messageview, 0);
 
-	textview_set_all_headers(messageview->mimeview->textview, 
-			messageview->all_headers);
-
 #ifdef MAEMO
 	maemo_window_full_screen_if_needed(GTK_WINDOW(messageview->window));
 #endif
@@ -1314,6 +1314,7 @@
 		noticeview_show(messageview->noticeview);
 	}
 			
+	root = mimeinfo;
 	mimeinfo = procmime_mimeinfo_next(mimeinfo);
 	if (!all_headers && mimeinfo 
 			&& (mimeinfo->type != MIMETYPE_TEXT || 
@@ -1385,7 +1386,8 @@
 			if (!mimeinfo) 
 				mimeinfo = saved_mimeinfo;
 
-			mimeview_show_part(messageview->mimeview,mimeinfo);
+			if (!mimeview_show_part(messageview->mimeview, mimeinfo))
+				mimeview_select_mimepart_icon(messageview->mimeview, root);
 			goto done;
 		} else if (prefs_common.invoke_plugin_on_html) {
 			mimeview_select_mimepart_icon(messageview->mimeview, mimeinfo);
@@ -1405,6 +1407,8 @@
 			mimeinfo = procmime_mimeinfo_next(mimeinfo);
 		}
 	}
+
+	mimeview_select_mimepart_icon(messageview->mimeview, root);
 done:
 	/* plugins may hook in here to work with the message view */
 	hooks_invoke(MESSAGE_VIEW_SHOW_DONE_HOOKLIST, messageview);
@@ -1721,20 +1725,17 @@
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
 			MessageView *messageview)
 {
-	if (event && event->keyval == GDK_Escape && messageview->window) {
+	if (event && event->keyval == GDK_KEY_Escape && messageview->window) {
 		messageview_destroy(messageview);
 		return TRUE;
 	}
 
 	if (event && (event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0)
 		return FALSE;
-	if (event && (event->state & GDK_SHIFT_MASK) && event->keyval != GDK_space) 
+	if (event && (event->state & GDK_SHIFT_MASK) && event->keyval != GDK_KEY_space) 
 		return FALSE;
 
-	g_signal_stop_emission_by_name(G_OBJECT(widget),
-					"key_press_event");
-	mimeview_pass_key_press_event(messageview->mimeview, event);
-	return FALSE;
+	return mimeview_pass_key_press_event(messageview->mimeview, event);
 }
 #endif
 
@@ -2551,13 +2552,14 @@
 	if (messageview->updating)
 		return;
 
-	messageview->all_headers = 
+	messageview->all_headers = prefs_common.show_all_headers =
 			gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	if (!msginfo) return;
 	messageview->msginfo = NULL;
-	messageview_show(messageview, msginfo,gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
+	messageview_show(messageview, msginfo, messageview->all_headers);
 	procmsg_msginfo_free(msginfo);
 	main_window_set_menu_sensitive(messageview->mainwin);
+	summary_redisplay_msg(messageview->mainwin->summaryview);
 }
 
 static void msg_hide_quotes_cb(GtkToggleAction *action, gpointer data)
@@ -2683,8 +2685,8 @@
 	         full_msginfo->extradata &&
 		 full_msginfo->extradata->xface) {
 		image = xface_get_from_header(full_msginfo->extradata->xface,
-				&messageview->mainwin->summaryview->ctree->style->white,
-				messageview->window->window);	
+				&(gtk_widget_get_style(messageview->mainwin->summaryview->ctree)->white),
+				gtk_widget_get_window(messageview->window));
 	}
 #endif
 	procmsg_msginfo_free(full_msginfo);

Index: export.c
===================================================================
RCS file: /home/claws-mail/claws/src/export.c,v
retrieving revision 1.8.2.31
retrieving revision 1.8.2.31.2.1
diff -u -d -r1.8.2.31 -r1.8.2.31.2.1
--- export.c	16 Feb 2011 07:15:58 -0000	1.8.2.31
+++ export.c	29 Nov 2011 00:15:20 -0000	1.8.2.31.2.1
@@ -276,7 +276,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		export_cancel_cb(NULL, NULL);
 	return FALSE;
 }

Index: procmsg.h
===================================================================
RCS file: /home/claws-mail/claws/src/procmsg.h,v
retrieving revision 1.60.2.56
retrieving revision 1.60.2.56.2.1
diff -u -d -r1.60.2.56 -r1.60.2.56.2.1
--- procmsg.h	16 Feb 2011 07:16:15 -0000	1.60.2.56
+++ procmsg.h	29 Nov 2011 00:15:23 -0000	1.60.2.56.2.1
@@ -330,6 +330,8 @@
 gint	procmsg_send_queue		(FolderItem	*queue,
 					 gboolean	 save_msgs,
 					 gchar		**errstr);
+gboolean procmsg_queue_lock		(gchar		**errstr);
+void     procmsg_queue_unlock		(void);
 gboolean procmsg_queue_is_empty	(FolderItem *queue);
 void	procmsg_print_message		(MsgInfo	*msginfo,
 					 const gchar	*cmdline);
@@ -344,6 +346,12 @@
 void	 procmsg_msginfo_free		(MsgInfo	*msginfo);
 guint	 procmsg_msginfo_memusage	(MsgInfo	*msginfo);
 
+gint procmsg_send_message_queue_with_lock(const gchar *file,
+					  gchar **errstr,
+					  FolderItem *queue,
+					  gint msgnum,
+					  gboolean *queued_removed);
+
 gint procmsg_send_message_queue		(const gchar *file,
 					 gchar **errstr,
 					 FolderItem *queue, 

Index: summary_search.c
===================================================================
RCS file: /home/claws-mail/claws/src/summary_search.c,v
retrieving revision 1.15.2.65
retrieving revision 1.15.2.65.2.1
diff -u -d -r1.15.2.65 -r1.15.2.65.2.1
--- summary_search.c	10 Apr 2011 17:19:04 -0000	1.15.2.65
+++ summary_search.c	29 Nov 2011 00:15:23 -0000	1.15.2.65.2.1
@@ -27,7 +27,9 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtk/gtksctree.h"
+#endif
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -220,7 +222,6 @@
 	GtkWidget *close_btn;
 	GtkWidget *stop_btn;
 	gboolean is_searching = FALSE;
-	CLAWS_TIP_DECL();
 
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "summary_search");
 	gtk_window_set_title(GTK_WINDOW (window), _("Search messages"));
@@ -934,7 +935,7 @@
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
 			    gpointer data)
 {
-	if (event && (event->keyval == GDK_Escape)) {
+	if (event && (event->keyval == GDK_KEY_Escape)) {
 		/* ESC key will:
 			- stop a running search
 			- close the search window if no search is running
@@ -946,13 +947,13 @@
 		}
 	}
 
-	if (event && (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter)) {
+	if (event && (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter)) {
 		if (!search_window.is_searching) {
 			summary_search_execute(FALSE, FALSE);
 		}
 	}
 
-	if (event && (event->keyval == GDK_Down || event->keyval == GDK_Up)) {
+	if (event && (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_Up)) {
 		if (search_window.from_entry_has_focus) {
 			combobox_set_value_from_arrow_key(
 					GTK_COMBO_BOX(search_window.from_entry),

Index: compose.c
===================================================================
RCS file: /home/claws-mail/claws/src/compose.c,v
retrieving revision 1.382.2.580.2.1
retrieving revision 1.382.2.580.2.2
diff -u -d -r1.382.2.580.2.1 -r1.382.2.580.2.2
--- compose.c	7 Sep 2011 15:52:25 -0000	1.382.2.580.2.1
+++ compose.c	29 Nov 2011 00:15:19 -0000	1.382.2.580.2.2
@@ -88,10 +88,10 @@
 #include "codeconv.h"
 #include "utils.h"
 #include "gtkutils.h"
+#include "gtkshruler.h"
 #include "socket.h"
 #include "alertpanel.h"
 #include "manage_window.h"
-#include "gtkshruler.h"
 #include "folder.h"
 #include "addr_compl.h"
 #include "quote_fmt.h"
@@ -225,6 +225,9 @@
 						 ComposeEntryType to_type);
 static gint compose_parse_header		(Compose	*compose,
 						 MsgInfo	*msginfo);
+static gint compose_parse_manual_headers	(Compose	*compose,
+						 MsgInfo	*msginfo,
+						 HeaderEntry	*entries);
 static gchar *compose_parse_references		(const gchar	*ref,
 						 const gchar	*msgid);
 
@@ -296,6 +299,7 @@
 static int compose_add_attachments		(Compose	*compose,
 						 MimeInfo	*parent);
 static gchar *compose_get_header		(Compose	*compose);
+static gchar *compose_get_manual_headers_info	(Compose	*compose);
 
 static void compose_convert_header		(Compose	*compose,
 						 gchar		*dest,
@@ -356,6 +360,9 @@
 
 /* callback functions */
 
+static void compose_notebook_size_alloc (GtkNotebook *notebook,
+					 GtkAllocation *allocation,
+					 Compose *compose);
 static gboolean compose_edit_size_alloc (GtkEditable	*widget,
 					 GtkAllocation	*allocation,
 					 GtkSHRuler	*shruler);
@@ -386,6 +393,8 @@
 
 static void compose_close_cb		(GtkAction	*action,
 					 gpointer	 data);
+static void compose_print_cb		(GtkAction	*action,
+					 gpointer	 data);
 
 static void compose_set_encoding_cb	(GtkAction	*action, GtkRadioAction *current, gpointer data);
 
@@ -574,6 +583,8 @@
 	/* {"Message/---",		NULL, "---" }, */
 	{"Message/Save",		NULL, N_("_Save"), "<control>S", NULL, G_CALLBACK(compose_save_cb) }, /*COMPOSE_KEEP_EDITING*/
 	/* {"Message/---",		NULL, "---" }, */
+	{"Message/Print",		NULL, N_("_Print"), NULL, NULL, G_CALLBACK(compose_print_cb) },
+	/* {"Message/---",		NULL, "---" }, */
 	{"Message/Close",		NULL, N_("_Close"), "<control>W", NULL, G_CALLBACK(compose_close_cb) },
 
 /* Edit menu */
@@ -585,7 +596,7 @@
 	{"Edit/Copy",			NULL, N_("_Copy"), "<control>C", NULL, G_CALLBACK(compose_copy_cb) },
 	{"Edit/Paste",			NULL, N_("_Paste"), "<control>V", NULL, G_CALLBACK(compose_paste_cb) },
 
-	{"Edit/SpecialPaste",		NULL, N_("Special paste") },
+	{"Edit/SpecialPaste",		NULL, N_("_Special paste") },
 	{"Edit/SpecialPaste/AsQuotation",	NULL, N_("as _quotation"), NULL, NULL, G_CALLBACK(compose_paste_as_quote_cb) },
 	{"Edit/SpecialPaste/Wrapped",	NULL, N_("_wrapped"), NULL, NULL, G_CALLBACK(compose_paste_wrap_cb) },
 	{"Edit/SpecialPaste/Unwrapped",	NULL, N_("_unwrapped"), NULL, NULL, G_CALLBACK(compose_paste_no_wrap_cb) },
@@ -791,10 +802,12 @@
 {
 	GtkTextBuffer *buffer;
 	GdkColor black = {(gulong)0, (gushort)0, (gushort)0, (gushort)0};
+#if !GTK_CHECK_VERSION(2, 24, 0)
 	GdkColormap *cmap;
-	GdkColor color[8];
 	gboolean success[8];
 	int i;
+#endif
+	GdkColor color[8];
 
 	buffer = gtk_text_view_get_buffer(text);
 
@@ -864,7 +877,8 @@
 	color[5] = quote_bgcolor3;
 	color[6] = signature_color;
 	color[7] = uri_color;
-	cmap = gdk_drawable_get_colormap(compose->window->window);
+#if !GTK_CHECK_VERSION(2, 24, 0)
+	cmap = gdk_drawable_get_colormap(gtk_widget_get_window(compose->window));
 	gdk_colormap_alloc_colors(cmap, color, 8, FALSE, TRUE, success);
 
 	for (i = 0; i < 8; i++) {
@@ -878,6 +892,7 @@
 				signature_color = uri_color = black;
 		}
 	}
+#endif
 }
 
 Compose *compose_new(PrefsAccount *account, const gchar *mailto,
@@ -1585,7 +1600,8 @@
 
 	undo_block(compose->undostruct);
 #ifdef USE_ENCHANT
-		compose_set_dictionaries_from_folder_prefs(compose, msginfo->folder);
+	compose_set_dictionaries_from_folder_prefs(compose, msginfo->folder);
+	gtkaspell_block_check(compose->gtkaspell);
 #endif
 
 	if (quote_mode == COMPOSE_QUOTE_FORCED ||
@@ -1621,10 +1637,6 @@
 					  _("The body of the \"Reply\" template has an error at line %d."));
 		compose_attach_from_list(compose, quote_fmt_get_attachments_list(), FALSE);
 		quote_fmt_reset_vartable();
-#ifdef USE_ENCHANT
-		if (compose->gtkaspell && compose->gtkaspell->check_while_typing)
-			gtkaspell_highlight_all(compose->gtkaspell);
-#endif
 	}
 
 	if (MSG_IS_ENCRYPTED(compose->replyinfo->flags)) {
@@ -1644,6 +1656,11 @@
 
 	compose_wrap_all(compose);
 
+#ifdef USE_ENCHANT
+	if (compose->gtkaspell && compose->gtkaspell->check_while_typing)
+		gtkaspell_highlight_all(compose->gtkaspell);
+	gtkaspell_unblock_check(compose->gtkaspell);
+#endif
 	SIGNAL_UNBLOCK(textbuf);
 	
 	gtk_widget_grab_focus(compose->text);
@@ -1742,6 +1759,7 @@
 		pref_get_unescaped_pref(tmp, msginfo->folder->prefs->forward_override_from_format);
 
 #ifdef USE_ENCHANT
+		gtkaspell_block_check(compose->gtkaspell);
 		quote_fmt_init(full_msginfo, NULL, NULL, FALSE, compose->account, FALSE,
 				compose->gtkaspell);
 #else
@@ -1823,10 +1841,6 @@
 		compose_attach_parts(compose, msginfo);
 
 		procmsg_msginfo_free(full_msginfo);
-#ifdef USE_ENCHANT
-		if (compose->gtkaspell && compose->gtkaspell->check_while_typing)
-			gtkaspell_highlight_all(compose->gtkaspell);
-#endif
 	}
 
 	SIGNAL_BLOCK(textbuf);
@@ -1836,6 +1850,11 @@
 
 	compose_wrap_all(compose);
 
+#ifdef USE_ENCHANT
+	if (compose->gtkaspell && compose->gtkaspell->check_while_typing)
+		gtkaspell_highlight_all(compose->gtkaspell);
+	gtkaspell_unblock_check(compose->gtkaspell);
+#endif
 	SIGNAL_UNBLOCK(textbuf);
 	
 	cursor_pos = quote_fmt_get_cursor_pos();
@@ -2118,6 +2137,7 @@
 	MsgInfo *replyinfo = NULL, *fwdinfo = NULL;
 	gboolean autowrap = prefs_common.autowrap;
 	gboolean autoindent = prefs_common.auto_indent;
+	HeaderEntry *manual_headers = NULL;
 
 	cm_return_val_if_fail(msginfo != NULL, NULL);
 	cm_return_val_if_fail(msginfo->folder != NULL, NULL);
@@ -2224,6 +2244,15 @@
 			}
 			g_strfreev(tokens);
 		}
+		/* Get manual headers */
+		if (!procheader_get_header_from_msginfo(msginfo, queueheader_buf, sizeof(queueheader_buf), "X-Claws-Manual-Headers:")) {
+			gchar *listmh = g_strdup(&queueheader_buf[strlen("X-Claws-Manual-Headers:")]);
+			if (*listmh != '\0') {
+				debug_print("Got manual headers: %s\n", listmh);
+				manual_headers = procheader_entries_from_str(listmh);
+			}
+			g_free(listmh);
+		}
 	} else {
 		account = msginfo->folder->folder->account;
 	}
@@ -2332,6 +2361,16 @@
 					G_CALLBACK(compose_changed_cb),
 					compose);
 
+	if (manual_headers != NULL) {
+		if (compose_parse_manual_headers(compose, msginfo, manual_headers) < 0) {
+			procheader_entries_free(manual_headers);
+			compose->updating = FALSE;
+			compose_destroy(compose);
+			return NULL;
+		}
+		procheader_entries_free(manual_headers);
+	}
+
 	gtk_widget_grab_focus(compose->text);
 
         if (prefs_common.auto_exteditor) {
@@ -2538,12 +2577,18 @@
 
 static void compose_entry_mark_default_to(Compose *compose, const gchar *mailto)
 {
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	static GdkColor yellow;
 	static GdkColor black;
 	static gboolean yellow_initialised = FALSE;
+#else
+	static GdkColor yellow = { (guint32)0, (guint16)0xf5, (guint16)0xf6, (guint16)0xbe };
+	static GdkColor black = { (guint32)0, (guint16)0x0, (guint16)0x0, (guint16)0x0 };
+#endif
 	GSList *h_list;
 	GtkEntry *entry;
 		
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (!yellow_initialised) {
 		gdk_color_parse("#f5f6be", &yellow);
 		gdk_color_parse("#000000", &black);
@@ -2552,19 +2597,24 @@
 		yellow_initialised &= gdk_colormap_alloc_color(
 			gdk_colormap_get_system(), &black, FALSE, TRUE);
 	}
+#endif
 
 	for (h_list = compose->header_list; h_list != NULL; h_list = h_list->next) {
 		entry = GTK_ENTRY(((ComposeHeaderEntry *)h_list->data)->entry);
 		if (gtk_entry_get_text(entry) && 
 		    !g_utf8_collate(gtk_entry_get_text(entry), mailto)) {
+#if !GTK_CHECK_VERSION(3, 0, 0)
 			if (yellow_initialised) {
+#endif
 				gtk_widget_modify_base(
 					GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
 					GTK_STATE_NORMAL, &yellow);
 				gtk_widget_modify_text(
 					GTK_WIDGET(((ComposeHeaderEntry *)h_list->data)->entry),
 					GTK_STATE_NORMAL, &black);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 			}
+#endif
 		}
 	}
 }
@@ -2861,6 +2911,33 @@
 	return 0;
 }
 
+static gint compose_parse_manual_headers(Compose *compose, MsgInfo *msginfo, HeaderEntry *entries)
+{
+	FILE *fp;
+	HeaderEntry *he;
+
+	cm_return_val_if_fail(msginfo != NULL, -1);
+
+	if ((fp = procmsg_open_message(msginfo)) == NULL) return -1;
+	procheader_get_header_fields(fp, entries);
+	fclose(fp);
+
+	he = entries;
+	while (he != NULL && he->name != NULL) {
+		GtkTreeIter iter;
+		GtkListStore *model = NULL;
+
+		debug_print("Adding manual header: %s with value %s\n", he->name, he->body);
+		model = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(compose->header_last->combo)));
+		COMBOBOX_ADD(model, he->name, COMPOSE_TO);
+		gtk_combo_box_set_active_iter(GTK_COMBO_BOX(compose->header_last->combo), &iter);
+		gtk_entry_set_text(GTK_ENTRY(compose->header_last->entry), he->body);
+		++he;
+	}
+
+	return 0;
+}
+
 static gchar *compose_parse_references(const gchar *ref, const gchar *msgid)
 {
 	GSList *ref_id_list, *cur;
@@ -4545,7 +4622,7 @@
 		*par_iter = iter;
 	undo_wrapping(compose->undostruct, FALSE);
 	compose->autowrap = prev_autowrap;
-	
+
 	return modified;
 }
 
@@ -4993,10 +5070,10 @@
 	}
 	if (msgpath == NULL) {
 		msgpath = folder_item_fetch_msg(folder, msgnum);
-		val = procmsg_send_message_queue(msgpath, &errstr, folder, msgnum, &queued_removed);
+		val = procmsg_send_message_queue_with_lock(msgpath, &errstr, folder, msgnum, &queued_removed);
 		g_free(msgpath);
 	} else {
-		val = procmsg_send_message_queue(msgpath, &errstr, folder, msgnum, &queued_removed);
+		val = procmsg_send_message_queue_with_lock(msgpath, &errstr, folder, msgnum, &queued_removed);
 		claws_unlink(msgpath);
 		g_free(msgpath);
 	}
@@ -6088,6 +6165,55 @@
 	return;
 }
 
+static gchar *compose_get_manual_headers_info(Compose *compose)
+{
+	GString *sh_header = g_string_new(" ");
+	GSList *list;
+	gchar *std_headers[] = {"To:", "Cc:", "Bcc:", "Newsgroups:", "Reply-To:", "Followup-To:", NULL};
+
+	for (list = compose->header_list; list; list = list->next) {
+    		ComposeHeaderEntry *headerentry;
+		gchar *tmp;
+		gchar *headername;
+		gchar *headername_wcolon;
+		const gchar *headername_trans;
+		gchar **string;
+		gboolean standard_header = FALSE;
+
+		headerentry = ((ComposeHeaderEntry *)list->data);
+
+		tmp = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo))))));
+		g_strstrip(tmp);
+		if (*tmp == '\0' || strchr(tmp, ' ') != NULL || strchr(tmp, '\r') != NULL || strchr(tmp, '\n') != NULL) {
+			g_free(tmp);
+			continue;
+		}
+
+		if (!strstr(tmp, ":")) {
+			headername_wcolon = g_strconcat(tmp, ":", NULL);
+			headername = g_strdup(tmp);
+		} else {
+			headername_wcolon = g_strdup(tmp);
+			headername = g_strdup(strtok(tmp, ":"));
+		}
+		g_free(tmp);
+		
+		string = std_headers;
+		while (*string != NULL) {
+			headername_trans = prefs_common_translated_header_name(*string);
+			if (!strcmp(headername_trans, headername_wcolon))
+				standard_header = TRUE;
+			string++;
+		}
+		if (!standard_header && !IS_IN_CUSTOM_HEADER(headername))
+			g_string_append_printf(sh_header, "%s ", headername);
+		g_free(headername);
+		g_free(headername_wcolon);
+	}
+	g_string_truncate(sh_header, strlen(sh_header->str) - 1); /* remove last space */
+	return g_string_free(sh_header, FALSE);
+}
+
 static gchar *compose_get_header(Compose *compose)
 {
 	gchar buf[BUFFSIZE];
@@ -6922,7 +7048,7 @@
                                        Compose *compose)
 {
 	gint prev_autowrap;
-	GtkTextBuffer *buffer = GTK_TEXT_VIEW(text)->buffer;
+	GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(text));
 #if USE_ENCHANT
 	if (event->button == 3) {
 		GtkTextIter iter;
@@ -7077,7 +7203,6 @@
 	GtkWidget *text;
 	GtkTextBuffer *buffer;
 	GtkClipboard *clipboard;
-	CLAWS_TIP_DECL();
 
 	UndoMain *undostruct;
 
@@ -7116,7 +7241,8 @@
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "compose");
 
 	gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-	gtk_widget_set_size_request(window, -1, prefs_common.compose_height);
+	gtk_widget_set_size_request(window, prefs_common.compose_width,
+					prefs_common.compose_height);
 
 	if (!geometry.max_width) {
 		geometry.max_width = gdk_screen_width();
@@ -7184,6 +7310,8 @@
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator2", "Message/---", GTK_UI_MANAGER_SEPARATOR)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Save", "Message/Save", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator3", "Message/---", GTK_UI_MANAGER_SEPARATOR)
+	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Print", "Message/Print", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator4", "Message/---", GTK_UI_MANAGER_SEPARATOR)
 	MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Close", "Message/Close", GTK_UI_MANAGER_MENUITEM)
 
 /* Edit menu */
@@ -7370,7 +7498,7 @@
 	
 	/* Notebook */
 	notebook = gtk_notebook_new();
-	gtk_widget_set_size_request(notebook, -1, 130);
+	gtk_widget_set_size_request(notebook, -1, prefs_common.compose_notebook_height);
 	gtk_widget_show(notebook);
 
 	/* header labels and entries */
@@ -7434,8 +7562,8 @@
 	ruler_hbox = gtk_hbox_new(FALSE, 0);
 	gtk_box_pack_start(GTK_BOX(edit_vbox), ruler_hbox, FALSE, FALSE, 0);
 
-	ruler = gtk_shruler_new();
-	gtk_ruler_set_range(GTK_RULER(ruler), 0.0, 100.0, 1.0, 100.0);
+	ruler = gtk_shruler_new(GTK_ORIENTATION_HORIZONTAL);
+	gtk_shruler_set_range(GTK_SHRULER(ruler), 0.0, 100.0, 1.0);
 	gtk_box_pack_start(GTK_BOX(ruler_hbox), ruler, TRUE, TRUE,
 			   BORDER_WIDTH);
 
@@ -7447,7 +7575,6 @@
 	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scrolledwin),
 					    GTK_SHADOW_IN);
 	gtk_box_pack_start(GTK_BOX(edit_vbox), scrolledwin, TRUE, TRUE, 0);
-	gtk_widget_set_size_request(scrolledwin, prefs_common.compose_width, -1);
 
 	text = gtk_text_view_new();
 	if (prefs_common.show_compose_margin) {
@@ -7461,7 +7588,8 @@
 	gtk_text_buffer_add_selection_clipboard(buffer, clipboard);
 	
 	gtk_container_add(GTK_CONTAINER(scrolledwin), text);
-
+	g_signal_connect(G_OBJECT(notebook), "size_allocate",
+			 G_CALLBACK(compose_notebook_size_alloc), compose);	
 	g_signal_connect_after(G_OBJECT(text), "size_allocate",
 			       G_CALLBACK(compose_edit_size_alloc),
 			       ruler);
@@ -7880,7 +8008,7 @@
 
 	cm_return_if_fail(GTK_IS_CHECK_MENU_ITEM(widget));
 
-	if (!GTK_CHECK_MENU_ITEM(widget)->active)
+	if (!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(widget)))
 		return;
 
 	systemid = g_object_get_data(G_OBJECT(widget), "privacy_system");
@@ -7903,7 +8031,7 @@
 {
 	static gchar *branch_path = "/Menu/Options/PrivacySystem";
 	GtkWidget *menuitem = NULL;
-	GList *amenu;
+	GList *children, *amenu;
 	gboolean can_sign = FALSE, can_encrypt = FALSE;
 	gboolean found = FALSE;
 
@@ -7913,11 +8041,10 @@
 				gtk_ui_manager_get_widget(compose->ui_manager, branch_path)));
 		cm_return_if_fail(menuitem != NULL);
 
-		amenu = GTK_MENU_SHELL(menuitem)->children;
+		children = gtk_container_get_children(GTK_CONTAINER(GTK_MENU_SHELL(menuitem)));
+		amenu = children;
 		menuitem = NULL;
 		while (amenu != NULL) {
-		        GList *alist = amenu->next;
-
 			systemid = g_object_get_data(G_OBJECT(amenu->data), "privacy_system");
 			if (systemid != NULL) {
 				if (strcmp(systemid, compose->privacy_system) == 0 &&
@@ -7939,8 +8066,9 @@
 					break;
 			}
 
-			amenu = alist;
+			amenu = amenu->next;
 		}
+		g_list_free(children);
 		if (menuitem != NULL)
 			gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(menuitem), TRUE);
 		
@@ -8346,6 +8474,7 @@
 
 static void compose_destroy(Compose *compose)
 {
+	GtkAllocation allocation;
 	GtkTextBuffer *buffer;
 	GtkClipboard *clipboard;
 
@@ -8412,8 +8541,9 @@
 #endif
 
 	if (!compose->batch) {
-		prefs_common.compose_width = compose->scrolledwin->allocation.width;
-		prefs_common.compose_height = compose->window->allocation.height;
+		gtk_widget_get_allocation(compose->window, &allocation);
+		prefs_common.compose_width = allocation.width;
+		prefs_common.compose_height = allocation.height;
 	}
 
 	if (!gtk_widget_get_parent(compose->paned))
@@ -8809,11 +8939,11 @@
 					    GdkEventKey *event,
 					    gboolean *cancelled)
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}
-	if (event && event->keyval == GDK_Return) {
+	if (event && event->keyval == GDK_KEY_Return) {
 		*cancelled = FALSE;
 		gtk_main_quit();
 		return TRUE;
@@ -9121,6 +9251,13 @@
 
 /* callback functions */
 
+static void compose_notebook_size_alloc(GtkNotebook *notebook,
+					GtkAllocation *allocation,
+					Compose *compose)
+{
+	prefs_common.compose_notebook_height = allocation->height;
+}
+
 /* compose_edit_size_alloc() - called when resized. don't know whether Gtk
  * includes "non-client" (windows-izm) in calculation, so this calculation
  * may not be accurate.
@@ -9139,9 +9276,8 @@
 			(allocation->width - allocation->x) / char_width;
 
 		/* got the maximum */
-		gtk_ruler_set_range(GTK_RULER(shruler),
-				    0.0, line_width_in_chars, 0,
-				    /*line_width_in_chars*/ char_width);
+		gtk_shruler_set_range(GTK_SHRULER(shruler),
+				    0.0, line_width_in_chars, 0);
 	}
 
 	return TRUE;
@@ -9307,7 +9443,7 @@
 	if (!event) return FALSE;
 
 	switch (event->keyval) {
-	case GDK_Delete:
+	case GDK_KEY_Delete:
 		compose_attach_remove_selected(NULL, compose);
 		break;
 	}
@@ -9402,6 +9538,7 @@
 	Compose *compose = (Compose *)data;
 	FolderItem *draft;
 	gchar *tmp;
+	gchar *sheaders;
 	gint msgnum;
 	MsgFlags flag = {0, 0};
 	static gboolean lock = FALSE;
@@ -9482,6 +9619,10 @@
 	err |= (fprintf(fp, "X-Claws-Auto-Wrapping:%d\n", compose->autowrap) < 0);
 	err |= (fprintf(fp, "X-Claws-Auto-Indent:%d\n", compose->autoindent) < 0);
 
+	sheaders = compose_get_manual_headers_info(compose);
+	err |= (fprintf(fp, "X-Claws-Manual-Headers:%s\n", sheaders) < 0);
+	g_free(sheaders);
+
 	/* end of headers */
 	err |= (fprintf(fp, "X-Claws-End-Special-Headers: 1\n") < 0);
 
@@ -9817,6 +9958,15 @@
 	compose_close(compose);
 }
 
+static void compose_print_cb(GtkAction *action, gpointer data)
+{
+	Compose *compose = (Compose *) data;
+
+	compose_draft((gpointer)compose, COMPOSE_AUTO_SAVE);
+	if (compose->targetinfo)
+		messageview_print(compose->targetinfo, FALSE, -1, -1, 0);
+}
+
 static void compose_set_encoding_cb(GtkAction *action, GtkRadioAction *current, gpointer data)
 {
 	gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));
@@ -9997,7 +10147,7 @@
 	Compose *compose = (Compose *)data;
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    )
 		entry_cut_clipboard(compose->focused_editable);
@@ -10008,7 +10158,7 @@
 	Compose *compose = (Compose *)data;
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    )
 		entry_copy_clipboard(compose->focused_editable);
@@ -10021,14 +10171,14 @@
 	GtkTextBuffer *buffer;
 	BLOCK_WRAP();
 	if (compose->focused_editable &&
-	    gtkut_widget_has_focus(compose->focused_editable))
+	    gtk_widget_has_focus(compose->focused_editable))
 		entry_paste_clipboard(compose, compose->focused_editable, 
 				prefs_common.linewrap_pastes,
 				GDK_SELECTION_CLIPBOARD, NULL);
 	UNBLOCK_WRAP();
 
 #ifdef USE_ENCHANT
-	if (gtkut_widget_has_focus(compose->text) &&
+	if (gtk_widget_has_focus(compose->text) &&
 	    compose->gtkaspell && 
             compose->gtkaspell->check_while_typing)
 	    	gtkaspell_highlight_all(compose->gtkaspell);
@@ -10041,7 +10191,7 @@
 	gint wrap_quote = prefs_common.linewrap_quote;
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    ) {
 		/* let text_insert() (called directly or at a later time
@@ -10070,7 +10220,7 @@
 	BLOCK_WRAP();
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    )
 		entry_paste_clipboard(compose, compose->focused_editable, FALSE,
@@ -10078,7 +10228,7 @@
 	UNBLOCK_WRAP();
 
 #ifdef USE_ENCHANT
-	if (gtkut_widget_has_focus(compose->text) &&
+	if (gtk_widget_has_focus(compose->text) &&
 	    compose->gtkaspell && 
             compose->gtkaspell->check_while_typing)
 	    	gtkaspell_highlight_all(compose->gtkaspell);
@@ -10093,7 +10243,7 @@
 	BLOCK_WRAP();
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    )
 		entry_paste_clipboard(compose, compose->focused_editable, TRUE,
@@ -10101,7 +10251,7 @@
 	UNBLOCK_WRAP();
 
 #ifdef USE_ENCHANT
-	if (gtkut_widget_has_focus(compose->text) &&
+	if (gtk_widget_has_focus(compose->text) &&
 	    compose->gtkaspell &&
             compose->gtkaspell->check_while_typing)
 	    	gtkaspell_highlight_all(compose->gtkaspell);
@@ -10113,7 +10263,7 @@
 	Compose *compose = (Compose *)data;
 	if (compose->focused_editable 
 #ifndef GENERIC_UMPC
-	    && gtkut_widget_has_focus(compose->focused_editable)
+	    && gtk_widget_has_focus(compose->focused_editable)
 #endif
 	    )
 		entry_allsel(compose->focused_editable);
@@ -10417,7 +10567,7 @@
 		{textview_delete_to_line_end}
 	};
 
-	if (!gtkut_widget_has_focus(GTK_WIDGET(text))) return;
+	if (!gtk_widget_has_focus(GTK_WIDGET(text))) return;
 
 	if (action >= COMPOSE_CALL_ADVANCED_ACTION_MOVE_BEGINNING_OF_LINE &&
 	    action <= COMPOSE_CALL_ADVANCED_ACTION_DELETE_TO_LINE_END) {
@@ -10430,6 +10580,8 @@
 
 static void compose_grab_focus_cb(GtkWidget *widget, Compose *compose)
 {
+	GtkAllocation allocation;
+	GtkWidget *parent;
 	gchar *str = NULL;
 	
 	if (GTK_IS_EDITABLE(widget)) {
@@ -10437,24 +10589,29 @@
 		gtk_editable_set_position(GTK_EDITABLE(widget), 
 			strlen(str));
 		g_free(str);
-		if (widget->parent && widget->parent->parent
-		 && widget->parent->parent->parent) {
-			if (GTK_IS_SCROLLED_WINDOW(widget->parent->parent->parent)) {
-				gint y = widget->allocation.y;
-				gint height = widget->allocation.height;
+		if ((parent = gtk_widget_get_parent(widget))
+		 && (parent = gtk_widget_get_parent(parent))
+		 && (parent = gtk_widget_get_parent(parent))) {
+			if (GTK_IS_SCROLLED_WINDOW(parent)) {
+				gtk_widget_get_allocation(widget, &allocation);
+				gint y = allocation.y;
+				gint height = allocation.height;
 				GtkAdjustment *shown = gtk_scrolled_window_get_vadjustment
-					(GTK_SCROLLED_WINDOW(widget->parent->parent->parent));
+					(GTK_SCROLLED_WINDOW(parent));
 
-				if (y < (int)shown->value) {
-					gtk_adjustment_set_value(GTK_ADJUSTMENT(shown), y - 1);
+				gfloat value = gtk_adjustment_get_value(shown);
+				gfloat upper = gtk_adjustment_get_upper(shown);
+				gfloat page_size = gtk_adjustment_get_page_size(shown);
+				if (y < (int)value) {
+					gtk_adjustment_set_value(shown, y - 1);
 				}
-				if (y + height > (int)shown->value + (int)shown->page_size) {
-					if (y - height - 1 < (int)shown->upper - (int)shown->page_size) {
-						gtk_adjustment_set_value(GTK_ADJUSTMENT(shown), 
-							y + height - (int)shown->page_size - 1);
+				if ((y + height) > ((int)value + (int)page_size)) {
+					if ((y - height - 1) < ((int)upper - (int)page_size)) {
+						gtk_adjustment_set_value(shown, 
+							y + height - (int)page_size - 1);
 					} else {
-						gtk_adjustment_set_value(GTK_ADJUSTMENT(shown), 
-							(int)shown->upper - (int)shown->page_size - 1);
+						gtk_adjustment_set_value(shown, 
+							(int)upper - (int)page_size - 1);
 					}
 				}
 			}
@@ -10595,14 +10752,17 @@
 {
 	Compose *compose = (Compose *)user_data;
 	GList *list, *tmp;
+	GdkAtom type;
 
-	if (((gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "text/uri-list"))
+	type = gtk_selection_data_get_data_type(data);
+	if (((gdk_atom_name(type) && !strcmp(gdk_atom_name(type), "text/uri-list"))
 #ifdef G_OS_WIN32
-	 || (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "DROPFILES_DND"))
+	 || (gdk_atom_name(type) && !strcmp(gdk_atom_name(type), "DROPFILES_DND"))
 #endif
 	   ) && gtk_drag_get_source_widget(context) != 
 	        summary_get_main_widget(mainwindow_get_mainwindow()->summaryview)) {
-		list = uri_list_extract_filenames((const gchar *)data->data);
+		list = uri_list_extract_filenames(
+			(const gchar *)gtk_selection_data_get_data(data));
 		for (tmp = list; tmp != NULL; tmp = tmp->next) {
 			gchar *utf8_filename = conv_filename_to_utf8((const gchar *)tmp->data);
 			compose_attach_append
@@ -10662,20 +10822,23 @@
 {
 	Compose *compose = (Compose *)user_data;
 	GList *list, *tmp;
+	GdkAtom type;
 
 	/* strangely, testing data->type == gdk_atom_intern("text/uri-list", TRUE)
 	 * does not work */
+	type = gtk_selection_data_get_data_type(data);
 #ifndef G_OS_WIN32
-	if (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "text/uri-list")) {
+	if (gdk_atom_name(type) && !strcmp(gdk_atom_name(type), "text/uri-list")) {
 #else
-	if (gdk_atom_name(data->type) && !strcmp(gdk_atom_name(data->type), "DROPFILES_DND")) {
+	if (gdk_atom_name(type) && !strcmp(gdk_atom_name(type), "DROPFILES_DND")) {
 #endif
 		AlertValue val = G_ALERTDEFAULT;
+		const gchar* ddata = (const gchar *)gtk_selection_data_get_data(data);
 
-		list = uri_list_extract_filenames((const gchar *)data->data);
-		if (list == NULL && strstr((gchar *)(data->data), "://")) {
+		list = uri_list_extract_filenames(ddata);
+		if (list == NULL && strstr(ddata, "://")) {
 			/* Assume a list of no files, and data has ://, is a remote link */
-			gchar *tmpdata = g_strstrip(g_strdup((const gchar *)data->data));
+			gchar *tmpdata = g_strstrip(g_strdup(ddata));
 			gchar *tmpfile = get_tmp_file();
 			str_write_to_file(tmpdata, tmpfile);
 			g_free(tmpdata);  
@@ -10749,7 +10912,7 @@
 					     gpointer		 user_data)
 {
 	GtkEditable *entry = (GtkEditable *)user_data;
-	gchar *email = (gchar *)data->data;
+	const gchar *email = (const gchar *)gtk_selection_data_get_data(data);
 
 	/* strangely, testing data->type == gdk_atom_intern("text/plain", TRUE)
 	 * does not work */
@@ -10758,8 +10921,7 @@
 		gchar *decoded=g_new(gchar, strlen(email));
 		int start = 0;
 
-		email += strlen("mailto:");
-		decode_uri(decoded, email); /* will fit */
+		decode_uri(decoded, email + strlen("mailto:")); /* will fit */
 		gtk_editable_delete_text(entry, 0, -1);
 		gtk_editable_insert_text(entry, decoded, strlen(decoded), &start);
 		gtk_drag_finish(drag_context, TRUE, FALSE, time);
@@ -10803,7 +10965,7 @@
 	if ((g_slist_length(headerentry->compose->header_list) > 0) &&
 	    ((headerentry->headernum + 1) != headerentry->compose->header_nextrow) &&
 	    !(event->state & GDK_MODIFIER_MASK) &&
-	    (event->keyval == GDK_BackSpace) &&
+	    (event->keyval == GDK_KEY_BackSpace) &&
 	    (strlen(gtk_entry_get_text(GTK_ENTRY(entry))) == 0)) {
 		gtk_container_remove
 			(GTK_CONTAINER(headerentry->compose->header_table),
@@ -10815,7 +10977,7 @@
 			g_slist_remove(headerentry->compose->header_list,
 				       headerentry);
 		g_free(headerentry);
-	} else 	if (event->keyval == GDK_Tab) {
+	} else 	if (event->keyval == GDK_KEY_Tab) {
 		if (headerentry->compose->header_last == headerentry) {
 			/* Override default next focus, and give it to subject_entry
 			 * instead of notebook tabs
@@ -10867,9 +11029,13 @@
 	cm_return_if_fail(compose);
 	cm_return_if_fail(!compose->batch);
 	cm_return_if_fail(GTK_IS_WIDGET(compose->header_table));
-	cm_return_if_fail(GTK_IS_VIEWPORT(compose->header_table->parent));
-	vadj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(compose->header_table->parent));
-	gtk_adjustment_set_value(vadj, (show_first ? vadj->lower : (vadj->upper - vadj->page_size)));
+	cm_return_if_fail(GTK_IS_VIEWPORT(gtk_widget_get_parent(compose->header_table)));
+	vadj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(
+				gtk_widget_get_parent(compose->header_table)));
+	gtk_adjustment_set_value(vadj, (show_first ?
+				gtk_adjustment_get_lower(vadj) :
+				(gtk_adjustment_get_upper(vadj) -
+				gtk_adjustment_get_page_size(vadj))));
 	gtk_adjustment_changed(vadj);
 }
 
@@ -10984,7 +11150,7 @@
 	if (!compose->gtkaspell)
 		return;
 		
-	if (gtkut_widget_has_focus(compose->subject_entry))
+	if (gtk_widget_has_focus(compose->subject_entry))
 		claws_spell_entry_check_all(
 			CLAWS_SPELL_ENTRY(compose->subject_entry));		
 	else
@@ -11009,7 +11175,7 @@
 		return;
 	}
 
-	if (gtkut_widget_has_focus(compose->subject_entry))
+	if (gtk_widget_has_focus(compose->subject_entry))
 		claws_spell_entry_check_backwards(
 			CLAWS_SPELL_ENTRY(compose->subject_entry));
 	else
@@ -11024,7 +11190,7 @@
 		return;
 	}
 
-	if (gtkut_widget_has_focus(compose->subject_entry))
+	if (gtk_widget_has_focus(compose->subject_entry))
 		claws_spell_entry_check_forwards_go(
 			CLAWS_SPELL_ENTRY(compose->subject_entry));
 	else

Index: procmsg.c
===================================================================
RCS file: /home/claws-mail/claws/src/procmsg.c,v
retrieving revision 1.150.2.117
retrieving revision 1.150.2.117.2.1
diff -u -d -r1.150.2.117 -r1.150.2.117.2.1
--- procmsg.c	16 Feb 2011 07:16:15 -0000	1.150.2.117
+++ procmsg.c	29 Nov 2011 00:15:23 -0000	1.150.2.117.2.1
@@ -845,6 +845,25 @@
 }
 
 static gboolean send_queue_lock = FALSE;
+
+gboolean procmsg_queue_lock(char **errstr)
+{
+	if (send_queue_lock) {
+		/* Avoid having to translate two similar strings */
+		log_warning(LOG_PROTOCOL, "%s\n", _("Already trying to send."));
+		if (errstr) {
+			if (*errstr) g_free(*errstr);
+			*errstr = g_strdup_printf(_("Already trying to send."));
+		}
+		return FALSE;
+	}
+	send_queue_lock = TRUE;
+	return TRUE;
+}
+void procmsg_queue_unlock(void)
+{
+	send_queue_lock = FALSE;
+}
 /*!
  *\brief	Send messages in queue
  *
@@ -861,23 +880,16 @@
 	GSList *sorted_list = NULL;
 	GNode *node, *next;
 	
-	if (send_queue_lock) {
-		/* Avoid having to translate two similar strings */
-		log_warning(LOG_PROTOCOL, "%s\n", _("Already trying to send."));
-		if (errstr) {
-			if (*errstr) g_free(*errstr);
-			*errstr = g_strdup_printf(_("Already trying to send."));
-		}
+	if (!procmsg_queue_lock(errstr)) {
 		toolbar_main_set_sensitive(mainwindow_get_mainwindow());
 		return -1;
 	}
-	send_queue_lock = TRUE;
 	inc_lock();
 	if (!queue)
 		queue = folder_get_default_queue();
 	
 	if (queue == NULL) {
-		send_queue_lock = FALSE;
+		procmsg_queue_unlock();
 		inc_unlock();
 		return -1;
 	}
@@ -937,7 +949,7 @@
 			node = next;
 		}
 	}
-	send_queue_lock = FALSE;
+	procmsg_queue_unlock();
 	inc_unlock();
 	toolbar_main_set_sensitive(mainwindow_get_mainwindow());
 
@@ -1135,7 +1147,7 @@
 	g_free(prtmp);
 
 	g_strchomp(buf);
-	if (buf[strlen(buf) - 1] != '&') strcat(buf, "&");
+	if (buf[strlen(buf) - 1] != '&') strncat(buf, "&", sizeof(buf));
 	if (system(buf) == -1)
 		g_warning("system(%s) failed.", buf);
 }
@@ -1812,6 +1824,17 @@
 	return result;
 }
 
+gint procmsg_send_message_queue_with_lock(const gchar *file, gchar **errstr, FolderItem *queue, gint msgnum, gboolean *queued_removed)
+{
+	gint val;
+	if (procmsg_queue_lock(errstr)) {
+		val = procmsg_send_message_queue(file, errstr, queue, msgnum, queued_removed);
+		procmsg_queue_unlock();
+		return val;
+	}
+	return -1;
+}
+
 static void update_folder_msg_counts(FolderItem *item, MsgInfo *msginfo, MsgPermFlags old_flags)
 {
 	MsgPermFlags new_flags = msginfo->flags.perm_flags;

Index: prefs_toolbar.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_toolbar.c,v
retrieving revision 1.30.2.67
retrieving revision 1.30.2.67.2.1
diff -u -d -r1.30.2.67 -r1.30.2.67.2.1
--- prefs_toolbar.c	10 Apr 2011 17:19:04 -0000	1.30.2.67
+++ prefs_toolbar.c	29 Nov 2011 00:15:23 -0000	1.30.2.67.2.1
@@ -1536,7 +1536,7 @@
 static gboolean icon_chooser_key_pressed(GtkWidget *widget, GdkEventKey *event,
 			ToolbarPage *prefs_toolbar)
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		icon_chooser_cancel_clicked(NULL, prefs_toolbar);
 		return TRUE;
 	}
@@ -1548,9 +1548,9 @@
 			ToolbarPage *prefs_toolbar)
 {
 	if (event) {
-		if (event->keyval == GDK_KP_Enter ||
-		    event->keyval == GDK_Return ||
-		    event->keyval == GDK_space) {
+		if (event->keyval == GDK_KEY_KP_Enter ||
+		    event->keyval == GDK_KEY_Return ||
+		    event->keyval == GDK_KEY_space) {
 			icon_chooser_ok_clicked(NULL, prefs_toolbar);
 			return TRUE;
 		}
@@ -1597,7 +1597,7 @@
 				restore = FALSE;
 				break;
 			}
-			event_widget = event_widget->parent;
+			event_widget = gtk_widget_get_parent(event_widget);
 		}
 	}
 
@@ -1616,6 +1616,7 @@
 
 static void icon_chooser_create(GtkButton *button, ToolbarPage *prefs_toolbar)
 {
+	GtkAllocation allocation;
 	GtkWidget *icon_chooser_win;
 	GtkWidget *scrollwin;
 	GtkWidget *icon_view;
@@ -1646,10 +1647,12 @@
 #ifndef MAEMO
 	gtk_window_set_decorated(GTK_WINDOW(icon_chooser_win), FALSE);
 #endif
-	gdk_window_get_origin(GTK_WIDGET(prefs_toolbar->icon_button)->window, 
+	gdk_window_get_origin(gtk_widget_get_window(
+			GTK_WIDGET(prefs_toolbar->icon_button)), 
 			&x, &y);
-	x += GTK_WIDGET(prefs_toolbar->icon_button)->allocation.x;
-	y += GTK_WIDGET(prefs_toolbar->icon_button)->allocation.y;
+	gtk_widget_get_allocation(GTK_WIDGET(prefs_toolbar->icon_button), &allocation);
+	x += allocation.x;
+	y += allocation.y;
 	y += 50;
 	x -= 300-50;
 	gtk_window_move(GTK_WINDOW(icon_chooser_win), x, y);

Index: message_search.c
===================================================================
RCS file: /home/claws-mail/claws/src/message_search.c,v
retrieving revision 1.3.12.39
retrieving revision 1.3.12.39.2.1
diff -u -d -r1.3.12.39 -r1.3.12.39.2.1
--- message_search.c	10 Apr 2011 17:19:04 -0000	1.3.12.39
+++ message_search.c	29 Nov 2011 00:15:21 -0000	1.3.12.39.2.1
@@ -27,7 +27,6 @@
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
 #include <gtk/gtk.h>
-#include "gtk/gtksctree.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -391,15 +390,15 @@
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event,
 			    gpointer data)
 {
-	if (event && (event->keyval == GDK_Escape)) {
+	if (event && (event->keyval == GDK_KEY_Escape)) {
 		gtk_widget_hide(search_window.window);
 	}
 
-	if (event && (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter)) {
+	if (event && (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter)) {
 		message_search_execute(FALSE);
 	}
 
-	if (event && (event->keyval == GDK_Down || event->keyval == GDK_Up)) {
+	if (event && (event->keyval == GDK_KEY_Down || event->keyval == GDK_KEY_Up)) {
 		if (search_window.body_entry_has_focus) {
 			combobox_set_value_from_arrow_key(
 					GTK_COMBO_BOX(search_window.body_entry),

Index: news.c
===================================================================
RCS file: /home/claws-mail/claws/src/news.c,v
retrieving revision 1.101.2.67
retrieving revision 1.101.2.67.2.1
diff -u -d -r1.101.2.67 -r1.101.2.67.2.1
--- news.c	14 Aug 2011 19:40:30 -0000	1.101.2.67
+++ news.c	29 Nov 2011 00:15:21 -0000	1.101.2.67.2.1
@@ -367,7 +367,11 @@
 	session = news_session_new(folder, ac->nntp_server, port, userid, passwd);
 #endif
 
-	r = nntp_threaded_mode_reader(folder);
+	if (session != NULL)
+		r = nntp_threaded_mode_reader(folder);
+	else
+		r = NEWSNNTP_ERROR_CONNECTION_REFUSED;
+
 	if (r != NEWSNNTP_NO_ERROR) {
 	    if (r == NEWSNNTP_WARNING_REQUEST_AUTHORIZATION_USERNAME) {
 	        /*

Index: prefs_matcher.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_matcher.c,v
retrieving revision 1.43.2.89.2.1
retrieving revision 1.43.2.89.2.2
diff -u -d -r1.43.2.89.2.1 -r1.43.2.89.2.2
--- prefs_matcher.c	7 Sep 2011 15:52:27 -0000	1.43.2.89.2.1
+++ prefs_matcher.c	29 Nov 2011 00:15:22 -0000	1.43.2.89.2.2
@@ -32,7 +32,9 @@
 #include <string.h>
 #include <errno.h>
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
+#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_matcher.h"
@@ -95,7 +97,9 @@
 #ifndef G_OS_WIN32
 	GtkWidget *regexp_checkbtn;
 #endif
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
+#endif
 
 	GtkWidget *test_btn;
 	GtkWidget *addressbook_select_btn;
@@ -431,9 +435,11 @@
 		prefs_matcher_models_create();
 		prefs_matcher_create();
 	} else {
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		/* update color label menu */
 		gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(matcher.color_optmenu),
 				colorlabel_create_color_menu());
+#endif
 	}
 
 	manage_window_set_transient(GTK_WINDOW(matcher.window));
@@ -669,11 +675,13 @@
 	match_combo = gtkut_sc_combobox_create(NULL, TRUE);
 	gtk_box_pack_start(GTK_BOX(match_hbox), match_combo, TRUE, TRUE, 0);
 	
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	/* color labels combo */
 	color_optmenu = gtk_cmoption_menu_new();
 	gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(color_optmenu),
 				 colorlabel_create_color_menu());
 	gtk_box_pack_start(GTK_BOX(match_hbox), color_optmenu, FALSE, FALSE, 0);
+#endif
 	
 	/* address header name */
 	header_addr_combo = combobox_text_new(TRUE,
@@ -920,7 +928,9 @@
 		gtk_combo_box_set_active(GTK_COMBO_BOX(matcher.match_combo), 0);
 	if (match_combo2_model_set())
 		gtk_combo_box_set_active(GTK_COMBO_BOX(matcher.match_combo2), 0);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu), 0);
+#endif
 	gtk_spin_button_set_value(GTK_SPIN_BUTTON(matcher.numeric_entry), 0);
 	gtk_entry_set_text(GTK_ENTRY(matcher.header_entry), "");
 	gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), "");
@@ -1061,9 +1071,11 @@
 	case MATCHCRITERIA_PARTIAL:
 	case MATCHCRITERIA_NOT_PARTIAL:
 		return CRITERIA_PARTIAL;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_COLORLABEL:
 	case MATCHCRITERIA_NOT_COLORLABEL:
 		return CRITERIA_COLORLABEL;
+#endif
 	case MATCHCRITERIA_IGNORE_THREAD:
 	case MATCHCRITERIA_NOT_IGNORE_THREAD:
 		return CRITERIA_IGNORE_THREAD;
@@ -1174,8 +1186,10 @@
 		return MATCHCRITERIA_SIGNED;
 	case CRITERIA_PARTIAL:
 		return MATCHCRITERIA_PARTIAL;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		return MATCHCRITERIA_COLORLABEL;
+#endif
 	case CRITERIA_IGNORE_THREAD:
 		return MATCHCRITERIA_IGNORE_THREAD;
 	case CRITERIA_WATCH_THREAD:
@@ -1266,8 +1280,10 @@
 		return MATCHCRITERIA_NOT_SIGNED;
 	case MATCHCRITERIA_PARTIAL:
 		return MATCHCRITERIA_NOT_PARTIAL;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_COLORLABEL:
 		return MATCHCRITERIA_NOT_COLORLABEL;
+#endif
 	case MATCHCRITERIA_IGNORE_THREAD:
 		return MATCHCRITERIA_NOT_IGNORE_THREAD;
 	case MATCHCRITERIA_WATCH_THREAD:
@@ -1329,8 +1345,10 @@
 	case MATCH_HEADER:
 		header = gtk_entry_get_text(GTK_ENTRY(matcher.header_entry));
 		return header_name_to_crit(header);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCH_LABEL:
 		return CRITERIA_COLORLABEL;
+#endif
 	case MATCH_PARTIAL:
 		return CRITERIA_PARTIAL;
 	case MATCH_TEST:
@@ -1514,11 +1532,13 @@
 			value *= KB_SIZE;
 		break;
 		
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		value = colorlabel_get_color_menu_active_item
 			(gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU
 				(matcher.color_optmenu))); 
 		break;
+#endif
 
 	case CRITERIA_HEADER:
 		header = gtk_entry_get_text(GTK_ENTRY(matcher.header_entry));
@@ -1876,8 +1896,10 @@
 				    (value == MATCH_TEST));
 	prefs_matcher_enable_widget(matcher.addressbook_select_btn,
 				    (value == MATCH_ABOOK));
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	prefs_matcher_enable_widget(matcher.color_optmenu,
 				    (value == MATCH_LABEL));
+#endif
 	prefs_matcher_enable_widget(matcher.upper_filler,
 				    MATCH_CASE_REGEXP(value));
 	prefs_matcher_enable_widget(matcher.lower_filler,
@@ -1919,12 +1941,14 @@
 #endif
 		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
 		break;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCH_LABEL:
 		gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu), 0);
 		prefs_matcher_set_model(matcher.match_combo2, matcher.model_set);
 		gtk_label_set_text(GTK_LABEL(matcher.match_label), _("Label"));
 		gtk_label_set_text(GTK_LABEL(matcher.match_label2), _("is"));
 		break;
+#endif
 	case MATCH_PARTIAL:
 		prefs_matcher_set_model(matcher.criteria_combo2, matcher.model_partial);
 		gtk_label_set_text(GTK_LABEL(matcher.criteria_label2), _("Value:"));
@@ -1986,7 +2010,7 @@
 static gboolean prefs_matcher_key_pressed(GtkWidget *widget, GdkEventKey *event,
 				     gpointer data)
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		prefs_matcher_cancel();
 		return TRUE;		
 	}
@@ -2255,9 +2279,11 @@
 	case CRITERIA_TEST:
 		match_criteria = MATCH_TEST;
 		break;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case CRITERIA_COLORLABEL:
 		match_criteria = MATCH_LABEL;
 		break;
+#endif
 	case CRITERIA_TAG:
 	case CRITERIA_TAGGED:
 		match_criteria = MATCH_TAGS;
@@ -2486,6 +2512,7 @@
 		}
 		break;
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHCRITERIA_NOT_COLORLABEL:
 	case MATCHCRITERIA_COLORLABEL:
 		gtk_cmoption_menu_set_history(GTK_CMOPTION_MENU(matcher.color_optmenu),
@@ -2493,6 +2520,7 @@
 		menu = gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU(matcher.color_optmenu));
 		g_signal_emit_by_name(G_OBJECT(menu), "selection-done", menu);
 		break;
+#endif
 
 	case MATCHCRITERIA_NOT_HEADER:
 	case MATCHCRITERIA_HEADER:

Index: import.c
===================================================================
RCS file: /home/claws-mail/claws/src/import.c,v
retrieving revision 1.13.2.30
retrieving revision 1.13.2.30.2.1
diff -u -d -r1.13.2.30 -r1.13.2.30.2.1
--- import.c	16 Feb 2011 07:16:01 -0000	1.13.2.30
+++ import.c	29 Nov 2011 00:15:21 -0000	1.13.2.30.2.1
@@ -283,7 +283,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		import_cancel_cb(NULL, NULL);
 	return FALSE;
 }

Index: prefs_folder_column.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_folder_column.c,v
retrieving revision 1.1.2.18
retrieving revision 1.1.2.18.2.1
diff -u -d -r1.1.2.18 -r1.1.2.18.2.1
--- prefs_folder_column.c	16 Feb 2011 07:16:12 -0000	1.1.2.18
+++ prefs_folder_column.c	29 Nov 2011 00:15:22 -0000	1.1.2.18.2.1
@@ -656,7 +656,7 @@
 						 GdkEventKey *event,
 						 gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		folder_col.finished = TRUE;
 	return FALSE;
 }
@@ -791,7 +791,8 @@
 			   -1);
 
 	/* send the type */
-	gtk_selection_data_set(data, data->target, 8, (gchar *) &type, sizeof type);
+	gtk_selection_data_set(data, gtk_selection_data_get_target(data), 8,
+		(gchar *) &type, sizeof type);
 }
 
 static void drag_data_received(GtkTreeView *tree_view, GdkDragContext *context,
@@ -861,7 +862,7 @@
 		gtk_tree_selection_get_selected(gtk_tree_view_get_selection(
 						GTK_TREE_VIEW(source)),
 						&sel_model, &isel);
-		type = *((gint *) data->data);
+		type = *((gint *) gtk_selection_data_get_data(data));
 		name = gettext(col_name[type]);
 		gtk_list_store_remove(GTK_LIST_STORE(sel_model), &isel);
 

Index: prefs_image_viewer.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_image_viewer.c,v
retrieving revision 1.1.2.16
retrieving revision 1.1.2.16.2.1
diff -u -d -r1.1.2.16 -r1.1.2.16.2.1
--- prefs_image_viewer.c	16 Feb 2011 07:16:13 -0000	1.1.2.16
+++ prefs_image_viewer.c	29 Nov 2011 00:15:22 -0000	1.1.2.16.2.1
@@ -58,7 +58,6 @@
 	GtkWidget *resize_img;
 	GtkWidget *inline_img;
 	GtkWidget *print_imgs;
-	CLAWS_TIP_DECL();
 
 	table = gtk_table_new(4, 1, FALSE);
 	gtk_widget_show(table);

Index: account.c
===================================================================
RCS file: /home/claws-mail/claws/src/account.c,v
retrieving revision 1.61.2.98
retrieving revision 1.61.2.98.2.1
diff -u -d -r1.61.2.98 -r1.61.2.98.2.1
--- account.c	29 Aug 2011 13:00:43 -0000	1.61.2.98
+++ account.c	29 Nov 2011 00:15:19 -0000	1.61.2.98.2.1
@@ -51,6 +51,7 @@
 #include "remotefolder.h"
 #include "manual.h"
 #include "filtering.h"
+#include "prefs_actions.h"
 
 enum {
 	ACCOUNT_IS_DEFAULT,
@@ -442,7 +443,7 @@
 void account_open(PrefsAccount *ac_prefs)
 {
 	gboolean prev_default;
-	gchar *ac_name;
+	gchar *ac_name, *old_prefix, *new_prefix;
 	gboolean account_dirty = FALSE;
 
 	cm_return_if_fail(ac_prefs != NULL);
@@ -458,10 +459,19 @@
 			account_set_as_default(ac_prefs);
 
 		if (ac_prefs->folder && strcmp2(ac_name, ac_prefs->account_name) != 0) {
+			old_prefix = folder_get_identifier(FOLDER(ac_prefs->folder));
 			folder_set_name(FOLDER(ac_prefs->folder),
 					ac_prefs->account_name);
 			folderview_set_all();
 			folder_prefs_save_config_recursive(FOLDER(ac_prefs->folder));
+			new_prefix = folder_get_identifier(FOLDER(ac_prefs->folder));
+
+			account_rename_path(old_prefix, new_prefix);
+			prefs_filtering_rename_path(old_prefix, new_prefix);
+			prefs_actions_rename_path(old_prefix, new_prefix);
+			
+			g_free(old_prefix);
+			g_free(new_prefix);
 		}
 
 		account_write_config_all();
@@ -558,8 +568,6 @@
 	}
 }
 
-#undef CHECK_CHANGE_FOLDER
-
 FolderItem *account_get_special_folder(PrefsAccount *ac_prefs,
 				       SpecialFolderItemType type)
 {
@@ -1230,7 +1238,7 @@
 static gboolean account_key_pressed(GtkWidget *widget, GdkEventKey *event,
 				    gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		account_edit_close(NULL, NULL);
 	return FALSE;
 }
@@ -1518,7 +1526,6 @@
 {
 	GtkTreeViewColumn *column;
 	GtkCellRenderer *renderer;
-	CLAWS_TIP_DECL();
 
 	renderer = gtk_cell_renderer_toggle_new();
 	g_object_set(renderer, 
@@ -1531,7 +1538,7 @@
 		 NULL);
 	gtk_tree_view_append_column(GTK_TREE_VIEW(list_view), column);		
 	gtk_tree_view_column_set_alignment (column, 0.5);
-	CLAWS_SET_TIP(column->button,
+	CLAWS_SET_TIP(gtk_tree_view_column_get_widget(column),
 			_("'Get Mail' retrieves mail from the checked accounts"));
 	g_signal_connect(G_OBJECT(renderer), "toggled", 		     
 			 G_CALLBACK(account_get_all_toggled),

Index: headerview.c
===================================================================
RCS file: /home/claws-mail/claws/src/headerview.c,v
retrieving revision 1.8.2.33.2.1
retrieving revision 1.8.2.33.2.2
diff -u -d -r1.8.2.33.2.1 -r1.8.2.33.2.2
--- headerview.c	7 Sep 2011 15:52:25 -0000	1.8.2.33.2.1
+++ headerview.c	29 Nov 2011 00:15:21 -0000	1.8.2.33.2.2
@@ -258,13 +258,13 @@
 	    !msginfo->extradata->xface || 
 	    strlen(msginfo->extradata->xface) < 5) {
 		if (headerview->image &&
-		    gtkut_widget_get_visible(headerview->image)) {
+		    gtk_widget_get_visible(headerview->image)) {
 			gtk_widget_hide(headerview->image);
 			gtk_widget_queue_resize(hbox);
 		}
 		return -1;
 	}
-	if (!gtkut_widget_get_visible(headerview->hbox)) return -1;
+	if (!gtk_widget_get_visible(headerview->hbox)) return -1;
 
 	if (headerview->image) {
 		gtk_widget_destroy(headerview->image);
@@ -295,13 +295,13 @@
 
 	if (!msginfo->extradata || !msginfo->extradata->face) {
 		if (headerview->image &&
-		    gtkut_widget_get_visible(headerview->image)) {
+		    gtk_widget_get_visible(headerview->image)) {
 			gtk_widget_hide(headerview->image);
 			gtk_widget_queue_resize(hbox);
 		}
 		return -1;
 	}
-	if (!gtkut_widget_get_visible(headerview->hbox)) return -1;
+	if (!gtk_widget_get_visible(headerview->hbox)) return -1;
 
 	if (headerview->image) {
 		gtk_widget_destroy(headerview->image);
@@ -332,7 +332,7 @@
 	GError *error = NULL;
 	GdkPixbuf *picture = NULL;
 
-	if (!gtkut_widget_get_visible(headerview->hbox)) return;
+	if (!gtk_widget_get_visible(headerview->hbox)) return;
 
 	if (headerview->image) {
 		picture = gtk_image_get_pixbuf(GTK_IMAGE(headerview->image));
@@ -365,7 +365,7 @@
 	GdkPixbuf *picture = NULL;
 	gint w, h;
 
-	if (!gtkut_widget_get_visible(headerview->hbox)) return -1;
+	if (!gtk_widget_get_visible(headerview->hbox)) return -1;
 
 	if (headerview->image) {
 		gtk_widget_destroy(headerview->image);
@@ -434,7 +434,7 @@
 	gtk_widget_hide(headerview->tags_header_label);
 	gtk_widget_hide(headerview->tags_body_label);
 
-	if (headerview->image && gtkut_widget_get_visible(headerview->image)) {
+	if (headerview->image && gtk_widget_get_visible(headerview->image)) {
 		gtk_widget_hide(headerview->image);
 		gtk_widget_queue_resize(headerview->hbox);
 	}

Index: prefs_customheader.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_customheader.c,v
retrieving revision 1.16.2.41
retrieving revision 1.16.2.41.2.1
diff -u -d -r1.16.2.41 -r1.16.2.41.2.1
--- prefs_customheader.c	16 Feb 2011 07:16:12 -0000	1.16.2.41
+++ prefs_customheader.c	29 Nov 2011 00:15:22 -0000	1.16.2.41.2.1
@@ -778,7 +778,7 @@
 						GdkEventKey *event,
 						gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_custom_header_cancel();
 	return FALSE;
 }

Index: edittags.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/edittags.c,v
retrieving revision 1.1.2.24
retrieving revision 1.1.2.24.2.1
diff -u -d -r1.1.2.24 -r1.1.2.24.2.1
--- edittags.c	6 Jul 2011 08:09:57 -0000	1.1.2.24
+++ edittags.c	29 Nov 2011 00:15:20 -0000	1.1.2.24.2.1
@@ -90,12 +90,12 @@
 } applywindow;
 
 #define APPLYWINDOW_LOCK() {								\
-	gdk_window_set_cursor(applywindow.window->window, applywindow.watch_cursor);	\
+	gdk_window_set_cursor(gtk_widget_get_window(applywindow.window), applywindow.watch_cursor);	\
 	applywindow.busy = TRUE;							\
 }
 
 #define APPLYWINDOW_UNLOCK() {								\
-	gdk_window_set_cursor(applywindow.window->window, NULL);			\
+	gdk_window_set_cursor(gtk_widget_get_window(applywindow.window), NULL);			\
 	applywindow.busy = FALSE;							\
 }
 
@@ -488,9 +488,9 @@
 {
 	if (applywindow.busy)
 		return FALSE;
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		apply_window_close();
-	else if (event && event->keyval == GDK_Delete)
+	else if (event && event->keyval == GDK_KEY_Delete)
 		apply_popup_delete(NULL, NULL);
 	return FALSE;
 }
@@ -500,7 +500,7 @@
 	if (applywindow.busy)
 		return FALSE;
 
-	if (event && (event->keyval == GDK_KP_Enter || event->keyval == GDK_Return)) {
+	if (event && (event->keyval == GDK_KEY_KP_Enter || event->keyval == GDK_KEY_Return)) {
 		apply_window_add_tag();
 		gtk_entry_set_text(GTK_ENTRY(applywindow.add_entry), "");
 		gtk_widget_grab_focus(applywindow.taglist);

Index: prefs_display_header.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_display_header.c,v
retrieving revision 1.16.2.43
retrieving revision 1.16.2.43.2.1
diff -u -d -r1.16.2.43 -r1.16.2.43.2.1
--- prefs_display_header.c	10 Apr 2011 17:19:04 -0000	1.16.2.43
+++ prefs_display_header.c	29 Nov 2011 00:15:22 -0000	1.16.2.43.2.1
@@ -703,7 +703,7 @@
 					     GdkEventKey *event,
 					     gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_display_header_cancel();
 	return FALSE;
 }

Index: addr_compl.c
===================================================================
RCS file: /home/claws-mail/claws/src/addr_compl.c,v
retrieving revision 1.27.2.53.2.1
retrieving revision 1.27.2.53.2.2
diff -u -d -r1.27.2.53.2.1 -r1.27.2.53.2.2
--- addr_compl.c	7 Sep 2011 15:52:24 -0000	1.27.2.53.2.1
+++ addr_compl.c	29 Nov 2011 00:15:19 -0000	1.27.2.53.2.2
@@ -23,11 +23,6 @@
 #endif
 #include "defs.h"
 
-/* We know this file uses some deprecated stuff. */
-#undef G_DISABLE_DEPRECATED
-#undef GTK_DISABLE_DEPRECATED
-#undef GDK_DISABLE_DEPRECATED
-
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gdk/gdkkeysyms.h>
@@ -865,18 +860,26 @@
 	gint x, y, width, height, depth;
 
 	/* Get current geometry of window */
-	gdk_window_get_geometry( cw->window->window, &x, &y, &width, &height, &depth );
+	gdk_window_get_geometry( gtk_widget_get_window( cw->window ), &x, &y, &width, &height, &depth );
 
+	/* simple _hide breaks size requisition !? */
 	gtk_widget_hide_all( cw->window );
 	gtk_widget_show_all( cw->window );
 	gtk_widget_size_request( cw->list_view, &r );
-
+printf("%d  + %d < %d\n", y, r.height, gdk_screen_height());
 	/* Adjust window height to available screen space */
-	if( ( y + r.height ) > gdk_screen_height() ) {
-		gtk_window_set_resizable(GTK_WINDOW(cw->window), FALSE);
-		gtk_widget_set_size_request( cw->window, width, gdk_screen_height() - y );
-	} else
-		gtk_widget_set_size_request(cw->window, width, r.height);
+	if( y + r.height > gdk_screen_height())
+		r.height = gdk_screen_height() - y;
+
+	gtk_widget_set_size_request(cw->window, width, r.height);
+
+	gdk_pointer_grab(gtk_widget_get_window(cw->window), TRUE,
+			 GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK |
+			 GDK_BUTTON_RELEASE_MASK,
+			 NULL, NULL, GDK_CURRENT_TIME);
+	gdk_keyboard_grab(gtk_widget_get_window(cw->window), FALSE, GDK_CURRENT_TIME);
+	gtk_grab_add(cw->window);
+
 }
 
 static GdkPixbuf *group_pixbuf = NULL;
@@ -1132,7 +1135,7 @@
 	g_free(text);
 
 	/* Move focus to next widget */
-	parent = GTK_WIDGET(entry)->parent;
+	parent = gtk_widget_get_parent(GTK_WIDGET(entry));
 	if( parent && move_focus) {
 		gtk_widget_child_focus( parent, GTK_DIR_TAB_FORWARD );
 	}
@@ -1187,7 +1190,7 @@
  */
 void address_completion_unregister_entry(GtkEntry *entry)
 {
-	GtkObject *entry_obj;
+	GObject *entry_obj;
 
 	cm_return_if_fail(entry != NULL);
 	cm_return_if_fail(GTK_IS_ENTRY(entry));
@@ -1242,14 +1245,14 @@
 						     GdkEventKey *ev,
 						     gpointer     data)
 {
-	if (ev->keyval == GDK_Tab) {
+	if (ev->keyval == GDK_KEY_Tab) {
 		addrcompl_clear_queue();
 		_allowCommas_ = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry), ENTRY_DATA_ALLOW_COMMAS));
 		if( address_completion_complete_address_in_entry( entry, TRUE ) ) {
 			/* route a void character to the default handler */
 			/* this is a dirty hack; we're actually changing a key
 			 * reported by the system. */
-			ev->keyval = GDK_AudibleBell_Enable;
+			ev->keyval = GDK_KEY_AudibleBell_Enable;
 			ev->state &= ~GDK_SHIFT_MASK;
 
 			/* Create window */			
@@ -1263,16 +1266,16 @@
 		else {
 			/* old behaviour */
 		}
-	} else if (ev->keyval == GDK_Shift_L
-		|| ev->keyval == GDK_Shift_R
-		|| ev->keyval == GDK_Control_L
-		|| ev->keyval == GDK_Control_R
-		|| ev->keyval == GDK_Caps_Lock
-		|| ev->keyval == GDK_Shift_Lock
-		|| ev->keyval == GDK_Meta_L
-		|| ev->keyval == GDK_Meta_R
-		|| ev->keyval == GDK_Alt_L
-		|| ev->keyval == GDK_Alt_R) {
+	} else if (ev->keyval == GDK_KEY_Shift_L
+		|| ev->keyval == GDK_KEY_Shift_R
+		|| ev->keyval == GDK_KEY_Control_L
+		|| ev->keyval == GDK_KEY_Control_R
+		|| ev->keyval == GDK_KEY_Caps_Lock
+		|| ev->keyval == GDK_KEY_Shift_Lock
+		|| ev->keyval == GDK_KEY_Meta_L
+		|| ev->keyval == GDK_KEY_Meta_R
+		|| ev->keyval == GDK_KEY_Alt_L
+		|| ev->keyval == GDK_KEY_Alt_R) {
 		/* these buttons should not clear the cache... */
 	} else
 		clear_completion_cache();
@@ -1291,7 +1294,7 @@
 
 	cm_return_val_if_fail(entry != NULL, FALSE);
 
-	if (!gtkut_widget_has_focus(GTK_WIDGET(entry))) return FALSE;
+	if (!gtk_widget_has_focus(GTK_WIDGET(entry))) return FALSE;
 
 	/* get an address component from the cursor */
 	searchTerm = get_address_from_edit( entry, &cursor_pos );
@@ -1342,6 +1345,7 @@
 	GtkRequisition r;
 	GtkWidget *window;
 	GtkWidget *entry = GTK_WIDGET(entry_);
+	GdkWindow *gdkwin;
 
 	/* Create new window and list */
 	window = gtk_window_new(GTK_WINDOW_POPUP);
@@ -1365,8 +1369,9 @@
 	gtk_scrolled_window_set_shadow_type(GTK_SCROLLED_WINDOW(scroll),
 		GTK_SHADOW_OUT);
 	/* Use entry widget to create initial window */
-	gdk_window_get_geometry(entry->window, &x, &y, &width, &height, &depth);
-	gdk_window_get_origin (entry->window, &x, &y);
+	gdkwin = gtk_widget_get_window(entry),
+	gdk_window_get_geometry(gdkwin, &x, &y, &width, &height, &depth);
+	gdk_window_get_origin (gdkwin, &x, &y);
 	y += height;
 	gtk_window_move(GTK_WINDOW(window), x, y);
 
@@ -1393,17 +1398,12 @@
 			 "key-press-event",
 			 G_CALLBACK(completion_window_key_press),
 			 _compWindow_ );
-	gdk_pointer_grab(window->window, TRUE,
+	gdk_pointer_grab(gtk_widget_get_window(window), TRUE,
 			 GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK |
 			 GDK_BUTTON_RELEASE_MASK,
 			 NULL, NULL, GDK_CURRENT_TIME);
+	gdk_keyboard_grab(gtk_widget_get_window(window), FALSE, GDK_CURRENT_TIME);
 	gtk_grab_add( window );
-
-	/* XXX: GTK2 too??? 
-	 *
-	 * GTK1: this gets rid of the irritating focus rectangle that doesn't
-	 * follow the selection */
-	gtkut_widget_set_can_focus(list_view, FALSE);
 }
 
 /**
@@ -1439,7 +1439,7 @@
 				restore = FALSE;
 				break;
 			}
-			event_widget = event_widget->parent;
+			event_widget = gtk_widget_get_parent(event_widget);
 		}
 	}
 
@@ -1479,19 +1479,19 @@
 	cm_return_val_if_fail(entry != NULL, FALSE);
 
 	/* allow keyboard navigation in the alternatives tree view */
-	if (event->keyval == GDK_Up || event->keyval == GDK_Down ||
-	    event->keyval == GDK_Page_Up || event->keyval == GDK_Page_Down) {
+	if (event->keyval == GDK_KEY_Up || event->keyval == GDK_KEY_Down ||
+	    event->keyval == GDK_KEY_Page_Up || event->keyval == GDK_KEY_Page_Down) {
 		completion_window_advance_selection
 			(GTK_TREE_VIEW(list_view),
-			 event->keyval == GDK_Down ||
-			 event->keyval == GDK_Page_Down ? TRUE : FALSE);
+			 event->keyval == GDK_KEY_Down ||
+			 event->keyval == GDK_KEY_Page_Down ? TRUE : FALSE);
 		return FALSE;
 	}		
 
 	/* make tab move to next field */
-	if( event->keyval == GDK_Tab ) {
+	if( event->keyval == GDK_KEY_Tab ) {
 		/* Reference to parent */
-		parent = GTK_WIDGET(entry)->parent;
+		parent = gtk_widget_get_parent(GTK_WIDGET(entry));
 
 		/* Discard the window */
 		clear_completion_cache();
@@ -1505,9 +1505,9 @@
 	}
 
 	/* make backtab move to previous field */
-	if( event->keyval == GDK_ISO_Left_Tab ) {
+	if( event->keyval == GDK_KEY_ISO_Left_Tab ) {
 		/* Reference to parent */
-		parent = GTK_WIDGET(entry)->parent;
+		parent = gtk_widget_get_parent(GTK_WIDGET(entry));
 
 		/* Discard the window */
 		clear_completion_cache();
@@ -1522,17 +1522,17 @@
 	_allowCommas_ = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(entry), ENTRY_DATA_ALLOW_COMMAS));
 
 	/* look for presses that accept the selection */
-	if (event->keyval == GDK_Return || event->keyval == GDK_space ||
-			event->keyval == GDK_KP_Enter ||
-			(_allowCommas_ && event->keyval == GDK_comma)) {
+	if (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_space ||
+			event->keyval == GDK_KEY_KP_Enter ||
+			(_allowCommas_ && event->keyval == GDK_KEY_comma)) {
 		/* User selected address with a key press */
 
 		/* Display selected address in entry field */		
 		completion_window_apply_selection(
 			GTK_TREE_VIEW(list_view), GTK_ENTRY(entry),
-			event->keyval != GDK_comma);
+			event->keyval != GDK_KEY_comma);
 
-		if (event->keyval == GDK_comma) {
+		if (event->keyval == GDK_KEY_comma) {
 			gint pos = gtk_editable_get_position(GTK_EDITABLE(entry));
 			gtk_editable_insert_text(GTK_EDITABLE(entry), ", ", 2, &pos);
 			gtk_editable_set_position(GTK_EDITABLE(entry), pos + 1);
@@ -1545,16 +1545,16 @@
 	}
 
 	/* key state keys should never be handled */
-	if (event->keyval == GDK_Shift_L
-		 || event->keyval == GDK_Shift_R
-		 || event->keyval == GDK_Control_L
-		 || event->keyval == GDK_Control_R
-		 || event->keyval == GDK_Caps_Lock
-		 || event->keyval == GDK_Shift_Lock
-		 || event->keyval == GDK_Meta_L
-		 || event->keyval == GDK_Meta_R
-		 || event->keyval == GDK_Alt_L
-		 || event->keyval == GDK_Alt_R) {
+	if (event->keyval == GDK_KEY_Shift_L
+		 || event->keyval == GDK_KEY_Shift_R
+		 || event->keyval == GDK_KEY_Control_L
+		 || event->keyval == GDK_KEY_Control_R
+		 || event->keyval == GDK_KEY_Caps_Lock
+		 || event->keyval == GDK_KEY_Shift_Lock
+		 || event->keyval == GDK_KEY_Meta_L
+		 || event->keyval == GDK_KEY_Meta_R
+		 || event->keyval == GDK_KEY_Alt_L
+		 || event->keyval == GDK_KEY_Alt_R) {
 		return FALSE;
 	}
 
@@ -1565,7 +1565,7 @@
 
 	/* make sure anything we typed comes in the edit box */
 	tmp_event.type       = event->type;
-	tmp_event.window     = entry->window;
+	tmp_event.window     = gtk_widget_get_window(GTK_WIDGET(entry));
 	tmp_event.send_event = TRUE;
 	tmp_event.time       = event->time;
 	tmp_event.state      = event->state;

Index: addrbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrbook.c,v
retrieving revision 1.22.2.24
retrieving revision 1.22.2.24.2.1
diff -u -d -r1.22.2.24 -r1.22.2.24.2.1
--- addrbook.c	16 Feb 2011 07:15:55 -0000	1.22.2.24
+++ addrbook.c	29 Nov 2011 00:15:19 -0000	1.22.2.24.2.1
@@ -1817,7 +1817,7 @@
 		return NULL;
 	}
 
-	strcpy(buf, book->path);
+	strncpy(buf, book->path, WORK_BUFLEN);
 	len = strlen(buf);
 	if (len > 0) {
 		if (buf[len-1] != G_DIR_SEPARATOR) {
@@ -1827,7 +1827,7 @@
 	}
 
 	adbookdir = g_strdup(buf);
-	strcat(buf, ADDRBOOK_PREFIX);
+	strncat(buf, ADDRBOOK_PREFIX, WORK_BUFLEN);
 
 	if( ( dir = g_dir_open( adbookdir, 0, NULL ) ) == NULL ) {
 		book->retVal = MGU_OPEN_DIRECTORY;
@@ -1845,8 +1845,8 @@
 		gint i;
 		gboolean flg;
 
-		strcpy(buf, adbookdir);
-		strcat( buf, dir_name );
+		strncpy(buf, adbookdir, WORK_BUFLEN);
+		strncat(buf, dir_name, WORK_BUFLEN);
 		g_stat(buf, &statbuf);
 		if (S_ISREG(statbuf.st_mode)) {
 			if (strncmp(
@@ -2235,6 +2235,19 @@
 	return newFile;
 }
 
+void addrbook_delete_book_file(AddressBookFile *book)
+{
+	gchar *book_path;
+	
+	if (!book->path || !book->fileName)
+		return;
+	
+	book_path = g_strconcat(book->path, G_DIR_SEPARATOR_S,
+				book->fileName, NULL);
+	claws_unlink(book_path);
+	g_free(book_path);
+}
+
 /*
 * End of Source.
 */

Index: uri_opener.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/uri_opener.c,v
retrieving revision 1.1.2.14
retrieving revision 1.1.2.14.2.1
diff -u -d -r1.1.2.14 -r1.1.2.14.2.1
--- uri_opener.c	16 Feb 2011 07:16:17 -0000	1.1.2.14
+++ uri_opener.c	29 Nov 2011 00:15:24 -0000	1.1.2.14.2.1
@@ -322,7 +322,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		uri_opener_close();
 	return FALSE;
 }

Index: prefs_logging.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_logging.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.19.2.1
diff -u -d -r1.1.2.19 -r1.1.2.19.2.1
--- prefs_logging.c	16 Feb 2011 07:16:13 -0000	1.1.2.19
+++ prefs_logging.c	29 Nov 2011 00:15:22 -0000	1.1.2.19.2.1
@@ -97,14 +97,14 @@
 	GtkWidget *hbox_clip_network_log;
 	GtkWidget *checkbtn_clip_network_log;
 	GtkWidget *spinbtn_network_log_length;
-	GtkObject *spinbtn_network_log_length_adj;
+	GtkAdjustment *spinbtn_network_log_length_adj;
 	GtkWidget *hbox_checkbtn;
 #ifndef G_OS_WIN32
 	GtkWidget *vbox1_filtering_log;
 	GtkWidget *hbox_clip_filtering_log;
 	GtkWidget *checkbtn_clip_filtering_log;
 	GtkWidget *spinbtn_filtering_log_length;
-	GtkObject *spinbtn_filtering_log_length_adj;
+	GtkAdjustment *spinbtn_filtering_log_length_adj;
 	GtkWidget *hbox_filtering_log;
 	GtkWidget *checkbtn_filtering_log;
 	GtkWidget *frame_filtering_log;
@@ -130,7 +130,6 @@
 	GtkWidget *checkbtn_log_error;
 	GtkWidget *checkbtn_log_status;
 	GtkSizeGroup *log_size_group;
-	CLAWS_TIP_DECL();
 	
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);

Index: stock_pixmap.c
===================================================================
RCS file: /home/claws-mail/claws/src/stock_pixmap.c,v
retrieving revision 1.25.2.68
retrieving revision 1.25.2.68.2.1
diff -u -d -r1.25.2.68 -r1.25.2.68.2.1
--- stock_pixmap.c	16 Feb 2011 07:16:16 -0000	1.25.2.68
+++ stock_pixmap.c	29 Nov 2011 00:15:23 -0000	1.25.2.68.2.1
@@ -195,8 +195,8 @@
 struct _StockPixmapData
 {
 	gchar **data;
-	GdkPixmap *pixmap;
-	GdkBitmap *mask;
+	cairo_surface_t *pixmap;
+	cairo_pattern_t *mask;
 	gchar *file;
 	gchar *icon_path;
 	GdkPixbuf *pixbuf;
@@ -207,10 +207,8 @@
 struct _OverlayData
 {
 	gboolean is_pixmap;
-	GdkPixmap *base_pixmap;
-	GdkBitmap *base_mask;
-	GdkPixmap *overlay_pixmap;
-	GdkBitmap *overlay_mask;
+	cairo_surface_t *base_pixmap;
+	cairo_surface_t *overlay_pixmap;
 	
 	GdkPixbuf *base_pixbuf;
 	GdkPixbuf *overlay_pixbuf;
@@ -590,24 +588,18 @@
 	return -1;
 }
 
-static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, GdkEventExpose *expose,
-						    OverlayData *data) 
+static gboolean do_pix_draw(GtkWidget *widget, cairo_t *cr,
+			    OverlayData *data) 
 {
-	GdkDrawable *drawable = widget->window;	
-	cairo_t *cr;
+	GdkWindow *drawable = gtk_widget_get_window(widget);	
 	gint left = 0;
 	gint top = 0;
 
 	if (data->is_pixmap) {
 		cm_return_val_if_fail(data->base_pixmap != NULL, FALSE);
-		cm_return_val_if_fail(data->base_mask != NULL, FALSE);
 	} else {
 		cm_return_val_if_fail(data->base_pixbuf != NULL, FALSE);
 	}
-	cr = gdk_cairo_create(drawable);
-
-	gdk_window_clear_area (drawable, expose->area.x, expose->area.y,
-			       expose->area.width, expose->area.height);
 
 	if (data->highlight) {
 		MainWindow *mw = NULL;
@@ -631,10 +623,9 @@
 	}
 
 	if (data->is_pixmap) {
-		gdk_cairo_set_source_pixmap(cr, data->base_pixmap, data->border_x, data->border_y);
+		cairo_set_source_surface(cr, data->base_pixmap, data->border_x, data->border_y);
 		cairo_pattern_set_extend(cairo_get_source(cr), CAIRO_EXTEND_REPEAT);
-		cairo_rectangle(cr, data->border_x, data->border_y,
-        data->base_width, data->base_height);
+		cairo_rectangle(cr, data->border_x, data->border_y, data->base_width, data->base_height);
 		cairo_fill(cr);
 	} else {
 		gdk_cairo_set_source_pixbuf(cr, data->base_pixbuf, data->border_x, data->border_y);
@@ -653,7 +644,7 @@
 			case OVERLAY_TOP_CENTER:
 			case OVERLAY_MID_CENTER:
 			case OVERLAY_BOTTOM_CENTER:
-				left = (data->base_width + data->border_x * 2  - data->overlay_width)/2;
+				left = (data->base_width + data->border_x * 2 - data->overlay_width)/2;
 				break;
 
 			case OVERLAY_TOP_RIGHT:
@@ -675,7 +666,7 @@
 			case OVERLAY_MID_LEFT:
 			case OVERLAY_MID_CENTER:
 			case OVERLAY_MID_RIGHT:
-				top = (data->base_height + data->border_y * 2  - data->overlay_height)/2;
+				top = (data->base_height + data->border_y * 2 - data->overlay_height)/2;
 				break;
 					
 			case OVERLAY_BOTTOM_LEFT:
@@ -692,8 +683,7 @@
 	if (data->position != OVERLAY_NONE) {
 		if (data->is_pixmap) {
 			cm_return_val_if_fail(data->overlay_pixmap != NULL, FALSE);
-			cm_return_val_if_fail(data->overlay_mask != NULL, FALSE);
-			gdk_cairo_set_source_pixmap(cr, data->overlay_pixmap, left, top);
+			cairo_set_source_surface(cr, data->overlay_pixmap, left, top);
 			cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT);
 			cairo_rectangle (cr, left, top, data->overlay_width, data->overlay_height);
 			cairo_fill(cr);
@@ -704,19 +694,40 @@
 		}
 	}
 
-	cairo_destroy(cr);
-	
 	return TRUE;
 }
 
-static void pixmap_with_overlay_destroy_cb(GtkObject *object, OverlayData *data) 
+#if !GTK_CHECK_VERSION(3,0,0)
+static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, GdkEventExpose *expose,
+                                                   OverlayData *data) 
+#else
+static gboolean pixmap_with_overlay_expose_event_cb(GtkWidget *widget, cairo_t *cr,
+						    OverlayData *data) 
+#endif
+{
+#if !GTK_CHECK_VERSION(3,0,0)
+	cairo_t *cr;
+	GdkWindow *drawable = gtk_widget_get_window(widget);	
+	gboolean result;
+
+	cr = gdk_cairo_create(drawable);
+	gdk_window_clear_area (drawable, expose->area.x, expose->area.y,
+                               expose->area.width, expose->area.height);
+
+	result = do_pix_draw(widget, cr, data);
+	cairo_destroy(cr);
+	return result;
+#else
+	return do_pix_draw(widget, cr, data);
+#endif
+}
+
+static void pixmap_with_overlay_destroy_cb(GtkWidget *object, OverlayData *data) 
 {
 	if (data->is_pixmap) {
-		g_object_unref(data->base_pixmap);
-		g_object_unref(data->base_mask);
+		cairo_surface_destroy(data->base_pixmap);
 		if (data->position != OVERLAY_NONE) {
-			g_object_unref(data->overlay_pixmap);
-			g_object_unref(data->overlay_mask);
+			cairo_surface_destroy(data->overlay_pixmap);
 		}
 	} else {
 		g_object_unref(data->base_pixbuf);
@@ -744,16 +755,17 @@
 					    StockPixmap overlay, OverlayPosition pos,
 					    gint border_x, gint border_y)
 {
-	GdkPixmap *stock_pixmap = NULL;
-	GdkBitmap *stock_mask = NULL;
+	cairo_surface_t *stock_pixmap = NULL;
 	GdkPixbuf *stock_pixbuf = NULL;
 	GtkWidget *widget = NULL;
 	GtkWidget *stock_wid = NULL;
+	GtkRequisition requisition;
 	OverlayData *data = NULL;
 	
 	data = g_new0(OverlayData, 1);
 
 	stock_wid = stock_pixmap_widget(window, icon);
+	gtk_widget_get_requisition(stock_wid, &requisition);
 
 	if (gtk_image_get_storage_type(GTK_IMAGE(stock_wid)) == GTK_IMAGE_PIXMAP)
 		data->is_pixmap = TRUE;
@@ -761,27 +773,26 @@
 		data->is_pixmap = FALSE;
 
 	if (data->is_pixmap) {
-		gtk_image_get_pixmap(GTK_IMAGE(stock_wid), &stock_pixmap, &stock_mask);
-		g_object_ref(stock_pixmap);
-		g_object_ref(stock_mask);
+		cairo_t *cr = gdk_cairo_create(gtk_widget_get_window(stock_wid));
+		stock_pixmap = cairo_get_target(cr);
+		cairo_surface_reference(stock_pixmap);
+		cairo_destroy(cr);
 		data->base_pixmap = stock_pixmap;
-		data->base_mask   = stock_mask;
-		data->base_height = stock_wid->requisition.height;
-		data->base_width  = stock_wid->requisition.width;
+		data->base_height = requisition.height;
+		data->base_width  = requisition.width;
 		gtk_widget_destroy(stock_wid);
 
 		if (pos == OVERLAY_NONE) {
 			data->overlay_pixmap = NULL;
-			data->overlay_mask   = NULL;
 		} else {
 			stock_wid = stock_pixmap_widget(window, overlay);
-			gtk_image_get_pixmap(GTK_IMAGE(stock_wid), &stock_pixmap, &stock_mask);
-			g_object_ref(stock_pixmap);
-			g_object_ref(stock_mask);
+			cr = gdk_cairo_create(gtk_widget_get_window(stock_wid));
+			stock_pixmap = cairo_get_target(cr);
+			cairo_surface_reference(stock_pixmap);
+			cairo_destroy(cr);
 			data->overlay_pixmap = stock_pixmap;
-			data->overlay_mask   = stock_mask;
-			data->overlay_height = stock_wid->requisition.height;
-			data->overlay_width  = stock_wid->requisition.width;
+			data->overlay_height = requisition.height;
+			data->overlay_width  = requisition.width;
 
 			gtk_widget_destroy(stock_wid);
 		}
@@ -790,19 +801,18 @@
 		stock_pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(stock_wid));
 		g_object_ref(stock_pixbuf);
 		data->base_pixbuf = stock_pixbuf;
-		data->base_height = stock_wid->requisition.height;
-		data->base_width  = stock_wid->requisition.width;
+		data->base_height = requisition.height;
+		data->base_width  = requisition.width;
 		gtk_widget_destroy(stock_wid);
 		if (pos == OVERLAY_NONE) {
 			data->overlay_pixmap = NULL;
-			data->overlay_mask   = NULL;
 		} else {
 			stock_wid = stock_pixmap_widget(window, overlay);
 			stock_pixbuf = gtk_image_get_pixbuf(GTK_IMAGE(stock_wid));
 			g_object_ref(stock_pixbuf);
 			data->overlay_pixbuf = stock_pixbuf;
-			data->overlay_height = stock_wid->requisition.height;
-			data->overlay_width  = stock_wid->requisition.width;
+			data->overlay_height = requisition.height;
+			data->overlay_width  = requisition.width;
 
 			gtk_widget_destroy(stock_wid);
 		}
@@ -815,8 +825,13 @@
 	widget = gtk_drawing_area_new();
 	gtk_widget_set_size_request(widget, data->base_width + border_x * 2, 
 			      data->base_height + border_y * 2);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	g_signal_connect(G_OBJECT(widget), "expose_event", 
 			 G_CALLBACK(pixmap_with_overlay_expose_event_cb), data);
+#else
+	g_signal_connect(G_OBJECT(widget), "draw", 
+			 G_CALLBACK(pixmap_with_overlay_expose_event_cb), data);
+#endif
 	g_signal_connect(G_OBJECT(widget), "destroy",
 			 G_CALLBACK(pixmap_with_overlay_destroy_cb), data);
 	g_object_set_data(G_OBJECT(widget), "highlight", &(data->highlight));

Index: send_message.c
===================================================================
RCS file: /home/claws-mail/claws/src/send_message.c,v
retrieving revision 1.17.2.60
retrieving revision 1.17.2.60.2.1
diff -u -d -r1.17.2.60 -r1.17.2.60.2.1
--- send_message.c	5 May 2011 07:26:37 -0000	1.17.2.60
+++ send_message.c	29 Nov 2011 00:15:23 -0000	1.17.2.60.2.1
@@ -509,7 +509,7 @@
 		(dialog->dialog, (total_len == 0) ? 0 : (gfloat)cur_len / (gfloat)total_len);
 
 	if (mainwin) {
-		if (!gtkut_widget_get_visible(mainwin->progressbar))	
+		if (!gtk_widget_get_visible(mainwin->progressbar))	
 			gtk_widget_show(mainwin->progressbar);
 		gtk_progress_bar_set_fraction
 			(GTK_PROGRESS_BAR(mainwin->progressbar),

Index: prefs_summaries.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_summaries.c,v
retrieving revision 1.1.2.66
retrieving revision 1.1.2.66.2.1
diff -u -d -r1.1.2.66 -r1.1.2.66.2.1
--- prefs_summaries.c	9 Apr 2011 21:00:42 -0000	1.1.2.66
+++ prefs_summaries.c	29 Nov 2011 00:15:22 -0000	1.1.2.66.2.1
@@ -318,7 +318,7 @@
 	GtkWidget *hbox1;
 	GtkWidget *label_ng_abbrev;
 	GtkWidget *spinbtn_ng_abbrev_len;
-	GtkObject *spinbtn_ng_abbrev_len_adj;
+	GtkAdjustment *spinbtn_ng_abbrev_len_adj;
 	GtkWidget *vbox2;
 	GtkWidget *vbox3;
 	GtkWidget *checkbtn_useaddrbook;
@@ -333,7 +333,7 @@
 	GtkWidget *checkbtn_reopen_last_folder;
 	GtkWidget *optmenu_always_show_msg;
 	GtkWidget *spinbtn_mark_as_read_delay;
-	GtkObject *spinbtn_mark_as_read_delay_adj;
+	GtkAdjustment *spinbtn_mark_as_read_delay_adj;
 	GtkWidget *checkbtn_immedexec;
 	GtkWidget *checkbtn_ask_mark_all_read;
 	GtkWidget *label, *label_fill;
@@ -345,7 +345,6 @@
 	GtkWidget *button_edit_actions;
 	GtkWidget *radio_mark_as_read_on_select;
 	GtkWidget *radio_mark_as_read_on_new_win;
-	CLAWS_TIP_DECL();
 
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);
@@ -733,7 +732,7 @@
 static gboolean date_format_key_pressed(GtkWidget *keywidget, GdkEventKey *event,
 					GtkWidget **widget)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		date_format_cancel_btn_clicked(NULL, widget);
 	return FALSE;
 }

Index: prefs_compose_writing.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_compose_writing.c,v
retrieving revision 1.1.2.30
retrieving revision 1.1.2.30.2.1
diff -u -d -r1.1.2.30 -r1.1.2.30.2.1
--- prefs_compose_writing.c	16 Feb 2011 07:16:12 -0000	1.1.2.30
+++ prefs_compose_writing.c	29 Nov 2011 00:15:22 -0000	1.1.2.30.2.1
@@ -85,12 +85,12 @@
 
 	GtkWidget *hbox_undolevel;
 	GtkWidget *label_undolevel;
-	GtkObject *spinbtn_undolevel_adj;
+	GtkAdjustment *spinbtn_undolevel_adj;
 	GtkWidget *spinbtn_undolevel;
 
 	GtkWidget *hbox_warn_large_insert;
 	GtkWidget *checkbtn_warn_large_insert;
-	GtkObject *spinbtn_warn_large_insert_adj;
+	GtkAdjustment *spinbtn_warn_large_insert_adj;
 	GtkWidget *spinbtn_warn_large_insert_size;
 	GtkWidget *label_warn_large_insert_size;
 
@@ -102,7 +102,7 @@
 
 	GtkWidget *hbox_autosave;
 	GtkWidget *checkbtn_autosave;
-	GtkObject *spinbtn_autosave_adj;
+	GtkAdjustment *spinbtn_autosave_adj;
 	GtkWidget *spinbtn_autosave_length;
 	GtkWidget *label_autosave_length;
 	

Index: undo.c
===================================================================
RCS file: /home/claws-mail/claws/src/undo.c,v
retrieving revision 1.13.2.22
retrieving revision 1.13.2.22.2.1
diff -u -d -r1.13.2.22 -r1.13.2.22.2.1
--- undo.c	16 Feb 2011 07:16:17 -0000	1.13.2.22
+++ undo.c	29 Nov 2011 00:15:24 -0000	1.13.2.22.2.1
@@ -311,9 +311,10 @@
 
 	undo_check_size(undostruct);
 
-	vadj = GTK_ADJUSTMENT(GTK_TEXT_VIEW(undostruct->textview)->vadjustment);
+	vadj = GTK_ADJUSTMENT(gtk_text_view_get_vadjustment(
+				GTK_TEXT_VIEW(undostruct->textview)));
 	undoinfo = undo_object_new(g_strdup(text), start_pos, end_pos, action,
-				   vadj->value);
+				   gtk_adjustment_get_value(vadj));
 
 	if (end_pos - start_pos != 1 || text[0] == '\n')
 		undoinfo->mergeable = FALSE;
@@ -366,7 +367,7 @@
 
 	/* Move the view (scrollbars) to the correct position */
 	gtk_adjustment_set_value
-		(GTK_ADJUSTMENT(textview->vadjustment),
+		(GTK_ADJUSTMENT(gtk_text_view_get_vadjustment(textview)),
 		 undoinfo->window_position);
 	
 	switch (undoinfo->action) {
@@ -449,7 +450,7 @@
 	gtk_text_buffer_place_cursor(buffer, &iter);
 
 	/* Move the view to the right position. */
-	gtk_adjustment_set_value(textview->vadjustment, 
+	gtk_adjustment_set_value(gtk_text_view_get_vadjustment(textview), 
 				 redoinfo->window_position);
 
 	switch (redoinfo->action) {

Index: importldif.c
===================================================================
RCS file: /home/claws-mail/claws/src/importldif.c,v
retrieving revision 1.14.2.26
retrieving revision 1.14.2.26.2.1
diff -u -d -r1.14.2.26 -r1.14.2.26.2.1
--- importldif.c	16 Feb 2011 07:16:03 -0000	1.14.2.26
+++ importldif.c	29 Nov 2011 00:15:21 -0000	1.14.2.26.2.1
@@ -613,7 +613,7 @@
  * \param data   User data.
  */
 static gboolean imp_ldif_key_pressed( GtkWidget *widget, GdkEventKey *event, gpointer data ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		imp_ldif_cancel( widget, data );
 	}
 	return FALSE;
@@ -631,7 +631,6 @@
 	GtkWidget *entryFile;
 	GtkWidget *entryName;
 	GtkWidget *btnFile;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	vbox = gtk_vbox_new(FALSE, 8);
@@ -717,7 +716,6 @@
 	GtkWidget *checkSelect;
 	GtkWidget *btnModify;
 	GtkWidget *eventBox;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	gchar *titles[ FIELDS_N_COLS ];

Index: editgroup.c
===================================================================
RCS file: /home/claws-mail/claws/src/editgroup.c,v
retrieving revision 1.11.2.26
retrieving revision 1.11.2.26.2.1
diff -u -d -r1.11.2.26 -r1.11.2.26.2.1
--- editgroup.c	16 Feb 2011 07:15:57 -0000	1.11.2.26
+++ editgroup.c	29 Nov 2011 00:15:20 -0000	1.11.2.26.2.1
@@ -114,7 +114,7 @@
 }
 
 static gboolean edit_group_key_pressed(GtkWidget *widget, GdkEventKey *event, gboolean *cancelled) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -351,15 +351,9 @@
 
 	clist_group = gtk_sctree_new_with_titles( GROUP_N_COLS, 0, titles );
 	gtk_container_add( GTK_CONTAINER(clist_swin), clist_group );
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist_group), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_group),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist_group), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_group),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(clist_group), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_group),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 	gtk_sctree_set_stripes(GTK_SCTREE(clist_group), prefs_common.use_stripes_in_summaries);
 	gtk_cmclist_set_selection_mode( GTK_CMCLIST(clist_group), GTK_SELECTION_EXTENDED );
 	gtk_cmclist_set_column_width( GTK_CMCLIST(clist_group), GROUP_COL_NAME, GROUP_COL_WIDTH_NAME );
@@ -390,15 +384,9 @@
 
 	clist_avail = gtk_sctree_new_with_titles( GROUP_N_COLS, 0, titles );
 	gtk_container_add( GTK_CONTAINER(clist_swin), clist_avail );
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist_avail), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_avail),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist_avail), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_avail),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(clist_avail), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(clist_avail),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 	gtk_cmclist_set_selection_mode( GTK_CMCLIST(clist_avail), GTK_SELECTION_EXTENDED );
 	gtk_cmclist_set_column_width( GTK_CMCLIST(clist_avail), GROUP_COL_NAME, GROUP_COL_WIDTH_NAME );
 	gtk_cmclist_set_column_width( GTK_CMCLIST(clist_avail), GROUP_COL_EMAIL, GROUP_COL_WIDTH_EMAIL );

Index: textview.h
===================================================================
RCS file: /home/claws-mail/claws/src/textview.h,v
retrieving revision 1.12.2.27
retrieving revision 1.12.2.27.2.1
diff -u -d -r1.12.2.27 -r1.12.2.27.2.1
--- textview.h	16 Feb 2011 07:16:17 -0000	1.12.2.27
+++ textview.h	29 Nov 2011 00:15:24 -0000	1.12.2.27.2.1
@@ -70,8 +70,6 @@
 	GSList *uri_list;
 	gint body_pos;
 
-	gboolean show_all_headers;
-
 	MessageView *messageview;
 	gint last_buttonpress;
 
@@ -96,8 +94,6 @@
 				 MimeInfo	*partinfo);
 void textview_clear		(TextView	*textview);
 void textview_destroy		(TextView	*textview);
-void textview_set_all_headers	(TextView	*textview,
-				 gboolean	 all_headers);
 void textview_set_font		(TextView	*textview,
 				 const gchar	*codeset);
 void textview_set_text		(TextView	*textview,
@@ -108,6 +104,8 @@
 				 gboolean	 up);
 gboolean textview_scroll_page	(TextView	*textview,
 				 gboolean	 up);
+void textview_scroll_max	(TextView 	*textview,
+				 gboolean 	 up);
 
 gboolean textview_search_string			(TextView	*textview,
 						 const gchar	*str,

Index: prefs_summary_open.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_summary_open.c,v
retrieving revision 1.1.2.10
retrieving revision 1.1.2.10.2.1
diff -u -d -r1.1.2.10 -r1.1.2.10.2.1
--- prefs_summary_open.c	16 Feb 2011 07:16:14 -0000	1.1.2.10
+++ prefs_summary_open.c	29 Nov 2011 00:15:23 -0000	1.1.2.10.2.1
@@ -526,7 +526,7 @@
 					     GdkEventKey *event,
 					     gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_summary_open_cancel();
 	return FALSE;
 }

Index: textview.c
===================================================================
RCS file: /home/claws-mail/claws/src/textview.c,v
retrieving revision 1.96.2.232.2.1
retrieving revision 1.96.2.232.2.2
diff -u -d -r1.96.2.232.2.1 -r1.96.2.232.2.2
--- textview.c	7 Sep 2011 15:52:28 -0000	1.96.2.232.2.1
+++ textview.c	29 Nov 2011 00:15:23 -0000	1.96.2.232.2.2
@@ -238,8 +238,10 @@
 #  define HEIGHT 48
 #endif
 	if (textview->image) {
+		GtkAllocation allocation;
 		gint x, y, x1;
-		x1 = textview->text->allocation.width - WIDTH - 5;
+		gtk_widget_get_allocation(textview->text, &allocation);
+		x1 = allocation.width - WIDTH - 5;
 		gtk_text_view_buffer_to_window_coords(
 			GTK_TEXT_VIEW(textview->text),
 			GTK_TEXT_WINDOW_TEXT, x1, 5, &x, &y);
@@ -373,7 +375,6 @@
 	textview->text               = text;
 	textview->uri_list           = NULL;
 	textview->body_pos           = 0;
-	textview->show_all_headers   = FALSE;
 	textview->last_buttonpress   = GDK_NOTHING;
 	textview->image		     = NULL;
 	return textview;
@@ -383,10 +384,16 @@
 {
 	GtkTextBuffer *buffer;
 	GtkTextTag *tag, *qtag;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	static GdkColor yellow, black;
 	static gboolean color_init = FALSE;
+#else
+	static GdkColor yellow = { (guint32)0, (guint16)0xf5, (guint16)0xf6, (guint16)0xbe };
+	static GdkColor black = { (guint32)0, (guint16)0x0, (guint16)0x0, (guint16)0x0 };
+#endif
 	static PangoFontDescription *font_desc, *bold_font_desc;
 	
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	if (!color_init) {
 		gdk_color_parse("#f5f6be", &yellow);
 		gdk_color_parse("#000000", &black);
@@ -395,6 +402,7 @@
 		color_init &= gdk_colormap_alloc_color(
 			gdk_colormap_get_system(), &black, FALSE, TRUE);
 	}
+#endif
 
 	if (!font_desc)
 		font_desc = pango_font_description_from_string
@@ -500,7 +508,6 @@
 		watch_cursor = gdk_cursor_new(GDK_WATCH);
 
 	textview_reflect_prefs(textview);
-	textview_set_all_headers(textview, FALSE);
 	textview_set_font(textview, NULL);
 	textview_create_tags(GTK_TEXT_VIEW(textview->text), textview);
 }
@@ -608,6 +615,7 @@
 
 static void textview_add_part(TextView *textview, MimeInfo *mimeinfo)
 {
+	GtkAllocation allocation;
 	GtkTextView *text;
 	GtkTextBuffer *buffer;
 	GtkTextIter iter, start_iter;
@@ -715,9 +723,10 @@
 				return;
 			}
 
+			gtk_widget_get_allocation(textview->scrolledwin, &allocation);
 			pixbuf = claws_load_pixbuf_fitting(pixbuf,
-					textview->scrolledwin->allocation.width,
-					textview->scrolledwin->allocation.height);
+					allocation.width,
+					allocation.height);
 
 			if (textview->stop_loading) {
 				return;
@@ -1665,11 +1674,6 @@
 	g_free(textview);
 }
 
-void textview_set_all_headers(TextView *textview, gboolean all_headers)
-{
-	textview->show_all_headers = all_headers;
-}
-
 #define CHANGE_TAG_FONT(tagname, font) { \
 	tag = gtk_text_tag_table_lookup(tags, tagname); \
 	if (tag) \
@@ -1791,7 +1795,7 @@
 
 	cm_return_val_if_fail(fp != NULL, NULL);
 
-	if (textview->show_all_headers) {
+	if (prefs_common.show_all_headers) {
 		headers = procheader_get_header_array_asis(fp);
 		sorted_headers = g_ptr_array_new();
 		for (i = 0; i < headers->len; i++) {
@@ -1855,6 +1859,7 @@
 
 static void textview_show_face(TextView *textview)
 {
+	GtkAllocation allocation;
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
 	MsgInfo *msginfo = textview->messageview->msginfo;
 	int x = 0;
@@ -1875,7 +1880,8 @@
 
 	gtk_widget_show(textview->image);
 	
-	x = textview->text->allocation.width - WIDTH -5;
+	gtk_widget_get_allocation(textview->text, &allocation);
+	x = allocation.width - WIDTH -5;
 
 	gtk_text_view_add_child_in_window(text, textview->image, 
 		GTK_TEXT_WINDOW_TEXT, x, 5);
@@ -1892,6 +1898,7 @@
 
 void textview_show_icon(TextView *textview, const gchar *stock_id)
 {
+	GtkAllocation allocation;
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
 	int x = 0;
 	
@@ -1903,7 +1910,8 @@
 
 	gtk_widget_show(textview->image);
 	
-	x = textview->text->allocation.width - WIDTH -5;
+	gtk_widget_get_allocation(textview->text, &allocation);
+	x = allocation.width - WIDTH -5;
 
 	gtk_text_view_add_child_in_window(text, textview->image, 
 		GTK_TEXT_WINDOW_TEXT, x, 5);
@@ -1917,6 +1925,7 @@
 #if HAVE_LIBCOMPFACE
 static void textview_show_xface(TextView *textview)
 {
+	GtkAllocation allocation;
 	MsgInfo *msginfo = textview->messageview->msginfo;
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
 	int x = 0;
@@ -1949,7 +1958,8 @@
 
 	gtk_widget_show(textview->image);
 	
-	x = textview->text->allocation.width - WIDTH -5;
+	gtk_widget_get_allocation(textview->text, &allocation);
+	x = allocation.width - WIDTH -5;
 
 	gtk_text_view_add_child_in_window(text, textview->image, 
 		GTK_TEXT_WINDOW_TEXT, x, 5);
@@ -2244,7 +2254,7 @@
 void textview_scroll_one_line(TextView *textview, gboolean up)
 {
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
-	GtkAdjustment *vadj = text->vadjustment;
+	GtkAdjustment *vadj = gtk_text_view_get_vadjustment(text);
 
 	gtkutils_scroll_one_line(GTK_WIDGET(text), vadj, up);
 }
@@ -2252,11 +2262,28 @@
 gboolean textview_scroll_page(TextView *textview, gboolean up)
 {
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
-	GtkAdjustment *vadj = text->vadjustment;
+	GtkAdjustment *vadj = gtk_text_view_get_vadjustment(text);
 
 	return gtkutils_scroll_page(GTK_WIDGET(text), vadj, up);
 }
 
+void textview_scroll_max(TextView *textview, gboolean up)
+{
+	GtkTextBuffer *buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(textview->text));
+	GtkTextIter iter;
+	
+	if (up) {
+		gtk_text_buffer_get_start_iter(buffer, &iter);
+		gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview->text),
+						&iter, 0.0, TRUE, 0.0, 1.0);
+	
+	} else {
+		gtk_text_buffer_get_end_iter(buffer, &iter);
+		gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(textview->text),
+						&iter, 0.0, TRUE, 0.0, 0.0);
+	}
+}
+
 #define KEY_PRESS_EVENT_STOP() \
 	g_signal_stop_emission_by_name(G_OBJECT(widget), \
 				       "key_press_event");
@@ -2264,6 +2291,7 @@
 static gint textview_key_pressed(GtkWidget *widget, GdkEventKey *event,
 				 TextView *textview)
 {
+	GdkWindow *window;
 	SummaryView *summaryview = NULL;
 	MessageView *messageview = textview->messageview;
 
@@ -2272,19 +2300,21 @@
 		summaryview = messageview->mainwin->summaryview;
 
 	switch (event->keyval) {
-	case GDK_Tab:
-	case GDK_Home:
-	case GDK_Left:
-	case GDK_Up:
-	case GDK_Right:
-	case GDK_Down:
-	case GDK_Page_Up:
-	case GDK_Page_Down:
-	case GDK_End:
-	case GDK_Control_L:
-	case GDK_Control_R:
+	case GDK_KEY_Tab:
+	case GDK_KEY_Left:
+	case GDK_KEY_Up:
+	case GDK_KEY_Right:
+	case GDK_KEY_Down:
+	case GDK_KEY_Page_Up:
+	case GDK_KEY_Page_Down:
+	case GDK_KEY_Control_L:
+	case GDK_KEY_Control_R:
 		return FALSE;
-	case GDK_space:
+	case GDK_KEY_Home:
+	case GDK_KEY_End:
+		textview_scroll_max(textview,(event->keyval == GDK_KEY_Home));
+		return TRUE;
+	case GDK_KEY_space:
 		if (summaryview)
 			summary_pass_key_press_event(summaryview, event);
 		else
@@ -2293,25 +2323,25 @@
 				 (event->state &
 				  (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
 		break;
-	case GDK_BackSpace:
+	case GDK_KEY_BackSpace:
 		mimeview_scroll_page(messageview->mimeview, TRUE);
 		break;
-	case GDK_Return:
-	case GDK_KP_Enter:
+	case GDK_KEY_Return:
+	case GDK_KEY_KP_Enter:
 		mimeview_scroll_one_line
 			(messageview->mimeview, (event->state &
 				    (GDK_SHIFT_MASK|GDK_MOD1_MASK)) != 0);
 		break;
-	case GDK_Delete:
+	case GDK_KEY_Delete:
 		if (summaryview)
 			summary_pass_key_press_event(summaryview, event);
 		break;
-	case GDK_y:
-	case GDK_t:
-	case GDK_l:
-	case GDK_o:
-	case GDK_c:
-	case GDK_a:
+	case GDK_KEY_y:
+	case GDK_KEY_t:
+	case GDK_KEY_l:
+	case GDK_KEY_o:
+	case GDK_KEY_c:
+	case GDK_KEY_a:
 		if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) == 0) {
 			KEY_PRESS_EVENT_STOP();
 			mimeview_pass_key_press_event(messageview->mimeview,
@@ -2320,11 +2350,12 @@
 		}
 		/* possible fall through */
 	default:
+		window = gtk_widget_get_window(messageview->mainwin->window);
 		if (summaryview &&
-		    event->window != messageview->mainwin->window->window) {
+		    event->window != window) {
 			GdkEventKey tmpev = *event;
 
-			tmpev.window = messageview->mainwin->window->window;
+			tmpev.window = window;
 			KEY_PRESS_EVENT_STOP();
 			gtk_widget_event(messageview->mainwin->window,
 					 (GdkEvent *)&tmpev);
@@ -2342,7 +2373,7 @@
 	if (textview->loading)
 		return FALSE;
 	textview_uri_update(textview, event->x, event->y);
-	gdk_window_get_pointer(widget->window, NULL, NULL, NULL);
+	gdk_window_get_pointer(gtk_widget_get_window(widget), NULL, NULL, NULL);
 
 	return FALSE;
 }
@@ -2375,7 +2406,7 @@
 	if (window != event->window)
 		return FALSE;
 	
-	gdk_window_get_pointer(widget->window, &wx, &wy, NULL);
+	gdk_window_get_pointer(gtk_widget_get_window(widget), &wx, &wy, NULL);
 	textview_uri_update(textview, wx, wy);
 
 	return FALSE;

Index: statusbar.c
===================================================================
RCS file: /home/claws-mail/claws/src/statusbar.c,v
retrieving revision 1.5.2.29
retrieving revision 1.5.2.29.2.1
diff -u -d -r1.5.2.29 -r1.5.2.29.2.1
--- statusbar.c	16 Feb 2011 07:16:16 -0000	1.5.2.29
+++ statusbar.c	29 Nov 2011 00:15:23 -0000	1.5.2.29.2.1
@@ -57,14 +57,15 @@
 	statusbar = gtk_statusbar_new();
 	gtk_widget_set_size_request(statusbar, 1, -1);
 	statusbar_list = g_list_append(statusbar_list, statusbar);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	gtk_statusbar_set_has_resize_grip(GTK_STATUSBAR(statusbar), 
 					  FALSE);
-	gtk_container_set_border_width(GTK_CONTAINER(statusbar), 1);
-#if GTK_CHECK_VERSION (2, 19, 1)
-	child = gtk_statusbar_get_message_area(GTK_STATUSBAR(statusbar));
 #else
-	child = GTK_STATUSBAR(statusbar)->label;
+	gtk_window_set_has_resize_grip(GTK_WINDOW(statusbar), 
+					  FALSE);
 #endif
+	gtk_container_set_border_width(GTK_CONTAINER(statusbar), 1);
+	child = gtk_statusbar_get_message_area(GTK_STATUSBAR(statusbar));
 	parent = gtk_widget_get_parent(child);
 	gtk_container_remove(GTK_CONTAINER(parent), g_object_ref(child));
 	hbox = gtk_hbox_new(FALSE, 0);
@@ -250,7 +251,7 @@
 		gtk_progress_bar_set_text(progressbar, buf);
 		gtk_progress_bar_set_fraction(progressbar,
 			 (total == 0) ? 0 : (gfloat)done / (gfloat)total);
-		if (!gtkut_widget_get_visible(GTK_WIDGET(progressbar)))
+		if (!gtk_widget_get_visible(GTK_WIDGET(progressbar)))
 			gtk_widget_show(GTK_WIDGET(progressbar));
 	} else if (total == 0) {
 		gtk_progress_bar_set_text(progressbar, "");

Index: prefs_actions.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_actions.h,v
retrieving revision 1.5.2.7
retrieving revision 1.5.2.7.2.1
diff -u -d -r1.5.2.7 -r1.5.2.7.2.1
--- prefs_actions.h	16 Feb 2011 07:16:12 -0000	1.5.2.7
+++ prefs_actions.h	29 Nov 2011 00:15:22 -0000	1.5.2.7.2.1
@@ -25,5 +25,7 @@
 void prefs_actions_read_config		(void);
 void prefs_actions_write_config		(void);
 void prefs_actions_open			(MainWindow	*mainwin);
+void prefs_actions_rename_path		(const gchar *old_path,
+					 const gchar *new_path);
 
 #endif /* __PREFS_ACTIONS_H__ */

Index: prefs_actions.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_actions.c,v
retrieving revision 1.60.2.73
retrieving revision 1.60.2.73.2.1
diff -u -d -r1.60.2.73 -r1.60.2.73.2.1
--- prefs_actions.c	16 Feb 2011 07:16:12 -0000	1.60.2.73
+++ prefs_actions.c	29 Nov 2011 00:15:22 -0000	1.60.2.73.2.1
@@ -197,7 +197,6 @@
 	GtkWidget *up_btn;
 	GtkWidget *down_btn;
 	static GdkGeometry geometry;
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating actions configuration window...\n");
 
@@ -425,6 +424,7 @@
 {
 	gtk_entry_set_text(GTK_ENTRY(actions.name_entry), "");
 	gtk_entry_set_text(GTK_ENTRY(actions.cmd_entry), "");
+	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(actions.shell_radiobtn), TRUE);
 }
 
 void prefs_actions_read_config(void)
@@ -538,6 +538,7 @@
 				(GTK_TREE_VIEW(actions.actions_list_view)));
 
 	prefs_actions_clear_list(store);	
+	prefs_actions_reset_dialog();
 
 	for (cur = prefs_common.actions_list; cur != NULL; cur = cur->next) {
 		gchar *action = (gchar *) cur->data;
@@ -848,7 +849,7 @@
 static gboolean prefs_actions_key_pressed(GtkWidget *widget, GdkEventKey *event,
 					  gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_actions_cancel(widget, data);
 	else {
 		GtkWidget *focused = gtkut_get_focused_child(
@@ -1079,6 +1080,20 @@
 	{"PrefsActionsPopup/Duplicate",	NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_actions_duplicate_cb) },
 };
 
+static void prefs_actions_row_selected(GtkTreeSelection *selection, GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_actions_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_actions_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				   GtkTreeView *list_view)
 {
@@ -1173,6 +1188,8 @@
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_actions_row_selected), list_view);
 
 	/* create the columns */
 	prefs_actions_create_list_view_columns(GTK_WIDGET(list_view));
@@ -1307,6 +1324,7 @@
 	if (action_list == NULL)
 		return;
 
+	action_list = filtering_action_list_sort(action_list);
 	str = filteringaction_list_to_string(action_list);
 
 	if (str != NULL) {
@@ -1318,3 +1336,31 @@
 		modified = TRUE;
 	}
 }
+
+void prefs_actions_rename_path(const gchar *old_path, const gchar *new_path)
+{
+	gchar **tokens, *action_str;
+	GSList *action, *action_list;
+	
+	for (action = prefs_common.actions_list; action != NULL;
+			action = action->next) {
+		action_str = (gchar *)action->data;
+		tokens = g_strsplit_set(action_str, "{}", 5);
+		
+		if (tokens[0] && tokens[1] && *tokens[1] != '\0')
+			action_list = matcher_parser_get_action_list(tokens[1]);
+		else
+			action_list = NULL;
+
+		if (action_list &&
+		    filtering_action_list_rename_path(action_list,
+						old_path, new_path)) {
+			g_free(action->data);
+			action->data = g_strconcat(tokens[0], "{",
+				filteringaction_list_to_string(action_list),
+				"}", NULL);
+		}
+
+		g_strfreev(tokens);
+	}
+}

Index: editvcard.c
===================================================================
RCS file: /home/claws-mail/claws/src/editvcard.c,v
retrieving revision 1.5.12.17
retrieving revision 1.5.12.17.2.1
diff -u -d -r1.5.12.17 -r1.5.12.17.2.1
--- editvcard.c	16 Feb 2011 07:15:57 -0000	1.5.12.17
+++ editvcard.c	29 Nov 2011 00:15:20 -0000	1.5.12.17.2.1
@@ -121,7 +121,7 @@
 }
 
 static gboolean edit_vcard_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: prefs_template.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_template.c,v
retrieving revision 1.12.2.75
retrieving revision 1.12.2.75.2.1
diff -u -d -r1.12.2.75 -r1.12.2.75.2.1
--- prefs_template.c	16 Feb 2011 07:16:14 -0000	1.12.2.75
+++ prefs_template.c	29 Nov 2011 00:15:23 -0000	1.12.2.75.2.1
@@ -184,7 +184,6 @@
 	GtkWidget         *ok_btn;
 	static GdkGeometry geometry;
 	gint i;
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating templates configuration window...\n");
 
@@ -510,7 +509,7 @@
 static gboolean prefs_template_key_pressed_cb(GtkWidget *widget,
 					      GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		prefs_template_cancel_cb(NULL, NULL);
 	else {
 		GtkWidget *focused = gtkut_get_focused_child(
@@ -895,6 +894,7 @@
 		return;
 
 	gtk_list_store_remove(GTK_LIST_STORE(model), &iter);
+	prefs_template_reset_dialog();
 	modified_list = TRUE;	
 }
 
@@ -1102,6 +1102,21 @@
 	{"PrefsTemplatePopup/Duplicate",	NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_template_duplicate_cb) },
 };
 
+static void prefs_template_row_selected(GtkTreeSelection *selection,
+					GtkTreeView *list_view)
+{
+	GtkTreePath *path;
+	GtkTreeIter iter;
+	GtkTreeModel *model;
+	
+	if (!gtk_tree_selection_get_selected(selection, &model, &iter))
+		return;
+	
+	path = gtk_tree_model_get_path(model, &iter);
+	prefs_template_select_row(list_view, path);
+	gtk_tree_path_free(path);
+}
+
 static gint prefs_template_list_btn_pressed(GtkWidget *widget, GdkEventButton *event,
 				   GtkTreeView *list_view)
 {
@@ -1195,6 +1210,8 @@
 
 	selector = gtk_tree_view_get_selection(list_view);
 	gtk_tree_selection_set_mode(selector, GTK_SELECTION_BROWSE);
+	g_signal_connect(G_OBJECT(selector), "changed",
+			 G_CALLBACK(prefs_template_row_selected), list_view);
 
 	/* create the columns */
 	prefs_template_create_list_view_columns(GTK_WIDGET(list_view));

Index: prefs_wrapping.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_wrapping.c,v
retrieving revision 1.1.2.22
retrieving revision 1.1.2.22.2.1
diff -u -d -r1.1.2.22 -r1.1.2.22.2.1
--- prefs_wrapping.c	16 Feb 2011 07:16:14 -0000	1.1.2.22
+++ prefs_wrapping.c	29 Nov 2011 00:15:23 -0000	1.1.2.22.2.1
@@ -60,7 +60,7 @@
 	GtkWidget *vbox1;
 	GtkWidget *vbox2;
 	GtkWidget *label_linewrap;
-	GtkObject *spinbtn_linewrap_adj;
+	GtkAdjustment *spinbtn_linewrap_adj;
 	GtkWidget *spinbtn_linewrap;
 	GtkWidget *checkbtn_wrapquote;
 	GtkWidget *checkbtn_wrappastes;

Index: addrgather.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrgather.c,v
retrieving revision 1.5.10.33.2.1
retrieving revision 1.5.10.33.2.2
diff -u -d -r1.5.10.33.2.1 -r1.5.10.33.2.2
--- addrgather.c	7 Sep 2011 15:52:24 -0000	1.5.10.33.2.1
+++ addrgather.c	29 Nov 2011 00:15:19 -0000	1.5.10.33.2.2
@@ -128,7 +128,7 @@
 static gboolean addrgather_dlg_key_pressed(
 	GtkWidget *widget, GdkEventKey *event, gpointer data )
 {
-	if( event && event->keyval == GDK_Escape ) {
+	if( event && event->keyval == GDK_KEY_Escape ) {
 		addrgather_dlg.cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -324,11 +324,11 @@
 	GtkWidget *hboxs;
 	GtkWidget *spinbtnFolder;
 	GtkObject *adjFolder;
+	CLAWS_TIP_DECL();
 #endif
 	GtkWidget *checkRecurse;
 	gint top;
 	gint i;
-	CLAWS_TIP_DECL();
 #ifdef USE_NEW_ADDRBOOK
 	GError* error = NULL;
 	GSList *books, *cur;
@@ -453,7 +453,9 @@
 	GtkWidget *clistCount;
 	gchar *titles[ FIELDS_N_COLS ];
 	gint i;
-
+#ifndef USE_NEW_ADDRBOOK
+	CLAWS_TIP_DECL();
+#endif
 	titles[ FIELD_COL_HEADER ] = _("Header Name");
 	titles[ FIELD_COL_COUNT  ] = _("Address Count");
 

Index: editldap.c
===================================================================
RCS file: /home/claws-mail/claws/src/editldap.c,v
retrieving revision 1.8.2.40
retrieving revision 1.8.2.40.2.1
diff -u -d -r1.8.2.40 -r1.8.2.40.2.1
--- editldap.c	16 Feb 2011 07:15:57 -0000	1.8.2.40
+++ editldap.c	29 Nov 2011 00:15:20 -0000	1.8.2.40.2.1
@@ -206,7 +206,7 @@
 }
 
 static gboolean edit_ldap_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -396,7 +396,7 @@
 	GtkWidget *entry_name;
 	GtkWidget *entry_server;
 	GtkWidget *hbox_spin;
-	GtkObject *spinbtn_port_adj;
+	GtkAdjustment *spinbtn_port_adj;
 	GtkWidget *spinbtn_port;
 #ifdef USE_LDAP_TLS
 	GtkWidget *enable_ssl_checkbtn, *enable_tls_checkbtn;
@@ -404,7 +404,6 @@
 	GtkWidget *entry_baseDN;
 	GtkWidget *check_btn;
 	GtkWidget *lookdn_btn;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	vbox = gtk_vbox_new( FALSE, 8 );
@@ -550,12 +549,11 @@
 	GtkWidget *label;
 	GtkWidget *entry_criteria;
 	GtkWidget *hbox_spin;
-	GtkObject *spinbtn_queryage_adj;
+	GtkAdjustment *spinbtn_queryage_adj;
 	GtkWidget *spinbtn_queryage;
 	GtkWidget *check_dynsearch;
 	GtkWidget *check_matchoption;
 	GtkWidget *reset_btn;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	vbox = gtk_vbox_new( FALSE, 8 );
@@ -675,11 +673,10 @@
 	GtkWidget *entry_bindDN;
 	GtkWidget *entry_bindPW;
 	GtkWidget *hbox_spin;
-	GtkObject *spinbtn_timeout_adj;
+	GtkAdjustment *spinbtn_timeout_adj;
 	GtkWidget *spinbtn_timeout;
-	GtkObject *spinbtn_maxentry_adj;
+	GtkAdjustment *spinbtn_maxentry_adj;
 	GtkWidget *spinbtn_maxentry;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	vbox = gtk_vbox_new( FALSE, 8 );

Index: exphtmldlg.c
===================================================================
RCS file: /home/claws-mail/claws/src/exphtmldlg.c,v
retrieving revision 1.3.2.28
retrieving revision 1.3.2.28.2.1
diff -u -d -r1.3.2.28 -r1.3.2.28.2.1
--- exphtmldlg.c	16 Feb 2011 07:15:58 -0000	1.3.2.28
+++ exphtmldlg.c	29 Nov 2011 00:15:20 -0000	1.3.2.28.2.1
@@ -146,7 +146,7 @@
  * \param data   User data.
  */
 static gboolean export_html_key_pressed( GtkWidget *widget, GdkEventKey *event, gpointer data ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		export_html_cancel( widget, data );
 	}
 	return FALSE;

Index: prefs_common.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.c,v
retrieving revision 1.204.2.202.2.1
retrieving revision 1.204.2.202.2.2
diff -u -d -r1.204.2.202.2.1 -r1.204.2.202.2.2
--- prefs_common.c	7 Sep 2011 15:52:27 -0000	1.204.2.202.2.1
+++ prefs_common.c	29 Nov 2011 00:15:22 -0000	1.204.2.202.2.2
@@ -446,7 +446,7 @@
 	 NULL, NULL, NULL},
 	{"thread_by_subject", "TRUE", &prefs_common.thread_by_subject, P_BOOL,
 	 NULL, NULL, NULL},
-	{"date_format", N_("%y/%m/%d(%a) %H:%M"), &prefs_common.date_format,
+	{"date_format", N_("%x(%a) %H:%M"), &prefs_common.date_format,
 	 P_STRING, NULL, NULL, NULL},
 	{"msgview_date_format", "FALSE", &prefs_common.msgview_date_format, P_BOOL,
 	 NULL, NULL, NULL},
@@ -654,6 +654,8 @@
 	 NULL, NULL, NULL},
 	{"messagewin_height", "540", &prefs_common.msgwin_height, P_INT,
 	 NULL, NULL, NULL},
+	{"mimeview_tree_height", "60", &prefs_common.mimeview_tree_height, P_INT,
+	 NULL, NULL, NULL},	 
 	{"sourcewin_width", "600", &prefs_common.sourcewin_width, P_INT,
 	 NULL, NULL, NULL},
 	{"sourcewin_height", "500", &prefs_common.sourcewin_height, P_INT,
@@ -680,6 +682,8 @@
 	{"compose_height", "470", &prefs_common.compose_height, P_INT,
 	 NULL, NULL, NULL},
 #endif
+	{"compose_notebook_height", "130", &prefs_common.compose_notebook_height, P_INT,
+	 NULL, NULL, NULL},
 	{"compose_x", "0", &prefs_common.compose_x, P_INT,
 	 NULL, NULL, NULL},
 	{"compose_y", "0", &prefs_common.compose_y, P_INT,
@@ -742,6 +746,8 @@
 	 NULL, NULL, NULL},
 	{"respect_flowed_format", "FALSE", &prefs_common.respect_flowed_format, P_BOOL,
 	 NULL, NULL, NULL},
+	{"show_all_headers", "FALSE", &prefs_common.show_all_headers, P_BOOL,
+	 NULL, NULL, NULL},
 
 	{"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL,
 	 NULL, NULL, NULL},
@@ -1066,8 +1072,6 @@
 	 NULL, NULL, NULL},
 	{"stripes_color_offset", "4000", &prefs_common.stripes_color_offset, P_INT,
 	 NULL, NULL, NULL},
-	{"enable_dotted_lines", "FALSE", &prefs_common.enable_dotted_lines, P_BOOL,
-	 NULL, NULL, NULL},
 	{"enable_hscrollbar", "TRUE", &prefs_common.enable_hscrollbar, P_BOOL,
 	 NULL, NULL, NULL},
 	{"folderview_vscrollbar_policy", "0",

Index: expldifdlg.c
===================================================================
RCS file: /home/claws-mail/claws/src/expldifdlg.c,v
retrieving revision 1.1.4.33
retrieving revision 1.1.4.33.2.1
diff -u -d -r1.1.4.33 -r1.1.4.33.2.1
--- expldifdlg.c	16 Feb 2011 07:15:58 -0000	1.1.4.33
+++ expldifdlg.c	29 Nov 2011 00:15:20 -0000	1.1.4.33.2.1
@@ -148,7 +148,7 @@
  * \param data   User data.
  */
 static gboolean export_ldif_key_pressed( GtkWidget *widget, GdkEventKey *event, gpointer data ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		export_ldif_cancel( widget, data );
 	}
 	return FALSE;
@@ -463,7 +463,6 @@
 	GtkWidget *checkEMail;
 	GtkListStore *store;
 	GtkTreeIter iter;
-	CLAWS_TIP_DECL();
 	gint top;
 
 	vbox = gtk_vbox_new(FALSE, 8);

Index: prefs_common.h
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_common.h,v
retrieving revision 1.103.2.133
retrieving revision 1.103.2.133.2.1
diff -u -d -r1.103.2.133 -r1.103.2.133.2.1
--- prefs_common.h	28 Aug 2011 16:14:39 -0000	1.103.2.133
+++ prefs_common.h	29 Nov 2011 00:15:22 -0000	1.103.2.133.2.1
@@ -227,7 +227,6 @@
 	gboolean use_stripes_everywhere;
 	gboolean use_stripes_in_summaries; /* overrides if use_stripes_everywhere is set to TRUE */
 	gint stripes_color_offset;
-	gboolean enable_dotted_lines;
 	gboolean enable_hscrollbar;
 	gboolean bold_unread;
 	gboolean enable_thread;
@@ -293,11 +292,14 @@
 	gint msgwin_width;
 	gint msgwin_height;
 
+	gint mimeview_tree_height;
+	
 	gint sourcewin_width;
 	gint sourcewin_height;
 
 	gint compose_width;
 	gint compose_height;
+	gint compose_notebook_height;
 	gint compose_x;
 	gint compose_y;
 
@@ -328,6 +330,7 @@
 	gboolean scroll_halfpage;
 	gboolean hide_quoted;
 	gboolean respect_flowed_format;
+	gboolean show_all_headers;
 
 	gboolean show_other_header;
 	GSList *disphdr_list;

Index: alertpanel.c
===================================================================
RCS file: /home/claws-mail/claws/src/alertpanel.c,v
retrieving revision 1.17.2.43
retrieving revision 1.17.2.43.2.1
diff -u -d -r1.17.2.43 -r1.17.2.43.2.1
--- alertpanel.c	16 Feb 2011 07:15:56 -0000	1.17.2.43
+++ alertpanel.c	29 Nov 2011 00:15:19 -0000	1.17.2.43.2.1
@@ -204,6 +204,7 @@
 {
 	gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
 	manage_window_set_transient(GTK_WINDOW(dialog));
+	gtk_widget_show_all(dialog);
 	value = G_ALERTWAIT;
 
 	if (gdk_pointer_is_grabbed())
@@ -268,7 +269,7 @@
 	/* for title icon, label and message */
 	hbox = gtk_hbox_new(FALSE, 12);
 	gtk_container_set_border_width(GTK_CONTAINER(hbox), 12);
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(dialog))),
 			   hbox, FALSE, FALSE, 0);
 
 	/* title icon */
@@ -308,7 +309,7 @@
 		gint size;
 
 		size = pango_font_description_get_size
-			(label->style->font_desc);
+			(gtk_widget_get_style(label)->font_desc);
 		font_desc = pango_font_description_new();
 		pango_font_description_set_weight
 			(font_desc, PANGO_WEIGHT_BOLD);
@@ -337,7 +338,8 @@
 
 	if (can_disable) {
 		hbox = gtk_hbox_new(FALSE, 0);
-		gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox), hbox,
+		gtk_box_pack_start(GTK_BOX(
+			gtk_dialog_get_content_area(GTK_DIALOG(dialog))), hbox,
 				   FALSE, FALSE, 0);
 
 		disable_checkbtn = gtk_check_button_new_with_label
@@ -364,7 +366,7 @@
 				      button2_label ? &button2 : NULL, label2,
 				      button3_label ? &button3 : NULL, label3);
 
-	gtk_box_pack_end(GTK_BOX(GTK_DIALOG(dialog)->action_area),
+	gtk_box_pack_end(GTK_BOX(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
 			 confirm_area, FALSE, FALSE, 0);
 	gtk_container_set_border_width(GTK_CONTAINER(confirm_area), 5);
 	gtk_widget_grab_default(button1);
@@ -420,7 +422,7 @@
 				 gpointer data)
 {
 	if (event->type == GDK_KEY_PRESS)
-		if (((GdkEventKey *)event)->keyval != GDK_Escape)
+		if (((GdkEventKey *)event)->keyval != GDK_KEY_Escape)
 			return FALSE;
 
 	value = (value & ~G_ALERT_VALUE_MASK) | (AlertValue)data;

Index: editbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/editbook.c,v
retrieving revision 1.5.12.16
retrieving revision 1.5.12.16.2.1
diff -u -d -r1.5.12.16 -r1.5.12.16.2.1
--- editbook.c	16 Feb 2011 07:15:57 -0000	1.5.12.16
+++ editbook.c	29 Nov 2011 00:15:20 -0000	1.5.12.16.2.1
@@ -91,7 +91,7 @@
 }
 
 static gboolean edit_book_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: prefs_summary_column.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_summary_column.c,v
retrieving revision 1.10.2.27
retrieving revision 1.10.2.27.2.1
diff -u -d -r1.10.2.27 -r1.10.2.27.2.1
--- prefs_summary_column.c	16 Feb 2011 07:16:14 -0000	1.10.2.27
+++ prefs_summary_column.c	29 Nov 2011 00:15:22 -0000	1.10.2.27.2.1
@@ -671,7 +671,7 @@
 						 GdkEventKey *event,
 						 gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		summary_col.finished = TRUE;
 	return FALSE;
 }
@@ -806,7 +806,8 @@
 			   -1);
 
 	/* send the type */
-	gtk_selection_data_set(data, data->target, 8, (gchar *) &type, sizeof type);
+	gtk_selection_data_set(data, gtk_selection_data_get_target(data), 8,
+		(gchar *) &type, sizeof type);
 }
 
 static void drag_data_received(GtkTreeView *tree_view, GdkDragContext *context,
@@ -876,7 +877,7 @@
 		gtk_tree_selection_get_selected(gtk_tree_view_get_selection(
 						GTK_TREE_VIEW(source)),
 						&sel_model, &isel);
-		type = *((gint *) data->data);
+		type = *((gint *) gtk_selection_data_get_data(data));
 		name = gettext(col_name[type]);
 		gtk_list_store_remove(GTK_LIST_STORE(sel_model), &isel);
 

Index: addrcustomattr.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addrcustomattr.c,v
retrieving revision 1.1.2.9
retrieving revision 1.1.2.9.2.1
diff -u -d -r1.1.2.9 -r1.1.2.9.2.1
--- addrcustomattr.c	16 Feb 2011 07:15:55 -0000	1.1.2.9
+++ addrcustomattr.c	29 Nov 2011 00:15:19 -0000	1.1.2.9.2.1
@@ -433,9 +433,9 @@
 static gboolean custom_attr_window_key_pressed(GtkWidget *widget,
 											   GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		custom_attr_window_close();
-	else if (event && event->keyval == GDK_Delete)
+	else if (event && event->keyval == GDK_KEY_Delete)
 		custom_attr_popup_delete(NULL, NULL);
 	return FALSE;
 }
@@ -443,7 +443,7 @@
 static gboolean custom_attr_window_add_key_pressed(GtkWidget *widget,
 												   GdkEventKey *event, gpointer data)
 {
-	if (event && (event->keyval == GDK_KP_Enter || event->keyval == GDK_Return)) {
+	if (event && (event->keyval == GDK_KEY_KP_Enter || event->keyval == GDK_KEY_Return)) {
 		custom_attr_window_add_attr();
 		gtk_entry_set_text(GTK_ENTRY(custom_attr_window.add_entry), "");
 		gtk_widget_grab_focus(custom_attr_window.attr_list);

Index: folder.c
===================================================================
RCS file: /home/claws-mail/claws/src/folder.c,v
retrieving revision 1.213.2.202
retrieving revision 1.213.2.202.2.1
diff -u -d -r1.213.2.202 -r1.213.2.202.2.1
--- folder.c	10 Apr 2011 08:07:06 -0000	1.213.2.202
+++ folder.c	29 Nov 2011 00:15:20 -0000	1.213.2.202.2.1
@@ -398,7 +398,7 @@
 {
 	GNode *node, *start_node;
 	FolderUpdateData hookdata;
-	gchar *tags_file = NULL;
+	gchar *tags_file = NULL, *tags_dir = NULL;
 
 	cm_return_if_fail(item != NULL);
 	cm_return_if_fail(item->folder != NULL);
@@ -428,7 +428,12 @@
 	tags_file = folder_item_get_tags_file(item);
 	if (tags_file)
 		claws_unlink(tags_file);
+	tags_dir = g_path_get_dirname(tags_file);
+	if (tags_dir)
+		rmdir(tags_dir);
+
 	g_free(tags_file);
+	g_free(tags_dir);
 
 	hookdata.folder = item->folder;
 	hookdata.update_flags = FOLDER_TREE_CHANGED | FOLDER_REMOVE_FOLDERITEM;
@@ -572,6 +577,8 @@
 			item->hide_read_msgs =  *attr->value == '1' ? TRUE : FALSE;
 		else if (!strcmp(attr->name, "hidedelmsgs"))
 			item->hide_del_msgs =  *attr->value == '1' ? TRUE : FALSE;
+		else if (!strcmp(attr->name, "hidereadthreads"))
+			item->hide_read_threads =  *attr->value == '1' ? TRUE : FALSE;
 		else if (!strcmp(attr->name, "reqretrcpt"))
 			item->ret_rcpt =  *attr->value == '1' ? TRUE : FALSE;
 		else if (!strcmp(attr->name, "sort_key")) {
@@ -656,6 +663,7 @@
 	xml_tag_add_attr(tag, xml_attr_new("threaded", item->threaded ? "1" : "0"));
 	xml_tag_add_attr(tag, xml_attr_new("hidereadmsgs", item->hide_read_msgs ? "1" : "0"));
 	xml_tag_add_attr(tag, xml_attr_new("hidedelmsgs", item->hide_del_msgs ? "1" : "0"));
+	xml_tag_add_attr(tag, xml_attr_new("hidereadthreads", item->hide_read_threads ? "1" : "0"));
 	if (item->ret_rcpt)
 		xml_tag_add_attr(tag, xml_attr_new("reqretrcpt", "1"));
 
@@ -3278,6 +3286,7 @@
 	new_item->ret_rcpt  = src->ret_rcpt;
 	new_item->hide_read_msgs = src->hide_read_msgs;
 	new_item->hide_del_msgs = src->hide_del_msgs;
+	new_item->hide_read_threads = src->hide_read_threads;
 	new_item->sort_key  = src->sort_key;
 	new_item->sort_type = src->sort_type;
 
@@ -4350,6 +4359,7 @@
 	item->ret_rcpt  = pp->ret_rcpt;
 	item->hide_read_msgs = pp->hide_read_msgs;
 	item->hide_del_msgs = pp->hide_del_msgs;
+	item->hide_read_threads = pp->hide_read_threads;
 	item->sort_key  = pp->sort_key;
 	item->sort_type = pp->sort_type;
 }
@@ -4376,6 +4386,7 @@
 		pp->ret_rcpt  = item->ret_rcpt;	
 		pp->hide_read_msgs = item->hide_read_msgs;
 		pp->hide_del_msgs = item->hide_del_msgs;
+		pp->hide_read_threads = item->hide_read_threads;
 		pp->sort_key  = item->sort_key;
 		pp->sort_type = item->sort_type;
 		g_hash_table_insert(pptable, id, pp);

Index: foldersel.c
===================================================================
RCS file: /home/claws-mail/claws/src/foldersel.c,v
retrieving revision 1.26.2.46
retrieving revision 1.26.2.46.2.1
diff -u -d -r1.26.2.46 -r1.26.2.46.2.1
--- foldersel.c	16 Feb 2011 07:15:59 -0000	1.26.2.46
+++ foldersel.c	29 Nov 2011 00:15:20 -0000	1.26.2.46.2.1
@@ -261,8 +261,7 @@
 	gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(treeview), FALSE);
 	gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview),
 	                             prefs_common.use_stripes_everywhere);
-	gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(treeview),
-							prefs_common.enable_dotted_lines);
+	gtk_tree_view_set_enable_tree_lines(GTK_TREE_VIEW(treeview), FALSE);
 	gtk_tree_view_set_search_column(GTK_TREE_VIEW(treeview),
 					FOLDERSEL_FOLDERNAME);
 
@@ -619,7 +618,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		foldersel_cancel(NULL, NULL);
 	return FALSE;
 }

Index: prefs_send.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_send.c,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.28.2.1
diff -u -d -r1.1.2.28 -r1.1.2.28.2.1
--- prefs_send.c	16 Feb 2011 07:16:14 -0000	1.1.2.28
+++ prefs_send.c	29 Nov 2011 00:15:22 -0000	1.1.2.28.2.1
@@ -145,7 +145,6 @@
 	GtkWidget *checkbtn_confirm_send_queued_messages;
 	GtkWidget *checkbtn_never_send_retrcpt;
 	GtkWidget *table;
-	CLAWS_TIP_DECL();
 
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);

Index: folder.h
===================================================================
RCS file: /home/claws-mail/claws/src/folder.h,v
retrieving revision 1.87.2.64
retrieving revision 1.87.2.64.2.1
diff -u -d -r1.87.2.64 -r1.87.2.64.2.1
--- folder.h	8 Apr 2011 16:55:52 -0000	1.87.2.64
+++ folder.h	29 Nov 2011 00:15:20 -0000	1.87.2.64.2.1
@@ -672,6 +672,7 @@
 	guint ret_rcpt       : 1; /* return receipt       */
 	guint search_match   : 1;
 	guint hide_del_msgs : 1; /* hide deleted messages   */
+	guint hide_read_threads : 1; /* hide threads with only read messages   */
 
 	gint op_count;
 	guint opened         : 1; /* opened by summary view */
@@ -711,6 +712,7 @@
 	guint		hide_read_msgs	: 1; /* CLAWS */
 	guint		ret_rcpt	: 1; /* CLAWS */
 	guint		hide_del_msgs	: 1; /* CLAWS */
+	guint		hide_read_threads	: 1;
 };
 
 struct _FolderUpdateData

Index: addrduplicates.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addrduplicates.c,v
retrieving revision 1.1.2.17
retrieving revision 1.1.2.17.2.1
diff -u -d -r1.1.2.17 -r1.1.2.17.2.1
--- addrduplicates.c	16 Feb 2011 07:15:55 -0000	1.1.2.17
+++ addrduplicates.c	29 Nov 2011 00:15:19 -0000	1.1.2.17.2.1
@@ -885,9 +885,9 @@
         gpointer data)
 {
 	if(event) {
-		if(event->keyval == GDK_Delete && detail_view_has_focus)
+		if(event->keyval == GDK_KEY_Delete && detail_view_has_focus)
 			cb_del_btn_clicked(NULL,NULL);
-		else if(event->keyval == GDK_Escape)
+		else if(event->keyval == GDK_KEY_Escape)
 			gtk_widget_destroy(dialog);
 	}
 

Index: exportldif.c
===================================================================
RCS file: /home/claws-mail/claws/src/exportldif.c,v
retrieving revision 1.1.4.22
retrieving revision 1.1.4.22.2.1
diff -u -d -r1.1.4.22 -r1.1.4.22.2.1
--- exportldif.c	16 Feb 2011 07:15:58 -0000	1.1.4.22
+++ exportldif.c	29 Nov 2011 00:15:20 -0000	1.1.4.22.2.1
@@ -231,23 +231,23 @@
 	if( attr ) {
 		if( value ) {
 			if( strlen( value ) > 0 ) {
-				strcat( buf, attr );
-				strcat( buf, "=" );
+				strncat( buf, attr, FMT_BUFSIZE );
+				strncat( buf, "=", FMT_BUFSIZE );
 				if( dupval ) {
 					/* Format and free duplicated value */
-					strcat( buf, dupval );
+					strncat( buf, dupval, FMT_BUFSIZE );
 					g_free( dupval );
 				}
 				else {
 					/* Use original value */
-					strcat( buf, value );
+					strncat( buf, value, FMT_BUFSIZE );
 				}
 
 				/* Append suffix */
 				if( ctl->suffix ) {
 					if( strlen( ctl->suffix ) > 0 ) {
-						strcat( buf, "," );
-						strcat( buf, ctl->suffix );
+						strncat( buf, ",", FMT_BUFSIZE );
+						strncat( buf, ctl->suffix, FMT_BUFSIZE );
 					}
 				}
 

Index: image_viewer.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/image_viewer.c,v
retrieving revision 1.1.2.30
retrieving revision 1.1.2.30.2.1
diff -u -d -r1.1.2.30 -r1.1.2.30.2.1
--- image_viewer.c	29 Aug 2011 08:12:10 -0000	1.1.2.30
+++ image_viewer.c	29 Nov 2011 00:15:21 -0000	1.1.2.30.2.1
@@ -69,6 +69,7 @@
 
 static void image_viewer_load_file(ImageViewer *imageviewer, const gchar *imgfile)
 {
+	GtkAllocation allocation;
 	GdkPixbufAnimation *animation = NULL;
 	GdkPixbuf *pixbuf = NULL;
 	GError *error = NULL;
@@ -83,10 +84,13 @@
 		g_object_unref(animation);
 		animation = NULL;
 
-		if (imageviewer->resize_img)
+		if (imageviewer->resize_img) {
+			gtk_widget_get_allocation(
+				gtk_widget_get_parent(imageviewer->notebook), &allocation);
 			pixbuf = claws_load_pixbuf_fitting(pixbuf,
-				imageviewer->notebook->parent->allocation.width,
-				imageviewer->notebook->parent->allocation.height);
+				allocation.width,
+				allocation.height);
+		}
 		else
 			pixbuf = claws_load_pixbuf_fitting(pixbuf, -1, -1);
 	}

Index: prefs_message.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_message.c,v
retrieving revision 1.1.2.33
retrieving revision 1.1.2.33.2.1
diff -u -d -r1.1.2.33 -r1.1.2.33.2.1
--- prefs_message.c	16 Feb 2011 07:16:13 -0000	1.1.2.33
+++ prefs_message.c	29 Nov 2011 00:15:22 -0000	1.1.2.33.2.1
@@ -91,7 +91,7 @@
 	GtkWidget *checkbtn_promote_html_part;
 	GtkWidget *hbox_linespc;
 	GtkWidget *label_linespc;
-	GtkObject *spinbtn_linespc_adj;
+	GtkAdjustment *spinbtn_linespc_adj;
 	GtkWidget *spinbtn_linespc;
 
 	GtkWidget *frame;
@@ -99,7 +99,7 @@
 	GtkWidget *checkbtn_smoothscroll;
 	GtkWidget *hbox_scr;
 	GtkWidget *label_scr;
-	GtkObject *spinbtn_scrollstep_adj;
+	GtkAdjustment *spinbtn_scrollstep_adj;
 	GtkWidget *spinbtn_scrollstep;
 	GtkWidget *checkbtn_halfpage;
 	GtkWidget *checkbtn_hide_quoted;

Index: addrbook.h
===================================================================
RCS file: /home/claws-mail/claws/src/addrbook.h,v
retrieving revision 1.7.2.4
retrieving revision 1.7.2.4.10.1
diff -u -d -r1.7.2.4 -r1.7.2.4.10.1
--- addrbook.h	11 Jul 2007 16:32:46 -0000	1.7.2.4
+++ addrbook.h	29 Nov 2011 00:15:19 -0000	1.7.2.4.10.1
@@ -104,5 +104,6 @@
 					  const gchar *remarks );
 
 gchar *addrbook_guess_next_file		( AddressBookFile *book );
+void addrbook_delete_book_file		( AddressBookFile *book );
 
 #endif /* __ADDRBOOK_H__ */

Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.170
retrieving revision 1.83.2.170.2.1
diff -u -d -r1.83.2.170 -r1.83.2.170.2.1
--- mimeview.c	12 Aug 2011 13:57:41 -0000	1.83.2.170
+++ mimeview.c	29 Nov 2011 00:15:21 -0000	1.83.2.170.2.1
@@ -68,17 +68,15 @@
 {
 	COL_MIMETYPE = 0,
 	COL_SIZE     = 1,
-	COL_NAME     = 2
+	COL_NAME     = 2,
+	COL_DATA     = 3,
 } MimeViewColumnPos;
 
-#define N_MIMEVIEW_COLS	3
+#define N_MIMEVIEW_COLS	4
 
[...1104 lines suppressed...]
 		gtk_widget_hide(mimeview->ctree_mainbox);
 		gtk_widget_show(mimeview->icon_mainbox);
 		gtk_paned_set_position(GTK_PANED(mimeview->paned), 0);
@@ -2564,12 +2727,11 @@
 					button);
 		gtk_box_pack_start(GTK_BOX(mimeview->icon_mainbox), 
 				   button, FALSE, FALSE, 0);
-		gtk_box_reorder_child(GTK_BOX(button->parent), button, 0);
+		gtk_box_reorder_child(GTK_BOX(gtk_widget_get_parent(button)), button, 0);
 		if (mimeview->opened)
-			icon_list_toggle_by_mime_info
-				(mimeview, gtk_cmctree_node_get_row_data(GTK_CMCTREE(mimeview->ctree), 
-								       mimeview->opened));
-
+			icon_list_toggle_by_mime_info(mimeview,
+					mimeview_get_node_part(mimeview, mimeview->opened));
+		summary_grab_focus(mimeview->mainwin->summaryview);
 	}
 	g_object_unref(button);
 	return TRUE;

Index: addressadd.c
===================================================================
RCS file: /home/claws-mail/claws/src/addressadd.c,v
retrieving revision 1.9.2.32.2.1
retrieving revision 1.9.2.32.2.2
diff -u -d -r1.9.2.32.2.1 -r1.9.2.32.2.2
--- addressadd.c	7 Sep 2011 15:52:24 -0000	1.9.2.32.2.1
+++ addressadd.c	29 Nov 2011 00:15:19 -0000	1.9.2.32.2.2
@@ -113,7 +113,7 @@
 }
 
 static gboolean addressadd_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		addressadd_cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -258,15 +258,9 @@
 	tree_folder = gtk_sctree_new_with_titles( 1, 0, titles );
 	gtk_container_add( GTK_CONTAINER(tree_win), tree_folder );
 	gtk_cmclist_column_titles_show( GTK_CMCLIST(tree_folder) );
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
+	gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
 				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
 	gtk_sctree_set_stripes(GTK_SCTREE(tree_folder), prefs_common.use_stripes_everywhere);
 	gtk_cmclist_set_selection_mode( GTK_CMCLIST(tree_folder), GTK_SELECTION_BROWSE );
 	gtk_cmctree_set_indent( GTK_CMCTREE(tree_folder), CTREE_INDENT );

Index: importmutt.c
===================================================================
RCS file: /home/claws-mail/claws/src/importmutt.c,v
retrieving revision 1.4.12.22
retrieving revision 1.4.12.22.2.1
diff -u -d -r1.4.12.22 -r1.4.12.22.2.1
--- importmutt.c	16 Feb 2011 07:16:03 -0000	1.4.12.22
+++ importmutt.c	29 Nov 2011 00:15:21 -0000	1.4.12.22.2.1
@@ -175,7 +175,7 @@
 }
 
 static gboolean imp_mutt_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: mimeview.h
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.h,v
retrieving revision 1.20.2.32
retrieving revision 1.20.2.32.2.1
diff -u -d -r1.20.2.32 -r1.20.2.32.2.1
--- mimeview.h	4 Mar 2011 15:50:15 -0000	1.20.2.32
+++ mimeview.h	29 Nov 2011 00:15:21 -0000	1.20.2.32.2.1
@@ -27,7 +27,6 @@
 #include <glib.h>
 #include <gdk/gdk.h>
 #include <gtk/gtk.h>
-#include "gtk/gtksctree.h"
 #ifdef USE_PTHREAD
 #include <pthread.h>
 #endif
@@ -77,7 +76,7 @@
 
 	GtkWidget *popupmenu;
 
-	GtkCMCTreeNode *opened;
+	GtkTreePath *opened;
 
 	TextView *textview;
 	MimeViewer *mimeviewer;
@@ -97,7 +96,6 @@
 #if !GTK_CHECK_VERSION(2,12,0)
 	GtkTooltips *tooltips;
 #endif
-	gint oldsize;
 
 	NoticeView *siginfoview;
 	MimeInfo *siginfo;
@@ -157,7 +155,7 @@
 
 MimeInfo *mimeview_get_selected_part	(MimeView	*mimeview);
 
-void mimeview_pass_key_press_event	(MimeView	*mimeview,
+gboolean mimeview_pass_key_press_event	(MimeView	*mimeview,
 					 GdkEventKey	*event);
 
 void mimeview_register_viewer_factory	(MimeViewerFactory *factory);
@@ -178,6 +176,7 @@
 gboolean mimeview_has_viewer_for_content_type
 					(MimeView	*mimeview,
 					 const gchar	*content_type);
+gboolean mimeview_tree_is_empty		(MimeView 	*mimeview);
 
 #ifdef __cplusplus
 }

Index: sourcewindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/sourcewindow.c,v
retrieving revision 1.9.2.26
retrieving revision 1.9.2.26.2.1
diff -u -d -r1.9.2.26 -r1.9.2.26.2.1
--- sourcewindow.c	16 Feb 2011 07:16:16 -0000	1.9.2.26
+++ sourcewindow.c	29 Nov 2011 00:15:23 -0000	1.9.2.26.2.1
@@ -206,17 +206,17 @@
 	if (!event || !sourcewin) return FALSE;
 	
 	switch (event->keyval) {
-	case GDK_A:
-	case GDK_a:
+	case GDK_KEY_A:
+	case GDK_KEY_a:
 		if ((event->state & GDK_CONTROL_MASK) != 0)
 			gtk_editable_select_region(GTK_EDITABLE(sourcewin->text), 0, -1);
 		break;
-	case GDK_W:
-	case GDK_w:
+	case GDK_KEY_W:
+	case GDK_KEY_w:
 		if ((event->state & GDK_CONTROL_MASK) != 0)
 			gtk_widget_destroy(sourcewin->window);
 		break;
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		source_window_destroy(sourcewin);
 		return TRUE;
 		break;

Index: addressbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addressbook.c,v
retrieving revision 1.60.2.143
retrieving revision 1.60.2.143.2.1
diff -u -d -r1.60.2.143 -r1.60.2.143.2.1
--- addressbook.c	10 Apr 2011 17:19:03 -0000	1.60.2.143
+++ addressbook.c	29 Nov 2011 00:15:19 -0000	1.60.2.143.2.1
@@ -694,9 +694,9 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		addressbook_close();
-	else if (event && event->keyval == GDK_Delete) {
+	else if (event && event->keyval == GDK_KEY_Delete) {
 		/* TODO: enable deletion when focus is in ctree (needs implementation in _del_clicked() */
 		if ( /* address_index_has_focus || */ address_list_has_focus )
 			addressbook_del_clicked(NULL, NULL);
@@ -1019,15 +1019,9 @@
 	gtk_container_add(GTK_CONTAINER(ctree_swin), ctree);
 	gtk_cmclist_set_selection_mode(GTK_CMCLIST(ctree), GTK_SELECTION_BROWSE);
 	gtk_cmclist_set_column_width(GTK_CMCLIST(ctree), 0, COL_FOLDER_WIDTH);
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 	gtk_sctree_set_stripes(GTK_SCTREE(ctree), prefs_common.use_stripes_in_summaries);
 	gtk_cmctree_set_indent(GTK_CMCTREE(ctree), CTREE_INDENT);
 	gtk_cmclist_set_compare_func(GTK_CMCLIST(ctree),
@@ -1074,15 +1068,9 @@
 	clist = gtk_sctree_new_with_titles(N_LIST_COLS, 0, list_titles);
 	gtk_container_add(GTK_CONTAINER(clist_swin), clist);
 	gtk_cmclist_set_selection_mode(GTK_CMCLIST(clist), GTK_SELECTION_EXTENDED);
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(clist), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(clist),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(clist), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(clist),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 	gtk_sctree_set_stripes(GTK_SCTREE(ctree), prefs_common.use_stripes_in_summaries);
 	gtk_cmctree_set_indent(GTK_CMCTREE(clist), CTREE_INDENT);
 	gtk_cmclist_set_column_width(GTK_CMCLIST(clist), COL_NAME,
@@ -2743,7 +2731,7 @@
 	gtk_cmctree_get_node_info(ctree, node, text, &spacing,
 				&pix_cl, &pix_op,
 				&is_leaf, &expanded);
-	gtk_sctree_set_node_info(ctree, node, name, spacing,
+	gtk_cmctree_set_node_info(ctree, node, name, spacing,
 				pix_cl, pix_op,
 				is_leaf, expanded);
 }
@@ -2960,7 +2948,11 @@
 	if( obj->type == ADDR_DATASOURCE ) {
 		/* Remove node from tree */
 		gtk_cmctree_remove_node( ctree, node );
-	
+		
+		if (delType == ADDRTREE_DEL_DATA &&
+		    ds->interface && ds->interface->type == ADDR_IF_BOOK)
+			addrbook_delete_book_file((AddressBookFile *) ds->rawDataSource);
+			
 		/* Remove data source. */
 		if( addrindex_index_remove_datasource( _addressIndex_, ds ) ) {
 			addrindex_free_datasource( ds );
@@ -4378,7 +4370,7 @@
 
 static gboolean addressbook_entry_key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter))
+	if (event && (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter))
 		addressbook_lup_clicked(NULL, NULL);
 	return FALSE;
 }
@@ -5618,11 +5610,11 @@
 	if (aio && aio->type == ADDR_ITEM_PERSON) {
 		if( ds && ds->interface && ds->interface->readOnly)
 			gtk_selection_data_set(selection_data,
-				       selection_data->target, 8,
+				       gtk_selection_data_get_target(selection_data), 8,
 				       (const guchar *)"Dummy_addr_copy", 15);
 		else
 			gtk_selection_data_set(selection_data,
-				       selection_data->target, 8,
+				       gtk_selection_data_get_target(selection_data), 8,
 				       (const guchar *)"Dummy_addr_move", 15);
 	} 
 }
@@ -5634,14 +5626,18 @@
 					  guint           time,
 					  void            *data)
 {
+	GtkAllocation allocation;
+	GtkRequisition requisition;
 	gint row, column;
 	GtkCMCTreeNode *node = NULL;
 	gboolean acceptable = FALSE;
-	gint height = addrbook.ctree->allocation.height;
-	gint total_height = addrbook.ctree->requisition.height;
+	gtk_widget_get_allocation(GTK_WIDGET(addrbook.ctree), &allocation);
+	gint height = allocation.height;
+	gtk_widget_get_requisition(GTK_WIDGET(addrbook.ctree), &requisition);
+	gint total_height = requisition.height;
 	GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
 				GTK_SCROLLED_WINDOW(addrbook.ctree_swin));
-	gfloat vpos = pos->value;
+	gfloat vpos = gtk_adjustment_get_value(pos);
 	
 	if (gtk_cmclist_get_selection_info
 		(GTK_CMCLIST(widget), x - 24, y - 24, &row, &column)) {
@@ -5683,7 +5679,7 @@
 			(G_OBJECT(widget),
 			 G_CALLBACK(addressbook_tree_selected), NULL);
 		gdk_drag_status(context, 
-					(context->actions == GDK_ACTION_COPY ?
+					(gdk_drag_context_get_actions(context) == GDK_ACTION_COPY ?
 					GDK_ACTION_COPY : GDK_ACTION_MOVE) , time);
 	} else {
 		gdk_drag_status(context, 0, time);
@@ -5721,7 +5717,7 @@
 	GtkCMCTreeNode *node;
 	GtkCMCTreeNode *lastopened = addrbook.opened;
 
-	if (!strncmp(data->data, "Dummy_addr", 10)) {
+	if (!strncmp(gtk_selection_data_get_data(data), "Dummy_addr", 10)) {
 		if (gtk_cmclist_get_selection_info
 			(GTK_CMCLIST(widget), x - 24, y - 24, &row, &column) == 0) {
 			return;
@@ -5732,8 +5728,8 @@
 			return;
 		
 		gtk_cmclist_freeze(GTK_CMCLIST(addrbook.clist));
-		if (drag_context->action == GDK_ACTION_COPY || 
-		    !strcmp(data->data, "Dummy_addr_copy"))
+		if (gdk_drag_context_get_selected_action(drag_context) == GDK_ACTION_COPY || 
+		    !strcmp(gtk_selection_data_get_data(data), "Dummy_addr_copy"))
 			addressbook_clip_copy_cb(NULL, NULL);
 		else
 			addressbook_clip_cut_cb(NULL, NULL);

Index: prefs_receive.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/prefs_receive.c,v
retrieving revision 1.1.2.28
retrieving revision 1.1.2.28.2.1
diff -u -d -r1.1.2.28 -r1.1.2.28.2.1
--- prefs_receive.c	16 Feb 2011 07:16:13 -0000	1.1.2.28
+++ prefs_receive.c	29 Nov 2011 00:15:22 -0000	1.1.2.28.2.1
@@ -100,7 +100,7 @@
 
 	GtkWidget *hbox_autochk;
 	GtkWidget *checkbtn_autochk;
-	GtkObject *spinbtn_autochk_adj;
+	GtkAdjustment *spinbtn_autochk_adj;
 	GtkWidget *spinbtn_autochk;
 	GtkWidget *label_autochk2;
 	GtkWidget *checkbtn_chkonstartup;

Index: filtering.h
===================================================================
RCS file: /home/claws-mail/claws/src/filtering.h,v
retrieving revision 1.21.2.19
retrieving revision 1.21.2.19.2.1
diff -u -d -r1.21.2.19 -r1.21.2.19.2.1
--- filtering.h	16 Feb 2011 07:15:58 -0000	1.21.2.19
+++ filtering.h	29 Nov 2011 00:15:20 -0000	1.21.2.19.2.1
@@ -106,4 +106,8 @@
 
 gboolean filtering_peek_per_account_rules(GSList *filtering_list);
 
+GSList *filtering_action_list_sort(GSList *action_list);
+gboolean filtering_action_list_rename_path(GSList *action_list, const gchar *old_path,
+					const gchar *new_path);
+
 #endif

Index: printing.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/printing.c,v
retrieving revision 1.1.2.31
retrieving revision 1.1.2.31.2.1
diff -u -d -r1.1.2.31 -r1.1.2.31.2.1
--- printing.c	16 Feb 2011 07:16:14 -0000	1.1.2.31
+++ printing.c	29 Nov 2011 00:15:23 -0000	1.1.2.31.2.1
@@ -91,7 +91,11 @@
 static void     cb_preview_size_allocate(GtkWidget*, GtkAllocation*);
 static void     cb_preview_ready(GtkPrintOperationPreview*,
 				 GtkPrintContext*, gpointer);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean cb_preview_expose(GtkWidget*, GdkEventExpose*, gpointer);
+#else
+static gboolean cb_preview_expose(GtkWidget*, cairo_t*, gpointer);
+#endif
 static void     cb_preview_got_page_size(GtkPrintOperationPreview*,
 					 GtkPrintContext*,
 					 GtkPageSetup*, gpointer);
@@ -189,7 +193,6 @@
 
 		read_from_file = FALSE;
 
-#if GTK_CHECK_VERSION(2,14,0)
 		/* try reading the page setup from file */
 		page_setup_filename = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, 
 						  PRINTING_PAGE_SETUP_STORAGE_FILE, NULL);
@@ -208,11 +211,6 @@
 		} else {
 			debug_print("Printing: Could not read page setup from key file\n");
 		}
-#else
-		key_file_read = FALSE;
-		keyfile = NULL;
-		page_setup_filename = NULL;
-#endif
 
 		/* if reading from file did not work, or has not been tried (GTK+ < 2.14), use prefs */
 		if (!read_from_file) {
@@ -278,11 +276,10 @@
 	/* Config for printing */
 	gtk_print_operation_set_print_settings(op, settings);
 	gtk_print_operation_set_default_page_setup(op, page_setup);
-#if GTK_CHECK_VERSION(2, 18, 0)
+#if GTK_CHECK_VERSION(2,18,0)
         /* enable Page Size and Orientation in the print dialog */
 	gtk_print_operation_set_embed_page_setup(op, TRUE);
 #endif
-
 	/* signals */
 	g_signal_connect(op, "begin_print", G_CALLBACK(renderer->cb_begin_print), print_data);
 	g_signal_connect(op, "draw_page", G_CALLBACK(renderer->cb_draw_page), print_data);
@@ -383,7 +380,6 @@
 	prefs_common.print_margin_right  = (int) (100*gtk_page_setup_get_right_margin(page_setup,
 								PAGE_MARGIN_STORAGE_UNIT));
 
-#if GTK_CHECK_VERSION(2,14,0)
 	/* save to file */
 	keyfile = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
 			      PRINTING_PAGE_SETUP_STORAGE_FILE, NULL);
@@ -391,7 +387,6 @@
 		debug_print("Printing: Could not store page setup in file `%s'\n", keyfile);
 	}
 	g_free(keyfile);
-#endif
 }
 
 static gboolean cb_preview(GtkPrintOperation        *operation,
@@ -412,7 +407,6 @@
 	static GdkGeometry geometry;
 	GtkWidget *dialog = NULL;
 	GtkWidget *statusbar = gtk_hbox_new(2, FALSE);
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating internal print preview\n");
 
@@ -537,7 +531,7 @@
 	preview_data->area = da;
 
 	/* cairo context */
-	cr = gdk_cairo_create(da->window);
+	cr = gdk_cairo_create(gtk_widget_get_window(da));
 	gtk_print_context_set_cairo_context(context, cr, PREVIEW_SCALE, PREVIEW_SCALE);
 	cairo_destroy(cr);
 
@@ -581,7 +575,7 @@
 {
 	PreviewData *preview_data = (PreviewData *)data;
 	if (event->type == GDK_KEY_PRESS)
- 		 if (((GdkEventKey *)event)->keyval != GDK_Escape)
+ 		 if (((GdkEventKey *)event)->keyval != GDK_KEY_Escape)
     			return FALSE;
 	if (preview_data->rendering)
 		return FALSE; 
@@ -620,9 +614,15 @@
 	preview_data->current_page = preview_data->pages_to_print;
 	preview_data->context = context;
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	g_signal_connect(preview_data->area, "expose_event",
 			 G_CALLBACK(cb_preview_expose),
 			 preview_data);
+#else
+	g_signal_connect(preview_data->area, "draw",
+			 G_CALLBACK(cb_preview_expose),
+			 preview_data);
+#endif
 
 	gtk_widget_queue_draw(preview_data->area);
 }
@@ -655,19 +655,32 @@
 				    paper_width, paper_height);
 }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static gboolean cb_preview_expose(GtkWidget *widget, GdkEventExpose *event,
 				  gpointer data)
+#else
+static gboolean cb_preview_expose(GtkWidget *widget, cairo_t *event,
+				  gpointer data)
+#endif
 {
 	PreviewData *preview_data = data;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_t *cr;
+#endif
 
 	debug_print("preview_expose (current %p)\n", preview_data->current_page);
 
-	cr = gdk_cairo_create(preview_data->area->window);
+#if !GTK_CHECK_VERSION(3, 0, 0)
+	cr = gdk_cairo_create(gtk_widget_get_window(preview_data->area));
+#endif
 
 	/* background */
 	cairo_set_source_rgb(cr, 0.5, 0.5, 0.5);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_rectangle(cr, event->area.x, event->area.y, event->area.width, event->area.height);
+#else
+	cairo_rectangle(cr, 0, 0, event->area.width, event->area.height);
+#endif
 	cairo_fill(cr);
 
 	/* shadow */
@@ -685,7 +698,9 @@
 	cairo_fill(cr);
 
 	gtk_print_context_set_cairo_context(preview_data->context, cr, PREVIEW_SCALE, PREVIEW_SCALE);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	cairo_destroy(cr);
+#endif
 
 	if (preview_data->current_page) {
 		preview_data->rendering = TRUE;
@@ -768,13 +783,15 @@
 static void cb_preview_zoom_fit(GtkButton *button, gpointer data)
 {
 	PreviewData *preview_data = (PreviewData*) data;
+	GtkAllocation allocation;
 	gdouble zoom_w;
 	gdouble zoom_h;
 
-	zoom_w = ((gdouble)preview_data->scrolled_window->allocation.width) /
+	gtk_widget_get_allocation(preview_data->scrolled_window, &allocation);
+	zoom_w = ((gdouble)allocation.width) /
 		 ((gdouble)preview_data->page_width/preview_data->print_data->zoom +
 		  PREVIEW_SHADOW_OFFSET);
-	zoom_h = ((gdouble)preview_data->scrolled_window->allocation.height) /
+	zoom_h = ((gdouble)allocation.height) /
 		 ((gdouble)preview_data->page_height/preview_data->print_data->zoom +
 		  PREVIEW_SHADOW_OFFSET);
 

Index: filtering.c
===================================================================
RCS file: /home/claws-mail/claws/src/filtering.c,v
retrieving revision 1.60.2.57.2.1
retrieving revision 1.60.2.57.2.2
diff -u -d -r1.60.2.57.2.1 -r1.60.2.57.2.2
--- filtering.c	7 Sep 2011 15:52:25 -0000	1.60.2.57.2.1
+++ filtering.c	29 Nov 2011 00:15:20 -0000	1.60.2.57.2.2
@@ -99,6 +99,19 @@
 	g_free(action);
 }
 
+static gint action_list_sort(gconstpointer a, gconstpointer b)
+{
+	int first  = filtering_is_final_action((FilteringAction *) a) ? 1 : 0;
+	int second = filtering_is_final_action((FilteringAction *) b) ? 1 : 0;
+	
+	return (first - second);
+}
+
+GSList *filtering_action_list_sort(GSList *action_list)
+{
+	return g_slist_sort(action_list, action_list_sort);
+}
+
 FilteringProp * filteringprop_new(gboolean enabled,
 				  const gchar *name,
 				  gint account_id,
@@ -112,7 +125,7 @@
 	filtering->name = name ? g_strdup(name): NULL;
 	filtering->account_id = account_id;
 	filtering->matchers = matchers;
-	filtering->action_list = action_list;
+	filtering->action_list = filtering_action_list_sort(action_list);
 
 	return filtering;
 }
@@ -750,8 +763,8 @@
 							log_warning(LOG_DEBUG_FILTERING, _("action could not apply\n"));
 						log_print(LOG_DEBUG_FILTERING,
 								_("no further processing after action [ %s ]\n"), buf);
-					} else
-						g_warning("No further processing after rule %s\n", buf);
+					}
+ 					debug_print("No further processing after rule %s\n", buf);
                 }
                 g_free(buf);
                 if (filtering_is_final_action(action)) {
@@ -1125,3 +1138,94 @@
 
 	return FALSE;
 }
+
+gboolean filtering_action_list_rename_path(GSList *action_list, const gchar *old_path,
+					   const gchar *new_path)
+{
+	gchar *base;
+	gchar *prefix;
+	gchar *suffix;
+	gchar *dest_path;
+	gchar *old_path_with_sep;
+	gint destlen;
+	gint prefixlen;
+	gint oldpathlen;
+        GSList * action_cur;
+	const gchar *separator=G_DIR_SEPARATOR_S;
+	gboolean matched = FALSE;
+#ifdef G_OS_WIN32
+again:
+#endif
+	oldpathlen = strlen(old_path);
+	old_path_with_sep = g_strconcat(old_path,separator,NULL);
+
+	for(action_cur = action_list ; action_cur != NULL ;
+		action_cur = action_cur->next) {
+
+		FilteringAction *action = action_cur->data;
+                        
+		if (action->type == MATCHACTION_SET_TAG ||
+		    action->type == MATCHACTION_UNSET_TAG)
+			continue;
+		if (!action->destination) 
+			continue;
+		
+		destlen = strlen(action->destination);
+                        
+		if (destlen > oldpathlen) {
+			prefixlen = destlen - oldpathlen;
+			suffix = action->destination + prefixlen;
+                                
+			if (!strncmp(old_path, suffix, oldpathlen)) {
+				prefix = g_malloc0(prefixlen + 1);
+				strncpy2(prefix, action->destination, prefixlen);
+                                        
+				base = suffix + oldpathlen;
+				while (*base == G_DIR_SEPARATOR) base++;
+                                if (*base == '\0')
+                                	dest_path = g_strconcat(prefix, separator,
+                                				new_path, NULL);
+				else
+					dest_path = g_strconcat(prefix,
+								separator,
+								new_path,
+								separator,
+								base, NULL);
+                                        
+					g_free(prefix);
+					g_free(action->destination);
+					action->destination = dest_path;
+					matched = TRUE;
+			} else { /* for non-leaf folders */
+				/* compare with trailing slash */
+				if (!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) {
+                                                
+					suffix = action->destination + oldpathlen + 1;
+					dest_path = g_strconcat(new_path, separator,
+								suffix, NULL);
+					g_free(action->destination);
+					action->destination = dest_path;
+					matched = TRUE;
+				}
+			}
+		} else {
+			/* folder-moving a leaf */
+			if (!strcmp(old_path, action->destination)) {
+                        	dest_path = g_strdup(new_path);
+                        	g_free(action->destination);
+                        	action->destination = dest_path;
+                        	matched = TRUE;
+			}
+		}
+	}
+	
+	g_free(old_path_with_sep);
+#ifdef G_OS_WIN32
+	if (!strcmp(separator, G_DIR_SEPARATOR_S) && !matched) {
+		separator = "/";
+		goto again;
+	}
+#endif
+
+	return matched;
+}

Index: prefs_spelling.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_spelling.c,v
retrieving revision 1.5.2.42
retrieving revision 1.5.2.42.2.1
diff -u -d -r1.5.2.42 -r1.5.2.42.2.1
--- prefs_spelling.c	16 Feb 2011 07:16:14 -0000	1.5.2.42
+++ prefs_spelling.c	29 Nov 2011 00:15:22 -0000	1.5.2.42.2.1
@@ -116,8 +116,6 @@
 	GtkWidget *misspelled_hbox;
 	GtkWidget *misspelled_colorbtn;
 
-	CLAWS_TIP_DECL();
-
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);

Index: prefs_msg_colors.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_msg_colors.c,v
retrieving revision 1.1.2.42
retrieving revision 1.1.2.42.2.1
diff -u -d -r1.1.2.42 -r1.1.2.42.2.1
--- prefs_msg_colors.c	16 Feb 2011 07:16:13 -0000	1.1.2.42
+++ prefs_msg_colors.c	29 Nov 2011 00:15:22 -0000	1.1.2.42.2.1
@@ -133,7 +133,6 @@
 	gint c;
 	gchar *tooltip_btn_text = NULL;
 	gchar *tooltip_entry_text = NULL;
-	CLAWS_TIP_DECL();
 
 	notebook = gtk_notebook_new();
 	gtk_widget_show(notebook);
@@ -579,6 +578,8 @@
 	GdkColor color;
 	gint rgbvalue = 0;
 	GtkColorSelectionDialog *dialog;
+	GtkWidget *button_ok;
+	GtkWidget *button_cancel;
 	gint c;
 
 	/* custom colors */
@@ -631,16 +632,20 @@
 		}
 	}
 
-	color_dialog = gtk_color_selection_dialog_new(title);
+	color_dialog = GTK_COLOR_SELECTION_DIALOG(gtk_color_selection_dialog_new(title));
 	g_free(title);
 	gtk_window_set_position(GTK_WINDOW(color_dialog), GTK_WIN_POS_CENTER);
 	gtk_window_set_modal(GTK_WINDOW(color_dialog), TRUE);
 	gtk_window_set_resizable(GTK_WINDOW(color_dialog), FALSE);
 	manage_window_set_transient(GTK_WINDOW(color_dialog));
 
-	g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(color_dialog)->cancel_button),
+	g_object_get(color_dialog, "ok-button", &button_ok,
+                               "cancel-button", &button_cancel,
+                               NULL);
+
+	g_signal_connect(G_OBJECT(button_cancel),
 			 "clicked", G_CALLBACK(quote_colors_set_dialog_cancel), data);
-	g_signal_connect(G_OBJECT(GTK_COLOR_SELECTION_DIALOG(color_dialog)->ok_button),
+	g_signal_connect(G_OBJECT(button_ok),
 			 "clicked", G_CALLBACK(quote_colors_set_dialog_ok), data);
 	g_signal_connect(G_OBJECT(color_dialog), "key_press_event",
 			 G_CALLBACK(quote_colors_set_dialog_key_pressed),data);
@@ -651,15 +656,16 @@
 
 	dialog = GTK_COLOR_SELECTION_DIALOG(color_dialog);
 	gtk_color_selection_set_current_color
-		(GTK_COLOR_SELECTION(dialog->colorsel), &color);
+		(GTK_COLOR_SELECTION(gtk_color_selection_dialog_get_color_selection(dialog)), &color);
 
 	gtk_widget_show(color_dialog);
 }
 
 static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
 {
-	GtkColorSelection *colorsel = (GtkColorSelection *)
-						((GtkColorSelectionDialog *)color_dialog)->colorsel;
+	GtkColorSelection *colorsel = GTK_COLOR_SELECTION(
+		gtk_color_selection_dialog_get_color_selection
+						((GtkColorSelectionDialog *)color_dialog));
 	GdkColor color;
 	gint rgbvalue;
 	gchar *type = (gchar *)data;
@@ -727,23 +733,27 @@
 						GdkEventKey *event,
 						gpointer data)
 {
+	GtkColorSelectionDialog *dialog;
+	GtkWidget *button_ok;
+	GtkWidget *button_cancel;
+
+	dialog = GTK_COLOR_SELECTION_DIALOG(widget);
+	g_object_get(dialog, "ok-button", &button_ok,
+                         "cancel-button", &button_cancel,
+                          NULL);
+
 	if (event) {
 		switch (event->keyval) {
-			case GDK_Escape:
-				gtk_button_clicked(GTK_BUTTON(GTK_COLOR_SELECTION_DIALOG
-							(widget)->cancel_button));
+			case GDK_KEY_Escape:
+				gtk_button_clicked(GTK_BUTTON(&button_cancel));
 				return TRUE;
-			case GDK_Return: 
-			case GDK_KP_Enter:
+			case GDK_KEY_Return: 
+			case GDK_KEY_KP_Enter:
 				/* NOTE: changing focus makes widget accept all currently 
 				 * changed settings! */
-				gtk_widget_grab_focus
-					(GTK_COLOR_SELECTION_DIALOG
-						(widget)->ok_button);
+				gtk_widget_grab_focus(button_ok);
 				/* call ok handler */						
-				gtk_button_clicked(GTK_BUTTON
-					(GTK_COLOR_SELECTION_DIALOG
-						(widget)->ok_button));
+				gtk_button_clicked(GTK_BUTTON(button_ok));
 				return TRUE;
 			default:
 				break;

Index: addressbook_foldersel.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/addressbook_foldersel.c,v
retrieving revision 1.1.2.19
retrieving revision 1.1.2.19.2.1
diff -u -d -r1.1.2.19 -r1.1.2.19.2.1
--- addressbook_foldersel.c	16 Feb 2011 07:15:56 -0000	1.1.2.19
+++ addressbook_foldersel.c	29 Nov 2011 00:15:19 -0000	1.1.2.19.2.1
@@ -90,7 +90,7 @@
 
 static gboolean addressbook_foldersel_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled )
 {
-	if ( event && event->keyval == GDK_Escape ) {
+	if ( event && event->keyval == GDK_KEY_Escape ) {
 		addressbook_foldersel_cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -183,15 +183,9 @@
 	tree_folder = gtk_sctree_new_with_titles( 1, 0, titles );
 	gtk_container_add( GTK_CONTAINER(tree_win), tree_folder );
 	gtk_cmclist_column_titles_show( GTK_CMCLIST(tree_folder) );
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(tree_folder), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(tree_folder),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 	gtk_sctree_set_stripes(GTK_SCTREE(tree_folder), prefs_common.use_stripes_everywhere);
 	gtk_cmclist_set_selection_mode( GTK_CMCLIST(tree_folder), GTK_SELECTION_BROWSE );
 	gtk_cmctree_set_indent( GTK_CMCTREE(tree_folder), CTREE_INDENT );

Index: wizard.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/wizard.c,v
retrieving revision 1.1.2.84
retrieving revision 1.1.2.84.2.1
diff -u -d -r1.1.2.84 -r1.1.2.84.2.1
--- wizard.c	3 Jul 2011 17:24:06 -0000	1.1.2.84
+++ wizard.c	29 Nov 2011 00:15:24 -0000	1.1.2.84.2.1
@@ -450,7 +450,7 @@
 {
 	GtkWidget *widget = wizard->email;
 	gint size = pango_font_description_get_size(
-			widget->style->font_desc)
+			gtk_widget_get_style(widget)->font_desc)
 		      /PANGO_SCALE;
 	gchar *tmp, *new;
 #ifdef G_OS_WIN32
@@ -1123,7 +1123,6 @@
 	gchar *uri, *mount_path;
 #endif
 	GtkWidget *hbox;
-	CLAWS_TIP_DECL();
 
 	gtk_table_set_row_spacings(GTK_TABLE(table), 4);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1259,7 +1258,6 @@
 	GtkWidget *smtp_cert_table;
 #endif
 	gchar *text;
-	CLAWS_TIP_DECL();
 	
 	gtk_table_set_row_spacings(GTK_TABLE(table), 4);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1524,7 +1522,6 @@
 	GtkTreeIter iter;
 	gchar *text;
 	gint index = 0;
-	CLAWS_TIP_DECL();
 
 	gtk_table_set_row_spacings(GTK_TABLE(table), 4);
 	gtk_table_set_col_spacings(GTK_TABLE(table), 8);
@@ -1848,7 +1845,7 @@
 	wizard->notebook = gtk_notebook_new();
 	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(wizard->notebook), FALSE);
 	gtk_notebook_set_show_border(GTK_NOTEBOOK(wizard->notebook), FALSE);
-	gtk_box_pack_start(GTK_BOX(GTK_DIALOG(wizard->window)->vbox), 
+	gtk_box_pack_start(GTK_BOX(gtk_dialog_get_content_area(GTK_DIALOG(wizard->window))), 
 			    wizard->notebook, TRUE, TRUE, 0);
 	
 	wizard->pages = NULL;

Index: pine.c
===================================================================
RCS file: /home/claws-mail/claws/src/pine.c,v
retrieving revision 1.6.2.17
retrieving revision 1.6.2.17.2.1
diff -u -d -r1.6.2.17 -r1.6.2.17.2.1
--- pine.c	16 Feb 2011 07:16:11 -0000	1.6.2.17
+++ pine.c	29 Nov 2011 00:15:21 -0000	1.6.2.17.2.1
@@ -642,7 +642,7 @@
 	homedir = get_home_dir();
 	if( ! homedir ) return g_strdup( "" );
 
-	strcpy( str, homedir );
+	strncpy( str, homedir, WORK_BUFLEN );
 	len = strlen( str );
 	if( len > 0 ) {
 		if( str[ len-1 ] != G_DIR_SEPARATOR ) {
@@ -650,7 +650,7 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strcat( str, PINE_HOME_FILE );
+	strncat( str, PINE_HOME_FILE, WORK_BUFLEN );
 
 	/* 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
retrieving revision 1.14.2.20.2.1
diff -u -d -r1.14.2.20 -r1.14.2.20.2.1
--- vcard.c	16 Feb 2011 07:16:17 -0000	1.14.2.20
+++ vcard.c	29 Nov 2011 00:15:24 -0000	1.14.2.20.2.1
@@ -569,7 +569,7 @@
 	homedir = get_home_dir();
 	if( ! homedir ) return NULL;
 
-	strcpy( str, homedir );
+	strncpy( str, homedir, WORK_BUFLEN );
 	len = strlen( str );
 	if( len > 0 ) {
 		if( str[ len-1 ] != G_DIR_SEPARATOR ) {
@@ -577,9 +577,9 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strcat( str, GNOMECARD_DIR );
-	strcat( str, G_DIR_SEPARATOR_S );
-	strcat( str, GNOMECARD_FILE );
+	strncat( str, GNOMECARD_DIR, WORK_BUFLEN );
+	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN );
+	strncat( str, GNOMECARD_FILE, WORK_BUFLEN );
 
 	fileSpec = NULL;
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: action.c
===================================================================
RCS file: /home/claws-mail/claws/src/action.c,v
retrieving revision 1.12.2.66
retrieving revision 1.12.2.66.2.1
diff -u -d -r1.12.2.66 -r1.12.2.66.2.1
--- action.c	25 May 2011 10:45:41 -0000	1.12.2.66
+++ action.c	29 Nov 2011 00:15:19 -0000	1.12.2.66.2.1
@@ -180,13 +180,13 @@
 
 static void catch_output		(gpointer		 data,
 					 gint			 source,
-					 GdkInputCondition	 cond);
+					 GIOCondition		 cond);
 static void catch_input			(gpointer		 data, 
 					 gint			 source,
-					 GdkInputCondition	 cond);
+					 GIOCondition		 cond);
 static void catch_status		(gpointer		 data,
 					 gint			 source,
-					 GdkInputCondition	 cond);
+					 GIOCondition		 cond);
 
 static gchar *get_user_string		(const gchar	*action,
 					 ActionType	 type);
@@ -476,15 +476,22 @@
 
 static GtkWidget *find_item_in_menu(GtkWidget *menu, gchar *name)
 {
-	GList *amenu = GTK_MENU_SHELL(menu)->children;
+	GList *children = gtk_container_get_children(GTK_CONTAINER(GTK_MENU_SHELL(menu)));
+	GList *amenu = children;
 	const gchar *existing_name;
 	while (amenu) {
 		GtkWidget *item = GTK_WIDGET(amenu->data);
 		if ((existing_name = g_object_get_data(G_OBJECT(item), "s_name")) != NULL &&
 		    !strcmp2(name, existing_name))
+		{
+			g_list_free(children);
 			 return item;
+		}
 		amenu = amenu->next;
 	}
+
+	g_list_free(children);
+
 	return NULL;
 }
 
@@ -898,7 +905,7 @@
 			child_info->data = data;
 			child_info->tag_status = 
 				claws_input_add(child_info->chld_status,
-					      GDK_INPUT_READ,
+					      G_IO_IN | G_IO_HUP | G_IO_ERR,
 					      catch_status, child_info,
 					      FALSE);
 		}
@@ -1065,9 +1072,9 @@
 	child_info->chld_err    = chld_err[0];
 	child_info->chld_status = chld_status[0];
 	child_info->tag_in      = -1;
-	child_info->tag_out     = claws_input_add(chld_out[0], GDK_INPUT_READ,
+	child_info->tag_out     = claws_input_add(chld_out[0], G_IO_IN | G_IO_HUP | G_IO_ERR,
 						catch_output, child_info, FALSE);
-	child_info->tag_err     = claws_input_add(chld_err[0], GDK_INPUT_READ,
+	child_info->tag_err     = claws_input_add(chld_err[0], G_IO_IN | G_IO_HUP | G_IO_ERR,
 						catch_output, child_info, FALSE);
 
 	if (!(children->action_type &
@@ -1151,7 +1158,7 @@
 	ChildInfo *child_info = (ChildInfo *) children->list->data;
 
 	child_info->tag_in = claws_input_add(child_info->chld_in,
-					   GDK_INPUT_WRITE,
+					   G_IO_OUT | G_IO_ERR,
 					   catch_input, children, FALSE);
 }
 
@@ -1178,9 +1185,9 @@
 static gint io_dialog_key_pressed_cb(GtkWidget *widget, GdkEventKey *event,
 				     gpointer data)
 {
-	if (event && (event->keyval == GDK_Escape ||
-		      event->keyval == GDK_Return ||
-			  event->keyval == GDK_KP_Enter))
+	if (event && (event->keyval == GDK_KEY_Escape ||
+		      event->keyval == GDK_KEY_Return ||
+			  event->keyval == GDK_KEY_KP_Enter))
 		hide_io_dialog_cb(widget, data);
 	return TRUE;
 }
@@ -1324,7 +1331,7 @@
 
 	dialog = gtk_dialog_new();
 	gtk_container_set_border_width
-		(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
+		(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 5);
 	gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Action's input/output"));
 	gtk_window_set_modal(GTK_WINDOW(dialog), TRUE);
@@ -1336,7 +1343,8 @@
 			 children);
 
 	vbox = gtk_vbox_new(FALSE, 8);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), vbox);
+	gtk_container_add(GTK_CONTAINER(
+				gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
 	gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
 	gtk_widget_show(vbox);
 
@@ -1413,8 +1421,15 @@
 #endif
 		
 		progress_bar = gtk_progress_bar_new();
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(progress_bar),
 				GTK_PROGRESS_LEFT_TO_RIGHT);
+#else
+		gtk_orientable_set_orientation(GTK_PROGRESS_BAR(progress_bar),
+				GTK_ORIENTATION_HORIZONTAL);
+		gtk_progress_bar_set_inverted(GTK_PROGRESS_BAR(progress_bar),
+				FALSE);
+#endif
 		text = g_strdup_printf(format, _("Completed"), 
 		                       children->initial_nb);
 		gtk_progress_bar_set_text(GTK_PROGRESS_BAR(progress_bar),
@@ -1435,7 +1450,8 @@
 	if (children->nb)
 		gtk_widget_set_sensitive(close_button, FALSE);
 
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), hbox);
+	gtk_container_add(GTK_CONTAINER(
+			gtk_dialog_get_action_area(GTK_DIALOG(dialog))), hbox);
 
 	children->dialog       = dialog;
 	children->scrolledwin  = scrolledwin;
@@ -1449,7 +1465,7 @@
 	gtk_widget_show(dialog);
 }
 
-static void catch_status(gpointer data, gint source, GdkInputCondition cond)
+static void catch_status(gpointer data, gint source, GIOCondition cond)
 {
 	ChildInfo *child_info = (ChildInfo *)data;
 	gchar buf;
@@ -1517,7 +1533,7 @@
 	wait_for_children(child_info->children);
 }
 	
-static void catch_input(gpointer data, gint source, GdkInputCondition cond)
+static void catch_input(gpointer data, gint source, GIOCondition cond)
 {
 	Children *children = (Children *)data;
 	ChildInfo *child_info = (ChildInfo *)children->list->data;
@@ -1526,7 +1542,7 @@
 	gssize by_read = 0, by_written = 0;
 
 	debug_print("Sending input to grand child.\n");
-	if (!(cond & GDK_INPUT_WRITE))
+	if (!(cond & (G_IO_OUT | G_IO_ERR)))
 		return;
 
 	gtk_widget_set_sensitive(children->input_hbox, FALSE);
@@ -1565,7 +1581,7 @@
 	debug_print("Input to grand child sent.\n");
 }
 
-static void catch_output(gpointer data, gint source, GdkInputCondition cond)
+static void catch_output(gpointer data, gint source, GIOCondition cond)
 {
 	ChildInfo *child_info = (ChildInfo *)data;
 	gint c;

Index: editaddress.c
===================================================================
RCS file: /home/claws-mail/claws/src/editaddress.c,v
retrieving revision 1.14.2.60
retrieving revision 1.14.2.60.2.1
diff -u -d -r1.14.2.60 -r1.14.2.60.2.1
--- editaddress.c	10 Apr 2011 17:19:04 -0000	1.14.2.60
+++ editaddress.c	29 Nov 2011 00:15:20 -0000	1.14.2.60.2.1
@@ -200,7 +200,7 @@
 
 static gboolean edit_person_key_pressed(GtkWidget *widget, GdkEventKey *event, gboolean *cancelled) {
 	if (prefs_common.addressbook_use_editaddress_dialog) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}
@@ -1021,7 +1021,7 @@
 
 static gboolean edit_person_entry_email_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Return) {
+	if (event && event->keyval == GDK_KEY_Return) {
 		if (email_saving)
 			edit_person_email_modify(NULL);		
 		else if (email_adding)
@@ -1236,7 +1236,7 @@
 
 static gboolean edit_person_entry_att_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Return) {
+	if (event && event->keyval == GDK_KEY_Return) {
 		if (attrib_saving)
 			edit_person_attrib_modify(NULL);
 		else if (attrib_adding)

Index: mutt.c
===================================================================
RCS file: /home/claws-mail/claws/src/mutt.c,v
retrieving revision 1.6.10.18
retrieving revision 1.6.10.18.2.1
diff -u -d -r1.6.10.18 -r1.6.10.18.2.1
--- mutt.c	16 Feb 2011 07:16:11 -0000	1.6.10.18
+++ mutt.c	29 Nov 2011 00:15:21 -0000	1.6.10.18.2.1
@@ -540,7 +540,7 @@
 	homedir = get_home_dir();
 	if( ! homedir ) return g_strdup( "" );
 
-	strcpy( str, homedir );
+	strncpy( str, homedir, WORK_BUFLEN );
 	len = strlen( str );
 	if( len > 0 ) {
 		if( str[ len-1 ] != G_DIR_SEPARATOR ) {
@@ -548,7 +548,7 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strcat( str, MUTT_HOME_FILE );
+	strncat( str, MUTT_HOME_FILE, WORK_BUFLEN );
 
 	/* Attempt to open */
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: ldif.c
===================================================================
RCS file: /home/claws-mail/claws/src/ldif.c,v
retrieving revision 1.12.2.23
retrieving revision 1.12.2.23.2.1
diff -u -d -r1.12.2.23 -r1.12.2.23.2.1
--- ldif.c	16 Feb 2011 07:16:07 -0000	1.12.2.23
+++ ldif.c	29 Nov 2011 00:15:21 -0000	1.12.2.23.2.1
@@ -526,8 +526,7 @@
 {
 	gchar *nm, *val;
 
-	nm = g_strdup( tagName );
-	g_utf8_strdown( nm, -1 );
+	nm = g_utf8_strdown( tagName, -1 );
 	if( tagValue ) {
 		val = g_strdup( tagValue );
 	}
@@ -536,19 +535,19 @@
 	}
 	g_strstrip( val );
 
-	if( g_utf8_collate( nm, LDIF_TAG_COMMONNAME ) == 0 ) {
+	if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_COMMONNAME, -1 ) ) == 0 ) {
 		rec->listCName = g_slist_append( rec->listCName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_FIRSTNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_FIRSTNAME, -1 ) ) == 0 ) {
 		rec->listFName = g_slist_append( rec->listFName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_LASTNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_LASTNAME, -1 ) ) == 0 ) {
 		rec->listLName = g_slist_append( rec->listLName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_NICKNAME ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_NICKNAME, -1 ) ) == 0 ) {
 		rec->listNName = g_slist_append( rec->listNName, val );
 	}
-	else if( g_utf8_collate( nm, LDIF_TAG_EMAIL ) == 0 ) {
+	else if( g_utf8_collate( nm, g_utf8_strdown( LDIF_TAG_EMAIL, -1 ) ) == 0 ) {
 		rec->listAddress = g_slist_append( rec->listAddress, val );
 	}
 	else {
@@ -756,30 +755,30 @@
 		gchar *tag = node->data;
 		if( ! g_hash_table_lookup( table, tag ) ) {
 			Ldif_FieldRec *rec = NULL;
-			gchar *key = g_strdup( tag );
+			gchar *key = g_utf8_strdown( tag, -1 );
 
 			rec = ldif_create_fieldrec( tag );
-			if( g_utf8_collate( tag, LDIF_TAG_DN ) == 0 ) {
+			if( g_utf8_collate( key, LDIF_TAG_DN ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( "dn" );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_COMMONNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_COMMONNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Display Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_FIRSTNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_FIRSTNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "First Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_LASTNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_LASTNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Last Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_NICKNAME ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_NICKNAME, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Nick Name" ) );
 			}
-			else if( g_utf8_collate( tag, LDIF_TAG_EMAIL ) == 0 ) {
+			else if( g_utf8_collate( key, g_utf8_strdown( LDIF_TAG_EMAIL, -1 ) ) == 0 ) {
 				rec->reserved = rec->selected = TRUE;
 				rec->userName = g_strdup( _( "Email Address" ) );
 			}

Index: quote_fmt.c
===================================================================
RCS file: /home/claws-mail/claws/src/quote_fmt.c,v
retrieving revision 1.8.2.44
retrieving revision 1.8.2.44.2.1
diff -u -d -r1.8.2.44 -r1.8.2.44.2.1
--- quote_fmt.c	16 Feb 2011 07:16:15 -0000	1.8.2.44
+++ quote_fmt.c	29 Nov 2011 00:15:23 -0000	1.8.2.44.2.1
@@ -176,8 +176,6 @@
 	gtk_container_set_border_width (GTK_CONTAINER (vbox_format), 8);
 
 	if (override_from_format) {
-		CLAWS_TIP_DECL();
-
 		hbox2_format = gtk_hbox_new (FALSE, 8);
 		gtk_widget_show (hbox2_format);
 		gtk_box_pack_start (GTK_BOX (vbox_format), hbox2_format, FALSE, FALSE, 0);
@@ -302,8 +300,6 @@
 	gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
 	if (override_from_format) {
-		CLAWS_TIP_DECL();
-
 		hbox3 = gtk_hbox_new (FALSE, 8);
 		gtk_widget_show (hbox3);
 		gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);
@@ -432,8 +428,6 @@
 	gtk_container_set_border_width (GTK_CONTAINER (vbox_quote), 8);
 
 	if (override_from_format) {
-		CLAWS_TIP_DECL();
-
 		hbox3 = gtk_hbox_new (FALSE, 8);
 		gtk_widget_show (hbox3);
 		gtk_box_pack_start (GTK_BOX (vbox_quote), hbox3, FALSE, FALSE, 0);

Index: grouplistdialog.c
===================================================================
RCS file: /home/claws-mail/claws/src/grouplistdialog.c,v
retrieving revision 1.14.2.28
retrieving revision 1.14.2.28.2.1
diff -u -d -r1.14.2.28 -r1.14.2.28.2.1
--- grouplistdialog.c	16 Feb 2011 07:15:59 -0000	1.14.2.28
+++ grouplistdialog.c	29 Nov 2011 00:15:21 -0000	1.14.2.28.2.1
@@ -94,7 +94,7 @@
 	GNode *node;
 	FolderItem *item;
 
-	if (dialog && gtkut_widget_get_visible(dialog)) return NULL;
+	if (dialog && gtk_widget_get_visible(dialog)) return NULL;
 
 	if (!dialog)
 		grouplist_dialog_create();
@@ -156,7 +156,7 @@
 	dialog = gtk_dialog_new();
 	gtk_window_set_resizable(GTK_WINDOW(dialog), TRUE);
 	gtk_container_set_border_width
-		(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), 5);
+		(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))), 5);
 	gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_CENTER);
 	gtk_window_set_title(GTK_WINDOW(dialog), _("Newsgroup subscription"));
 	g_signal_connect(G_OBJECT(dialog), "delete_event",
@@ -168,7 +168,8 @@
 	MANAGE_WINDOW_SIGNALS_CONNECT(dialog);
 
 	vbox = gtk_vbox_new(FALSE, 8);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->vbox), vbox);
+	gtk_container_add(GTK_CONTAINER(
+				gtk_dialog_get_content_area(GTK_DIALOG(dialog))), vbox);
 	gtk_container_set_border_width(GTK_CONTAINER(vbox), 8);
 
 	hbox = gtk_hbox_new(FALSE, 0);
@@ -210,15 +211,9 @@
 	gtk_cmclist_set_column_auto_resize(GTK_CMCLIST(ctree), 0, TRUE);
 	gtk_cmclist_set_selection_mode(GTK_CMCLIST(ctree), GTK_SELECTION_MULTIPLE);
 	
-	if (prefs_common.enable_dotted_lines) {	
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-					GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-					GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
+				GTK_CMCTREE_EXPANDER_TRIANGLE);
 
 	for (i = 0; i < 3; i++)
 		gtkut_widget_set_can_focus(GTK_CMCLIST(ctree)->column[i].button, FALSE);
@@ -235,7 +230,7 @@
 				      &refresh_button, GTK_STOCK_REFRESH,
 				      &cancel_button, GTK_STOCK_CANCEL,
 				      &ok_button, GTK_STOCK_OK);
-	gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
+	gtk_container_add(GTK_CONTAINER(gtk_dialog_get_action_area(GTK_DIALOG(dialog))),
 			  confirm_area);
 	gtk_widget_grab_default(ok_button);
 
@@ -257,7 +252,7 @@
 					prefs_common.news_subscribe_width,
 					prefs_common.news_subscribe_height);
 
-	gtk_widget_show_all(GTK_DIALOG(dialog)->vbox);
+	gtk_widget_show_all(gtk_dialog_get_content_area(GTK_DIALOG(dialog)));
 }
 
 static GHashTable *branch_node_table;
@@ -359,7 +354,7 @@
 	parent = grouplist_create_parent(parent_name, pattern);
 	node = grouplist_hash_get_branch_node(name);
 	if (node) {
-		gtk_sctree_set_node_info(GTK_CMCTREE(ctree), node, cols[0], 0,
+		gtk_cmctree_set_node_info(GTK_CMCTREE(ctree), node, cols[0], 0,
 					NULL, NULL, FALSE, FALSE);
 		gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 1, cols[1]);
 		gtk_cmctree_node_set_text(GTK_CMCTREE(ctree), node, 2, cols[2]);
@@ -401,6 +396,7 @@
 	GSList *cur;
 	GtkCMCTreeNode *node;
 	GPatternSpec *pspec;
+	GdkWindow *window;
 
 	if (locked) return;
 	locked = TRUE;
@@ -410,7 +406,8 @@
 
 	if (!watch_cursor)
 		watch_cursor = gdk_cursor_new(GDK_WATCH);
-	gdk_window_set_cursor(dialog->window, watch_cursor);
+	window = gtk_widget_get_window(dialog);
+	gdk_window_set_cursor(window, watch_cursor);
 	main_window_cursor_wait(mainwindow_get_mainwindow());
 	GTK_EVENTS_FLUSH();
 	
@@ -424,7 +421,7 @@
 		if (group_list == NULL && ack == TRUE) {
 			alertpanel_error(_("Can't retrieve newsgroup list."));
 			locked = FALSE;
-			gdk_window_set_cursor(dialog->window, NULL);
+			gdk_window_set_cursor(window, NULL);
 			main_window_cursor_normal(mainwindow_get_mainwindow());
 			return;
 		}
@@ -461,7 +458,7 @@
 
 	gtk_label_set_text(GTK_LABEL(status_label), _("Done."));
 
-	gdk_window_set_cursor(dialog->window, NULL);
+	gdk_window_set_cursor(window, NULL);
 	main_window_cursor_normal(mainwindow_get_mainwindow());
 
 	locked = FALSE;
@@ -548,7 +545,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		cancel_clicked(NULL, NULL);
 	return FALSE;
 }

Index: editjpilot.c
===================================================================
RCS file: /home/claws-mail/claws/src/editjpilot.c,v
retrieving revision 1.5.12.18
retrieving revision 1.5.12.18.2.1
diff -u -d -r1.5.12.18 -r1.5.12.18.2.1
--- editjpilot.c	16 Feb 2011 07:15:57 -0000	1.5.12.18
+++ editjpilot.c	29 Nov 2011 00:15:20 -0000	1.5.12.18.2.1
@@ -78,7 +78,7 @@
 }
 
 static gboolean edit_jpilot_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		*cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: prefs_filtering_action.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_filtering_action.c,v
retrieving revision 1.1.4.69.2.1
retrieving revision 1.1.4.69.2.2
diff -u -d -r1.1.4.69.2.1 -r1.1.4.69.2.2
--- prefs_filtering_action.c	7 Sep 2011 15:52:27 -0000	1.1.4.69.2.1
+++ prefs_filtering_action.c	29 Nov 2011 00:15:22 -0000	1.1.4.69.2.2
@@ -32,7 +32,9 @@
 #include <string.h>
 #include <errno.h>
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
+#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_filtering_action.h"
@@ -115,7 +117,9 @@
 	GtkWidget *dest_entry;
 	GtkWidget *dest_btn;
 	GtkWidget *exec_btn;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
+#endif
 	GtkWidget *header_combo;
 	GtkWidget *header_entry;
 	GtkWidget *addressbook_btn;
@@ -174,7 +178,9 @@
 	{ N_("Message flags"), 	N_("Mark as spam"),		ACTION_MARK_AS_SPAM },
 	{ N_("Message flags"), 	N_("Mark as ham"),		ACTION_MARK_AS_HAM },
 	{ NULL, 		N_("Execute"),			ACTION_EXECUTE },
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	{ NULL, 		N_("Color label"),		ACTION_COLOR },
+#endif
 	{ N_("Resend"), 	N_("Forward"),			ACTION_FORWARD },
 	{ N_("Resend"), 	N_("Forward as attachment"),	ACTION_FORWARD_AS_ATTACHMENT },
 	{ N_("Resend"), 	N_("Redirect"),			ACTION_REDIRECT },
@@ -272,9 +278,11 @@
 	if (!filtering_action.window) {
 		prefs_filtering_action_create();
 	} else {
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		/* update color label menu */
 		gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(filtering_action.color_optmenu),
 				colorlabel_create_color_menu());
+#endif
 	}
 
 	manage_window_set_transient(GTK_WINDOW(filtering_action.window));
@@ -359,7 +367,9 @@
 
 	GtkWidget *exec_btn;
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *color_optmenu;
+#endif
 
 	static GdkGeometry geometry;
 
@@ -507,12 +517,14 @@
 	score_entry = gtk_spin_button_new_with_range(-1000, 1000, 1);
 	gtk_box_pack_start(GTK_BOX(hbox1), score_entry, FALSE, FALSE, 0);
 	
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	color_optmenu = gtk_cmoption_menu_new();
 	gtk_size_group_add_widget(size_action, color_optmenu);
 	gtk_cmoption_menu_set_menu(GTK_CMOPTION_MENU(color_optmenu),
 				 colorlabel_create_color_menu());
 	prefs_filtering_action_check_widget_width(color_optmenu);
 	gtk_box_pack_start(GTK_BOX(hbox1), color_optmenu, FALSE, FALSE, 0);
+#endif
 
 	tags_combo = gtk_combo_box_new_text ();
 	gtk_size_group_add_widget(size_action, tags_combo);
@@ -632,7 +644,9 @@
 	filtering_action.dest_entry = dest_entry;
 	filtering_action.dest_btn = dest_btn;
 	filtering_action.exec_btn = exec_btn;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	filtering_action.color_optmenu = color_optmenu;
+#endif
 	filtering_action.score_entry = score_entry;
 	filtering_action.header_combo = header_combo;
 	filtering_action.header_entry = header_entry;
@@ -833,8 +847,10 @@
 		return MATCHACTION_REDIRECT;
 	case ACTION_EXECUTE:
 		return MATCHACTION_EXECUTE;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		return MATCHACTION_COLOR;
+#endif
 	case ACTION_HIDE:
 		return MATCHACTION_HIDE;
 	case ACTION_IGNORE:
@@ -906,11 +922,13 @@
 			return NULL;
 		}
 		break;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		labelcolor = colorlabel_get_color_menu_active_item(
 			gtk_cmoption_menu_get_menu(GTK_CMOPTION_MENU(filtering_action.color_optmenu)));
 		destination = NULL;	
 		break;
+#endif
         case ACTION_CHANGE_SCORE:
         case ACTION_SET_SCORE:
         	score = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(
@@ -1136,7 +1154,7 @@
 static gboolean prefs_filtering_action_key_pressed(GtkWidget *widget,
     GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		prefs_filtering_action_cancel();
 		return TRUE;		
 	}
@@ -1273,7 +1291,11 @@
 
 	if(enable == TRUE)
 	{
+#if !GTK_CHECK_VERSION(2,24,0)
 		if(GTK_IS_COMBO_BOX(widget) || GTK_IS_COMBO_BOX_ENTRY(widget))
+#else
+		if(GTK_IS_COMBO_BOX(widget))
+#endif
 			gtk_combo_box_set_active(GTK_COMBO_BOX(widget), 0);
 		else if(GTK_IS_SPIN_BUTTON(widget))
 			gtk_spin_button_set_value(GTK_SPIN_BUTTON(widget), 0);
@@ -1344,8 +1366,10 @@
 	prefs_filtering_action_enable_widget(filtering_action.exec_btn,
 						(value == ACTION_EXECUTE));
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	prefs_filtering_action_enable_widget(filtering_action.color_optmenu,
 						(value == ACTION_COLOR));
+#endif
 
 	prefs_filtering_action_enable_widget(filtering_action.header_combo,
 					(value == ACTION_ADD_TO_ADDRESSBOOK));	
@@ -1371,9 +1395,11 @@
 	case ACTION_MOVE:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Destination"));
 		break;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case ACTION_COLOR:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Color"));
 		break;
+#endif
 	case ACTION_EXECUTE:
 		gtk_label_set_text(GTK_LABEL(filtering_action.label3), _("Execute"));
 		break;
@@ -1577,6 +1603,7 @@
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_EXECUTE);
 		break;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	case MATCHACTION_COLOR:
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_COLOR);
@@ -1586,6 +1613,7 @@
 						filtering_action.color_optmenu));
 		g_signal_emit_by_name(G_OBJECT(menu), "selection-done", menu);
 		break;
+#endif
 	case MATCHACTION_CHANGE_SCORE:
 		combobox_select_by_data(GTK_COMBO_BOX(filtering_action.action_combo),
 				     ACTION_CHANGE_SCORE);

Index: browseldap.c
===================================================================
RCS file: /home/claws-mail/claws/src/browseldap.c,v
retrieving revision 1.2.4.26
retrieving revision 1.2.4.26.2.1
diff -u -d -r1.2.4.26 -r1.2.4.26.2.1
--- browseldap.c	10 Apr 2011 08:07:06 -0000	1.2.4.26
+++ browseldap.c	29 Nov 2011 00:15:19 -0000	1.2.4.26.2.1
@@ -179,7 +179,7 @@
 static void browse_key_pressed(
 		GtkWidget *widget, GdkEventKey *event, gboolean *cancelled )
 {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		gtk_main_quit();
 	}
 }

Index: editaddress_other_attributes_ldap.c
===================================================================
RCS file: /home/claws-mail/claws/src/Attic/editaddress_other_attributes_ldap.c,v
retrieving revision 1.1.2.15
retrieving revision 1.1.2.15.2.1
diff -u -d -r1.1.2.15 -r1.1.2.15.2.1
--- editaddress_other_attributes_ldap.c	10 Apr 2011 17:19:04 -0000	1.1.2.15
+++ editaddress_other_attributes_ldap.c	29 Nov 2011 00:15:20 -0000	1.1.2.15.2.1
@@ -266,7 +266,7 @@
 
 static gboolean edit_person_entry_att_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && (event->keyval == GDK_Return || event->keyval == GDK_KP_Enter)) {
+	if (event && (event->keyval == GDK_KEY_Return || event->keyval == GDK_KEY_KP_Enter)) {
 		if (attrib_saving)
 			edit_person_attrib_modify(NULL);
 		else if (attrib_adding)

Index: codeconv.c
===================================================================
RCS file: /home/claws-mail/claws/src/codeconv.c,v
retrieving revision 1.65.2.73
retrieving revision 1.65.2.73.2.1
diff -u -d -r1.65.2.73 -r1.65.2.73.2.1
--- codeconv.c	27 Apr 2011 05:53:34 -0000	1.65.2.73
+++ codeconv.c	29 Nov 2011 00:15:19 -0000	1.65.2.73.2.1
@@ -1693,6 +1693,7 @@
 					cur_len += mb_len;
 					p += mb_len;
 				} else if (cur_len == 0) {
+					left = 0;
 					LBREAK_IF_REQUIRED(1, FALSE);
 					continue;
 				} else {

Index: mh_gtk.c
===================================================================
RCS file: /home/claws-mail/claws/src/mh_gtk.c,v
retrieving revision 1.2.2.39
retrieving revision 1.2.2.39.2.1
diff -u -d -r1.2.2.39 -r1.2.2.39.2.1
--- mh_gtk.c	16 Feb 2011 07:16:10 -0000	1.2.2.39
+++ mh_gtk.c	29 Nov 2011 00:15:21 -0000	1.2.2.39.2.1
@@ -38,6 +38,7 @@
 #include "mh.h"
 #include "foldersel.h"
 #include "prefs_common.h"
+#include "prefs_actions.h"
 
 static void new_folder_cb(GtkAction *action, gpointer data);
 static void delete_folder_cb(GtkAction *action, gpointer data);
@@ -282,6 +283,7 @@
 	new_id = folder_item_get_identifier(item);
 	prefs_filtering_rename_path(old_id, new_id);
 	account_rename_path(old_id, new_id);
+	prefs_actions_rename_path(old_id, new_id);
 	g_free(old_id);
 	g_free(new_id);
 

Index: imap_gtk.c
===================================================================
RCS file: /home/claws-mail/claws/src/imap_gtk.c,v
retrieving revision 1.1.2.66
retrieving revision 1.1.2.66.2.1
diff -u -d -r1.1.2.66 -r1.1.2.66.2.1
--- imap_gtk.c	16 Feb 2011 07:16:01 -0000	1.1.2.66
+++ imap_gtk.c	29 Nov 2011 00:15:21 -0000	1.1.2.66.2.1
@@ -42,6 +42,7 @@
 #include "prefs_common.h"
 #include "statusbar.h"
 #include "summaryview.h"
+#include "prefs_actions.h"
 
 static void new_folder_cb(GtkAction *action, gpointer data);
 static void rename_folder_cb(GtkAction *action, gpointer data);
@@ -298,7 +299,7 @@
 	new_id = folder_item_get_identifier(item);
 	prefs_filtering_rename_path(old_id, new_id);
 	account_rename_path(old_id, new_id);
-
+	prefs_actions_rename_path(old_id, new_id);
 	g_free(old_id);
 	g_free(new_id);
 
@@ -533,7 +534,9 @@
 				transc_list = g_list_append(transc_list, 
 					imap_modified_utf7_to_utf8(cur->data, FALSE));
 			}
-
+			
+			transc_list = g_list_sort(transc_list, g_str_equal);
+			
 			child_folder = input_dialog_combo(_("Subscribe"), 
 					msg,
 					transc_list->next?_("All of them"):transc_list->data, transc_list);

Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.239.2.1
retrieving revision 1.115.2.239.2.2
diff -u -d -r1.115.2.239.2.1 -r1.115.2.239.2.2
--- main.c	7 Sep 2011 15:52:25 -0000	1.115.2.239.2.1
+++ main.c	29 Nov 2011 00:15:21 -0000	1.115.2.239.2.2
@@ -226,7 +226,7 @@
 static gint lock_socket_remove		(void);
 static void lock_socket_input_cb	(gpointer	   data,
 					 gint		   source,
-					 GdkInputCondition condition);
+					 GIOCondition      condition);
 
 static void open_compose_new		(const gchar	*address,
 					 GPtrArray	*attach_files);
@@ -428,7 +428,6 @@
 	gint r = 0;
 	GtkWidget *window = NULL;
 	GtkWidget *keep_backup_chk;
-	CLAWS_TIP_DECL();
 	gboolean backup = TRUE;
 
 	keep_backup_chk = gtk_check_button_new_with_label (_("Keep old configuration"));
@@ -591,8 +590,8 @@
 		(*sc_ice_installed_handler) (connection);
 }
 static gboolean sc_process_ice_messages (GIOChannel   *source,
-		      GIOCondition  condition,
-		      gpointer      data)
+					 GIOCondition  condition,
+					 gpointer      data)
 {
 	IceConn connection = (IceConn) data;
 	IceProcessMessagesStatus status;
@@ -1186,33 +1185,6 @@
 		g_error(_("g_thread is not supported by glib.\n"));
 	}
 
-	/* check that we're not on a too recent/old gtk+ */
-#if GTK_CHECK_VERSION(2, 9, 0)
-	if (gtk_check_version(2, 9, 0) != NULL) {
-		alertpanel_error(_("Claws Mail has been compiled with "
-				   "a more recent GTK+ library than is "
-				   "currently available. This will cause "
-				   "crashes. You need to upgrade GTK+ or "
-				   "recompile Claws Mail."));
-#ifdef G_OS_WIN32
-		win32_close_log();
-#endif
-		exit(1);
-	}
-#else
-	if (gtk_check_version(2, 9, 0) == NULL) {
-		alertpanel_error(_("Claws Mail has been compiled with "
-				   "an older GTK+ library than is "
-				   "currently available. This will cause "
-				   "crashes. You need to recompile "
-				   "Claws Mail."));
-#ifdef G_OS_WIN32
-		win32_close_log();
-#endif
-		exit(1);
-	}
-#endif	
-
 #ifdef G_OS_WIN32
 	CHDIR_EXEC_CODE_RETURN_VAL_IF_FAIL(get_home_dir(), 1, win32_close_log(););
 #else
@@ -1407,7 +1379,7 @@
 
 	/* register the callback of unix domain socket input */
 	lock_socket_tag = claws_input_add(lock_socket,
-					GDK_INPUT_READ | GDK_INPUT_EXCEPTION,
+					G_IO_IN | G_IO_HUP | G_IO_ERR | G_IO_PRI,
 					lock_socket_input_cb,
 					mainwin, TRUE);
 
@@ -1826,6 +1798,94 @@
 	claws_done();
 }
 
+#define G_STRING_APPEND_ENCODED_URI(gstring,source)	\
+	{						\
+		gchar tmpbuf[BUFFSIZE];			\
+		encode_uri(tmpbuf, BUFFSIZE, (source));	\
+		g_string_append((gstring), tmpbuf);	\
+	}
+
+#define G_PRINT_EXIT(msg)	\
+	{			\
+		g_print(msg);	\
+		exit(1);	\
+	}
+
+static GString * parse_cmd_compose_from_file(const gchar *fn)
+{
+	GString *headers = g_string_new(NULL);
+	GString *body = g_string_new(NULL);
+	gchar *to = NULL;
+	gchar *h;
+	gchar *v;
+	gchar fb[BUFFSIZE];
+	FILE *fp;
+	gboolean isstdin;
+
+	if (fn == NULL || *fn == '\0')
+		G_PRINT_EXIT(_("Missing filename\n"));
+	isstdin = (*fn == '-' && *(fn + 1) == '\0');
+	if (isstdin)
+		fp = stdin;
+	else {
+		fp = g_fopen(fn, "r");
+		if (!fp)
+			G_PRINT_EXIT(_("Cannot open filename for reading\n"));
+	}
+
+	while (fgets(fb, sizeof(fb), fp)) {
+		gchar *tmp;	
+		strretchomp(fb);
+		if (*fb == '\0')
+			break;
+		h = fb;
+		while (*h && *h != ':') { ++h; } /* search colon */
+        	if (*h == '\0')
+			G_PRINT_EXIT(_("Malformed header\n"));
+		v = h + 1;
+		while (*v && *v == ' ') { ++v; } /* trim value start */
+		*h = '\0';
+		tmp = g_ascii_strdown(fb, -1); /* get header name */
+		if (!strcmp(tmp, "to")) {
+			if (to != NULL)
+				G_PRINT_EXIT(_("Duplicated 'To:' header\n"));
+			to = g_strdup(v);
+		} else {
+			g_string_append_c(headers, '&');
+			g_string_append(headers, tmp);
+			g_string_append_c(headers, '=');
+#if GLIB_CHECK_VERSION(2,16,0)
+			g_string_append_uri_escaped(headers, v, NULL, TRUE);
+#else
+			G_STRING_APPEND_ENCODED_URI(headers, v);
+#endif	
+		}
+		g_free(tmp);
+	}
+	if (to == NULL)
+		G_PRINT_EXIT(_("Missing required 'To:' header\n"));
+	g_string_append(body, to);
+	g_free(to);
+	g_string_append(body, "?body=");
+	while (fgets(fb, sizeof(fb), fp)) {
+#if GLIB_CHECK_VERSION(2,16,0)
+		g_string_append_uri_escaped(body, fb, NULL, TRUE);
+#else
+		G_STRING_APPEND_ENCODED_URI(body, fb);
+#endif
+	}
+	if (!isstdin)
+		fclose(fp);
+	/* append the remaining headers */
+	g_string_append(body, headers->str);
+	g_string_free(headers, TRUE);
+
+	return body;
+}
+
+#undef G_STRING_APPEND_ENCODED_URI
+#undef G_PRINT_EXIT
+
 static void parse_cmd_opt(int argc, char *argv[])
 {
 	gint i;
@@ -1835,6 +1895,13 @@
 			cmd.receive_all = TRUE;
 		} else if (!strncmp(argv[i], "--receive", 9)) {
 			cmd.receive = TRUE;
+		} else if (!strncmp(argv[i], "--compose-from-file", 19)) {
+			const gchar *p = (i+1 < argc)?argv[i+1]:NULL;
+
+			GString *mailto = parse_cmd_compose_from_file(p);
+			cmd.compose = TRUE;
+			cmd.compose_mailto = mailto->str;
+			i++;
 		} else if (!strncmp(argv[i], "--compose", 9)) {
 			const gchar *p = (i+1 < argc)?argv[i+1]:NULL;
 
@@ -1936,18 +2003,23 @@
 			g_print(_("Usage: %s [OPTION]...\n"), base);
 
 			g_print("%s\n", _("  --compose [address]    open composition window"));
+			g_print("%s\n", _("  --compose-from-file file\n"
+				  	  "                         open composition window with data from given file;\n"
+			  	  	  "                         use - as file name for reading from standard input;\n"
+			  	  	  "                         content format: headers first (To: required) until an\n"
+				  	  "                         empty line, then mail body until end of file."));
 			g_print("%s\n", _("  --subscribe [uri]      subscribe to the given URI if possible"));
 			g_print("%s\n", _("  --attach file1 [file2]...\n"
-			          "                         open composition window with specified files\n"
-			          "                         attached"));
+					  "                         open composition window with specified files\n"
+					  "                         attached"));
 			g_print("%s\n", _("  --receive              receive new messages"));
 			g_print("%s\n", _("  --receive-all          receive new messages of all accounts"));
-			g_print("%s\n", _("  --search folder type request [recursive]"));
-			g_print("%s\n", _("                         searches mail"));
-			g_print("%s\n", _("                         folder ex.: \"#mh/Mailbox/inbox\" or \"Mail\""));
-			g_print("%s\n", _("                         type: s[ubject],f[rom],t[o],e[xtended],m[ixed] or g: tag"));
-			g_print("%s\n", _("                         request: search string"));
-			g_print("%s\n", _("                         recursive: false if arg. starts with 0, n, N, f or F"));
+			g_print("%s\n", _("  --search folder type request [recursive]\n"
+					  "                         searches mail\n"
+					  "                         folder ex.: \"#mh/Mailbox/inbox\" or \"Mail\"\n"
+					  "                         type: s[ubject],f[rom],t[o],e[xtended],m[ixed] or g: tag\n"
+					  "                         request: search string\n"
+					  "                         recursive: false if arg. starts with 0, n, N, f or F"));
 
 			g_print("%s\n", _("  --send                 send all queued messages"));
  			g_print("%s\n", _("  --status [folder]...   show the total number of messages"));
@@ -2388,7 +2460,7 @@
 
 static void lock_socket_input_cb(gpointer data,
 				 gint source,
-				 GdkInputCondition condition)
+				 GIOCondition condition)
 {
 	MainWindow *mainwin = (MainWindow *)data;
 	gint sock;
@@ -2493,7 +2565,7 @@
 				debug_print("Unknown folder: '%s'\n",folder_name);
 		} else {
 			debug_print("%s %s\n",folderItem->name, folderItem->path);
-        }
+		}
 		if (folderItem != NULL) {
 			quicksearch_set(quicksearch, searchType, request);
 			quicksearch_set_recursive(quicksearch, recursive);

Index: folder_item_prefs.c
===================================================================
RCS file: /home/claws-mail/claws/src/folder_item_prefs.c,v
retrieving revision 1.2.2.37
retrieving revision 1.2.2.37.2.1
diff -u -d -r1.2.2.37 -r1.2.2.37.2.1
--- folder_item_prefs.c	8 Apr 2011 16:55:52 -0000	1.2.2.37
+++ folder_item_prefs.c	29 Nov 2011 00:15:20 -0000	1.2.2.37.2.1
@@ -331,6 +331,7 @@
 	dest->ret_rcpt  = src->ret_rcpt;
 	dest->hide_read_msgs = src->hide_read_msgs;
 	dest->hide_del_msgs = src->hide_del_msgs;
+	dest->hide_read_threads = src->hide_read_threads;
 	dest->sort_key  = src->sort_key;
 	dest->sort_type = src->sort_type;
 

Index: ssl_manager.c
===================================================================
RCS file: /home/claws-mail/claws/src/ssl_manager.c,v
retrieving revision 1.3.2.35
retrieving revision 1.3.2.35.2.1
diff -u -d -r1.3.2.35 -r1.3.2.35.2.1
--- ssl_manager.c	30 Aug 2011 06:18:09 -0000	1.3.2.35
+++ ssl_manager.c	29 Nov 2011 00:15:23 -0000	1.3.2.35.2.1
@@ -34,7 +34,6 @@
 #include "manage_window.h"
 #include "utils.h"
 #include "mainwindow.h"
-#include "gtksctree.h"
 #include "alertpanel.h"
 #include "sslcertwindow.h"
 #include "prefs_common.h"
@@ -375,7 +374,7 @@
 
 static gboolean key_pressed(GtkWidget *widget, GdkEventKey *event, gpointer data)
 {
-	if (event && event->keyval == GDK_Escape)
+	if (event && event->keyval == GDK_KEY_Escape)
 		ssl_manager_close();
 	return FALSE;
 }

Index: mainwindow.h
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.h,v
retrieving revision 1.39.2.61
retrieving revision 1.39.2.61.2.1
diff -u -d -r1.39.2.61 -r1.39.2.61.2.1
--- mainwindow.h	3 Jul 2011 13:17:49 -0000	1.39.2.61
+++ mainwindow.h	29 Nov 2011 00:15:21 -0000	1.39.2.61.2.1
@@ -66,7 +66,8 @@
 	M_FOLDER_SELECTED     = 1 << 25,
 	M_SESSION_PASSWORDS   = 1 << 26,
 	M_DELETED_EXISTS      = 1 << 27,
-	M_NOT_TRASH	      = 1 << 28
+	M_NOT_TRASH	      = 1 << 28,
+	M_HIDE_READ_THREADS   = 1 << 29
 } SensitiveCond;
 
 typedef enum

Index: folderview.c
===================================================================
RCS file: /home/claws-mail/claws/src/folderview.c,v
retrieving revision 1.207.2.220
retrieving revision 1.207.2.220.2.1
diff -u -d -r1.207.2.220 -r1.207.2.220.2.1
--- folderview.c	10 Apr 2011 08:07:07 -0000	1.207.2.220
+++ folderview.c	29 Nov 2011 00:15:20 -0000	1.207.2.220.2.1
@@ -445,15 +445,9 @@
 	gtk_cmclist_set_column_justification(GTK_CMCLIST(ctree), 
 					   col_pos[F_COL_TOTAL],
 					   GTK_JUSTIFY_RIGHT);
-	if (prefs_common.enable_dotted_lines) {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_DOTTED);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_SQUARE);
-	} else {
-		gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
-		gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
-				     GTK_CMCTREE_EXPANDER_TRIANGLE);
-	}
+	gtk_cmctree_set_line_style(GTK_CMCTREE(ctree), GTK_CMCTREE_LINES_NONE);
+	gtk_cmctree_set_expander_style(GTK_CMCTREE(ctree),
+			     GTK_CMCTREE_EXPANDER_TRIANGLE);
 
 	gtk_sctree_set_stripes(GTK_SCTREE(ctree), prefs_common.use_stripes_in_summaries);
 	gtk_sctree_set_recursive_expand(GTK_SCTREE(ctree), FALSE);
@@ -1080,7 +1074,7 @@
 	if (folderview) {
 		pos = gtk_scrolled_window_get_vadjustment(
 					GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-		height = pos->value;
+		height = gtk_adjustment_get_value(pos);
 	}
 
 	folder_set_ui_func(folder, folderview_scan_tree_func, NULL);
@@ -1121,7 +1115,7 @@
 	if (folderview) {
 		pos = gtk_scrolled_window_get_vadjustment(
 					GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-		height = pos->value;
+		height = gtk_adjustment_get_value(pos);
 	}
 
 	folder_set_ui_func(folder, folderview_scan_tree_func, NULL);
@@ -1467,7 +1461,7 @@
 	}
 	switch (stype) {
 	case F_INBOX:
-		if (item->hide_read_msgs) {
+		if (item->hide_read_msgs || item->hide_read_threads) {
 			xpm = mark?m_inboxhrmxpm:inboxhrmxpm;
 			openxpm = mark?m_inboxopenhrmxpm:inboxopenhrmxpm;
 		} else {
@@ -1476,7 +1470,7 @@
 		}
 		break;
 	case F_OUTBOX:
-		if (item->hide_read_msgs) {
+		if (item->hide_read_msgs || item->hide_read_threads) {
 			xpm = mark?m_outboxhrmxpm:outboxhrmxpm;
 			openxpm = mark?m_outboxopenhrmxpm:outboxopenhrmxpm;
 		} else {
@@ -1485,7 +1479,7 @@
 		}
 		break;
 	case F_QUEUE:
-		if (item->hide_read_msgs) {
+		if (item->hide_read_msgs || item->hide_read_threads) {
 			xpm = mark?m_queuehrmxpm:queuehrmxpm;
 			openxpm = mark?m_queueopenhrmxpm:queueopenhrmxpm;
 		} else {
@@ -1494,7 +1488,7 @@
 		}
 		break;
 	case F_TRASH:
-		if (item->hide_read_msgs) {
+		if (item->hide_read_msgs || item->hide_read_threads) {
 			xpm = mark?m_trashhrmxpm:trashhrmxpm;
 			openxpm = mark?m_trashopenhrmxpm:trashopenhrmxpm;
 		} else {
@@ -1507,7 +1501,7 @@
 		openxpm = mark?m_draftsopenxpm:draftsopenxpm;
 		break;
 	default:
-		if (item->hide_read_msgs) {
+		if (item->hide_read_msgs || item->hide_read_threads) {
 			xpm = mark?m_folderhrmxpm:folderhrmxpm;
 			openxpm = mark?m_folderopenhrmxpm:folderopenhrmxpm;
 		} else {
@@ -1595,7 +1589,7 @@
 			str = g_strdup_printf("%s", name);
 		}
 	}
-	gtk_sctree_set_node_info(ctree, node, str, FOLDER_SPACING,
+	gtk_cmctree_set_node_info(ctree, node, str, FOLDER_SPACING,
 				xpm, openxpm, 
 				FALSE, GTK_CMCTREE_ROW(node)->expanded);
 	g_free(str);
@@ -1691,7 +1685,7 @@
 		ctree = GTK_CMCTREE(folderview->ctree);
 
 		node = gtk_cmctree_find_by_row_data(ctree, NULL, item);
-		if (node) {
+		if (node && item->search_match != matches) {
 			item->search_match = matches;
 			folderview_update_node(folderview, node);
 		}
@@ -2019,10 +2013,10 @@
 		return FALSE;
 
 	switch (event->keyval) {
-	case GDK_Right:
+	case GDK_KEY_Right:
 #ifndef GENERIC_UMPC
-	case GDK_Return:
-	case GDK_KP_Enter:
+	case GDK_KEY_Return:
+	case GDK_KEY_KP_Enter:
 #endif
 		if (folderview->selected) {
 			folderview_select_node(folderview,
@@ -2030,7 +2024,7 @@
 		}
 		break;
 #ifdef GENERIC_UMPC
-	case GDK_Return:
+	case GDK_KEY_Return:
 		if (folderview->selected && GTK_CMCTREE_ROW(folderview->selected)->children) {
 			gtk_cmctree_toggle_expansion(
 				GTK_CMCTREE(folderview->ctree),
@@ -2038,7 +2032,7 @@
 		}
 		break;	
 #endif
-	case GDK_space:
+	case GDK_KEY_space:
 		BREAK_ON_MODIFIER_KEY();
 		if (folderview->selected) {
 			if (folderview->opened == folderview->selected &&
@@ -2173,7 +2167,7 @@
 		gtk_cmctree_expand(ctree, row);
 
 	/* ungrab the mouse event */
-	if (gtkut_widget_has_grab(GTK_WIDGET(ctree))) {
+	if (gtk_widget_has_grab(GTK_WIDGET(ctree))) {
 		gtk_grab_remove(GTK_WIDGET(ctree));
 		if (gdk_pointer_is_grabbed())
 			gdk_pointer_ungrab(GDK_CURRENT_TIME);
@@ -2647,7 +2641,7 @@
 	FolderItem *item = folderview_get_selected_item(folderview);
 	GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
 				GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-	gint height = pos->value;
+	gint height = gtk_adjustment_get_value(pos);
 
 	if (!last_smallfont || strcmp(last_smallfont, SMALL_FONT) ||
 			!last_normalfont || strcmp(last_normalfont, NORMAL_FONT) ||
@@ -2770,7 +2764,7 @@
 			if (item) {
 				source = g_strdup_printf ("FROM_OTHER_FOLDER%s", folder_item_get_identifier(item));
 				gtk_selection_data_set(selection_data,
-						       selection_data->target, 8,
+						       gtk_selection_data_get_target(selection_data), 8,
 						       source, strlen(source));
 				break;
 			} else
@@ -2823,8 +2817,9 @@
 	FolderView *folderview = (FolderView *)data;
 	GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
 				GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-	gint new_val = (int)pos->value + folderview->scroll_value;
-	gint max = (int)pos->upper - (int)pos->page_size;
+	gint new_val = (int)gtk_adjustment_get_value(pos) + folderview->scroll_value;
+	gint max = (int)gtk_adjustment_get_upper(pos) -
+               (int)gtk_adjustment_get_page_size(pos);
 
 	if (folderview->scroll_value == 0) {
 		folderview->scroll_timeout_id = -1;
@@ -2854,9 +2849,9 @@
 	gboolean acceptable = FALSE;
 	GtkAdjustment *pos = gtk_scrolled_window_get_vadjustment(
 				GTK_SCROLLED_WINDOW(folderview->scrolledwin));
-	int height = (int)pos->page_size;
-	int total_height = (int)pos->upper;
-	int vpos = (int) pos->value;
+	int height = (int)gtk_adjustment_get_page_size(pos);
+	int total_height = (int)gtk_adjustment_get_upper(pos);
+	int vpos = (int)gtk_adjustment_get_value(pos);
 	int offset = prefs_common.show_col_headers ? 24:0;
 	int dist;
 
@@ -2925,7 +2920,7 @@
 			(G_OBJECT(widget),
 			 G_CALLBACK(folderview_selected), folderview);
 		gdk_drag_status(context, 
-					(context->actions == GDK_ACTION_COPY ?
+					(gdk_drag_context_get_actions(context) == GDK_ACTION_COPY ?
 					GDK_ACTION_COPY : GDK_ACTION_MOVE) , time);
 	} else {
 		if (folderview->opened)
@@ -3013,7 +3008,8 @@
 
 	if (info == TARGET_DUMMY) {
 		drag_state_stop(folderview);
-		if ((void *)strstr(data->data, "FROM_OTHER_FOLDER") != (void *)data->data) {
+		const gchar *ddata = (const gchar *)gtk_selection_data_get_data(data);
+		if ((gchar *)strstr(ddata, "FROM_OTHER_FOLDER") != ddata) {
 			/* comes from summaryview */
 			if (gtk_cmclist_get_selection_info
 				(GTK_CMCLIST(widget), x - offset, y - offset, &row, &column) == 0)
@@ -3034,7 +3030,7 @@
 				return;
 			}
 			if (item && src_item) {
-				switch (drag_context->action) {
+				switch (gdk_drag_context_get_selected_action(drag_context)) {
 				case GDK_ACTION_COPY:
 					summary_copy_selected_to(folderview->summaryview, item);
 					gtk_drag_finish(drag_context, TRUE, FALSE, time);
@@ -3054,9 +3050,10 @@
 			/* comes from folderview */
 			char *source;
 			gboolean folder_is_normal = TRUE;
-			gboolean copy = (drag_context->action == GDK_ACTION_COPY);
+			gboolean copy = (GDK_ACTION_COPY ==
+				gdk_drag_context_get_selected_action(drag_context));
 
-			source = data->data + 17;
+			source = (char *)gtk_selection_data_get_data(data) + 17;
 			if (gtk_cmclist_get_selection_info
 			    (GTK_CMCLIST(widget), x - offset, y - offset, &row, &column) == 0
 			    || *source == 0) {
@@ -3100,7 +3097,8 @@
 			debug_print("no item\n");
 			return;
 		}
-		folderview_finish_dnd(data->data, drag_context, time, item);
+		folderview_finish_dnd(gtk_selection_data_get_data(data),
+			drag_context, time, item);
 	}
 }
 

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.328.2.1
retrieving revision 1.274.2.328.2.2
diff -u -d -r1.274.2.328.2.1 -r1.274.2.328.2.2
--- mainwindow.c	7 Sep 2011 15:52:26 -0000	1.274.2.328.2.1
+++ mainwindow.c	29 Nov 2011 00:15:21 -0000	1.274.2.328.2.2
@@ -251,6 +251,8 @@
 
 static void hide_read_messages   (GtkAction	*action,
 				  gpointer	 data);
+static void hide_read_threads   (GtkAction	*action,
+				  gpointer	 data);
 static void hide_del_messages   (GtkAction	*action,
 				  gpointer	 data);
 
@@ -767,6 +769,7 @@
 #endif
 	{"View/ShowHide/ColumnHeaders",		NULL, N_("Column headers"), NULL, NULL, G_CALLBACK(toggle_col_headers_cb) }, /* toggle */
 	{"View/ThreadView",			NULL, N_("Th_read view"), "<control>T", NULL, G_CALLBACK(thread_cb) }, /* toggle */
+	{"View/HideReadThreads",		NULL, N_("Hide read threads"), NULL, NULL, G_CALLBACK(hide_read_threads) }, /* toggle */
 	{"View/HideReadMessages",		NULL, N_("_Hide read messages"), NULL, NULL, G_CALLBACK(hide_read_messages) }, /* toggle */
 	{"View/HideDelMessages",		NULL, N_("Hide deleted messages"), NULL, NULL, G_CALLBACK(hide_del_messages) }, /* toggle */
 #ifndef MAEMO
@@ -896,7 +899,7 @@
 	GtkMenuShell *menu;
 	GtkCheckMenuItem **items;
 	gint n;
-	GList *cur;
+	GList *children, *cur;
 	GSList *sel;
 
 	mainwin = (MainWindow *)data;
@@ -916,7 +919,8 @@
 			  GINT_TO_POINTER(1));
 
 	/* clear items. get item pointers. */
-	for (n = 0, cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (n = 0, cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gtk_check_menu_item_set_active
 				(GTK_CHECK_MENU_ITEM(cur->data), FALSE);
@@ -925,6 +929,8 @@
 		}
 	}
 
+	g_list_free(children);
+
 	if (n == (N_COLOR_LABELS + 1)) {
 		/* iterate all messages and set the state of the appropriate
 		 * items */
@@ -935,7 +941,7 @@
 			msginfo = (MsgInfo *)sel->data;
 			if (msginfo) {
 				clabel = MSG_GET_COLORLABEL_VALUE(msginfo->flags);
-				if (!items[clabel]->active)
+				if (!gtk_check_menu_item_get_active(items[clabel]))
 					gtk_check_menu_item_set_active
 						(items[clabel], TRUE);
 			}
@@ -971,7 +977,7 @@
 {
 	MainWindow *mainwin;
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 	GSList *sel;
 	GHashTable *menu_table = g_hash_table_new_full(
 					g_direct_hash,
@@ -997,7 +1003,8 @@
 			  GINT_TO_POINTER(1));
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gint id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cur->data),
 				"tag_id"));
@@ -1009,6 +1016,8 @@
 		}
 	}
 
+	g_list_free(children);
+
 	/* iterate all messages and set the state of the appropriate
 	 * items */
 	sel_len = 0;
@@ -1028,7 +1037,7 @@
 				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 && !item->active) {
+				if (item && !gtk_check_menu_item_get_active(item)) {
 					gtk_check_menu_item_set_active
 						(item, TRUE);
 				}
@@ -1038,7 +1047,8 @@
 		}
 	}
 
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		if (GTK_IS_CHECK_MENU_ITEM(cur->data)) {
 			gint id = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(cur->data),
 				"tag_id"));
@@ -1049,6 +1059,7 @@
 				gtk_check_menu_item_set_inconsistent(GTK_CHECK_MENU_ITEM(cur->data), FALSE);
 		}
 	}
+	g_list_free(children);
 	g_slist_free(sel);
 	g_hash_table_destroy(menu_table);
 	g_hash_table_destroy(menu_allsel_table);
@@ -1087,13 +1098,9 @@
 			GtkLabel *label = g_object_get_data(G_OBJECT(item), "accel_label");
 			gchar *new_accel;
 			
-			if (keyval == GDK_BackSpace) {
+			if (keyval == GDK_KEY_BackSpace) {
 				const gchar *accel_path;
-#if GTK_CHECK_VERSION(2,14,0)
 				accel_path = gtk_menu_item_get_accel_path(item);
-#else
-				accel_path = GTK_MENU_ITEM(item)->accel_path;
-#endif
 				keyval = 0; modifier = 0;
 				gtk_accel_map_change_entry (accel_path, keyval, modifier, TRUE);
 			}
@@ -1285,7 +1292,7 @@
 				       GdkEventVisibility *event,
 				       MainWindow *mainwindow)
 {
-	gdk_window_set_cursor(mainwindow->warning_btn->window, hand_cursor);
+	gdk_window_set_cursor(gtk_widget_get_window(mainwindow->warning_btn), hand_cursor);
 	return FALSE;
 }
 
@@ -1293,7 +1300,7 @@
 				      GdkEventCrossing *event,
 				      MainWindow *mainwindow)
 {
-	gdk_window_set_cursor(mainwindow->warning_btn->window, NULL);
+	gdk_window_set_cursor(gtk_widget_get_window(mainwindow->warning_btn), NULL);
 	return FALSE;
 }
 
@@ -1301,7 +1308,7 @@
 				      GdkEventCrossing *event,
 				      MainWindow *mainwindow)
 {
-	gdk_window_set_cursor(mainwindow->warning_btn->window, hand_cursor);
+	gdk_window_set_cursor(gtk_widget_get_window(mainwindow->warning_btn), hand_cursor);
 	return FALSE;
 }
 #endif
@@ -1334,7 +1341,7 @@
 	}
 
 	switch (event->keyval) {
-	case GDK_Q:             /* Quit */
+	case GDK_KEY_Q:             /* Quit */
 #ifndef MAEMO
 		BREAK_ON_MODIFIER_KEY();
 
@@ -1343,7 +1350,7 @@
 		}
 #endif
 		return FALSE;
-	case GDK_space:
+	case GDK_KEY_space:
 		BREAK_ON_MODIFIER_KEY();
 		if (gtk_window_is_active(GTK_WINDOW(mainwin->window))) {
 			if (mainwin->folderview != NULL && mainwin->summaryview != NULL
@@ -1359,14 +1366,14 @@
 		break;
 
 #ifdef MAEMO
-	case GDK_F6:
+	case GDK_KEY_F6:
 		if (maemo_mainwindow_is_fullscreen(widget)) {
                 	gtk_window_unfullscreen(GTK_WINDOW(widget));
                 } else {
                 	gtk_window_fullscreen(GTK_WINDOW(widget));
                 }
 		break;
-	case GDK_F7:
+	case GDK_KEY_F7:
 		{
 			PangoFontDescription *font_desc;
 			int size;
@@ -1390,7 +1397,7 @@
 			pango_font_description_free(font_desc);
 		}
 		break;
-	case GDK_F8:
+	case GDK_KEY_F8:
 		{
 			PangoFontDescription *font_desc;
 			int size;
@@ -1414,7 +1421,7 @@
 			pango_font_description_free(font_desc);
 		}
 		break;
-	case GDK_Escape:
+	case GDK_KEY_Escape:
 		if (mainwin->summaryview && 
 		    mainwin->summaryview->ext_messageview && 
 		    mainwin->summaryview->ext_messageview->window && 
@@ -1542,16 +1549,17 @@
 	GtkWidget *offline_pixmap;
 	GtkWidget *warning_icon;
 	GtkWidget *warning_btn;
-	CLAWS_TIP_DECL();
 #endif
 	GtkWidget *online_switch;
 	GtkWidget *offline_switch;
 	FolderView *folderview;
 	SummaryView *summaryview;
 	MessageView *messageview;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GdkColormap *colormap;
-	GdkColor color[4];
 	gboolean success[4];
+#endif
+	GdkColor color[4];
 	GtkWidget *ac_menu;
 	gint i;
 
@@ -1717,6 +1725,7 @@
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "ThreadView", "View/ThreadView", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "ExpandThreads", "View/ExpandThreads", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "CollapseThreads", "View/CollapseThreads", GTK_UI_MANAGER_MENUITEM)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "HideReadThreads", "View/HideReadThreads", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "HideReadMessages", "View/HideReadMessages", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "HideDelMessages", "View/HideDelMessages", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator3", "View/---", GTK_UI_MANAGER_SEPARATOR)
@@ -2202,12 +2211,14 @@
 	color[2] = folderview->color_new;
 	color[3] = folderview->color_op;
 
-	colormap = gdk_drawable_get_colormap(window->window);
+#if !GTK_CHECK_VERSION(3, 0, 0)
+	colormap = gdk_drawable_get_colormap(gtk_widget_get_window(window));
 	gdk_colormap_alloc_colors(colormap, color, 4, FALSE, TRUE, success);
 	for (i = 0; i < 4; i++) {
 		if (success[i] == FALSE)
 			g_warning("MainWindow: color allocation %d failed\n", i);
 	}
+#endif
 
 	debug_print("done.\n");
 
@@ -2275,12 +2286,6 @@
 
 	ADD_MENU_ACCEL_GROUP_TO_WINDOW(summaryview->popupmenu, mainwin->window);
 	
-#ifndef GENERIC_UMPC
-#ifdef G_OS_UNIX
-	gtk_window_iconify(GTK_WINDOW(mainwin->window));
-#endif
-#endif
-
 	g_signal_connect(G_OBJECT(window), "window_state_event",
 			 G_CALLBACK(mainwindow_state_event_cb), mainwin);
 	g_signal_connect(G_OBJECT(window), "visibility_notify_event",
@@ -2293,8 +2298,6 @@
 	}
 	summary_update_unread(mainwin->summaryview, NULL);
 	
-	gtk_widget_show(mainwin->window);
-
 	/* initialize views */
 	folderview_init(folderview);
 	summary_init(summaryview);
@@ -2343,7 +2346,7 @@
 {
 
 	if (mainwin->cursor_count == 0) {
-		gdk_window_set_cursor(mainwin->window->window, watch_cursor);
+		gdk_window_set_cursor(gtk_widget_get_window(mainwin->window), watch_cursor);
 		textview_cursor_wait(mainwin->messageview->mimeview->textview);
 	}
 	
@@ -2358,7 +2361,7 @@
 		mainwin->cursor_count--;
 
 	if (mainwin->cursor_count == 0) {
-		gdk_window_set_cursor(mainwin->window->window, NULL);
+		gdk_window_set_cursor(gtk_widget_get_window(mainwin->window), NULL);
 		textview_cursor_normal(mainwin->messageview->mimeview->textview);
 	}
 	gdk_flush();
@@ -2478,20 +2481,22 @@
 void main_window_reflect_prefs_custom_colors(MainWindow *mainwin)
 {
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 
 	/* re-create colorlabel submenu */
 	menu = GTK_MENU_SHELL(mainwin->colorlabel_menu);
 	cm_return_if_fail(menu != NULL);
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		g_signal_handlers_disconnect_matched
 			 (gtk_ui_manager_get_accel_group(mainwin->ui_manager), 
 			 G_SIGNAL_MATCH_DATA|G_SIGNAL_MATCH_FUNC,
 			 0, 0, NULL, mainwin_accel_changed_cb, cur->data);
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(cur->data), NULL);
 	}
+	g_list_free(children);
 	mainwindow_colorlabel_menu_create(mainwin, TRUE);
 	summary_reflect_prefs_custom_colors(mainwin->summaryview);
 	folderview_reinit_fonts(mainwin->folderview);
@@ -2501,7 +2506,7 @@
 static gboolean main_window_reflect_tags_changes_real(gpointer data)
 {
 	GtkMenuShell *menu;
-	GList *cur;
+	GList *children, *cur;
 	MainWindow *mainwin = (MainWindow *)data;
 
 	if (summary_is_locked(mainwin->summaryview)) {
@@ -2513,9 +2518,11 @@
 	cm_return_val_if_fail(menu != NULL, FALSE);
 
 	/* clear items. get item pointers. */
-	for (cur = menu->children; cur != NULL && cur->data != NULL; cur = cur->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur = children; cur != NULL && cur->data != NULL; cur = cur->next) {
 		gtk_menu_item_set_submenu(GTK_MENU_ITEM(cur->data), NULL);
 	}
+	g_list_free(children);
 	mainwindow_tags_menu_create(mainwin, TRUE);
 	summary_reflect_tags_changes(mainwin->summaryview);
 	
@@ -2596,7 +2603,7 @@
 static void main_window_set_account_receive_menu(MainWindow *mainwin,
 						 GList *account_list)
 {
-	GList *cur_ac, *cur_item;
+	GList *children, *child;
 	GtkWidget *menu;
 	GtkWidget *menuitem;
 	PrefsAccount *ac_prefs;
@@ -2605,23 +2612,24 @@
 		gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive")));
 
 	/* search for separator */
-	for (cur_item = GTK_MENU_SHELL(menu)->children; cur_item != NULL;
-	     cur_item = cur_item->next) {
-		if (cur_item->data == gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive/Separator1")) {
-			cur_item = cur_item->next;
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (child = children; child != NULL; child = child->next) {
+		if (child->data == gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive/Separator1")) {
+			child = child->next;
 			break;
 		}
 	}
 
 	/* destroy all previous menu item */
-	while (cur_item != NULL) {
-		GList *next = cur_item->next;
-		gtk_widget_destroy(GTK_WIDGET(cur_item->data));
-		cur_item = next;
+	while (child != NULL) {
+		gtk_widget_destroy(GTK_WIDGET(child->data));
+		child = child->next;
 	}
 
-	for (cur_ac = account_list; cur_ac != NULL; cur_ac = cur_ac->next) {
-		ac_prefs = (PrefsAccount *)cur_ac->data;
+	g_list_free(children);
+
+	for (child = account_list; child != NULL; child = child->next) {
+		ac_prefs = (PrefsAccount *)child->data;
 
 		if (ac_prefs->protocol == A_NONE)
 			continue;
@@ -2773,11 +2781,11 @@
 	g_object_ref(summary_wid);
 	g_object_ref(message_wid);
 	gtkut_container_remove
-		(GTK_CONTAINER(folder_wid->parent), folder_wid);
+		(GTK_CONTAINER(gtk_widget_get_parent(folder_wid)), folder_wid);
 	gtkut_container_remove
-		(GTK_CONTAINER(summary_wid->parent), summary_wid);
+		(GTK_CONTAINER(gtk_widget_get_parent(summary_wid)), summary_wid);
 	gtkut_container_remove
-		(GTK_CONTAINER(message_wid->parent), message_wid);
+		(GTK_CONTAINER(gtk_widget_get_parent(message_wid)), message_wid);
 
 	gtk_widget_hide(mainwin->window);
 	main_window_set_widgets(mainwin, layout_mode);
@@ -2848,7 +2856,7 @@
 	case SMALL_LAYOUT:
 		ppaned = mainwin->vpaned;
 		container = mainwin->hpaned;
-		if (ppaned->parent != NULL) {
+		if (gtk_widget_get_parent(ppaned) != NULL) {
 			mainwin->messageview->visible = FALSE;
 			summaryview->displayed = NULL;
 			g_object_ref(ppaned);
@@ -2864,7 +2872,7 @@
 	case WIDE_LAYOUT:
 		ppaned = mainwin->hpaned;
 		container = mainwin->vpaned;
-		if (mainwin->messageview->vbox->parent != NULL) {
+		if (gtk_widget_get_parent(mainwin->messageview->vbox) != NULL) {
 			mainwin->messageview->visible = FALSE;
 			summaryview->displayed = NULL;
 			g_object_ref(mainwin->messageview->vbox);
@@ -2906,7 +2914,7 @@
 
 void main_window_get_size(MainWindow *mainwin)
 {
-	GtkAllocation *allocation;
+	GtkAllocation allocation;
 
 	if (mainwin_list == NULL || mainwin->messageview == NULL) {
 		debug_print("called after messageview "
@@ -2914,41 +2922,41 @@
 		return;
 	}
 
-	allocation = &(GTK_WIDGET_PTR(mainwin->summaryview)->allocation);
-	
 	if (prefs_common.mainwin_fullscreen) {
 		debug_print("mainwin in full screen state. "
 			    "Keeping original settings\n");
 	}
-	if (allocation->width > 1 && allocation->height > 1 && !prefs_common.mainwin_fullscreen) {
-		prefs_common.summaryview_width = allocation->width;
+
+	gtk_widget_get_allocation(GTK_WIDGET_PTR(mainwin->summaryview), &allocation);
+	if (allocation.width > 1 && allocation.height > 1 && !prefs_common.mainwin_fullscreen) {
+		prefs_common.summaryview_width = allocation.width;
 
 		if (messageview_is_visible(mainwin->messageview))
-			prefs_common.summaryview_height = allocation->height;
+			prefs_common.summaryview_height = allocation.height;
 
-		prefs_common.mainview_width = allocation->width;
+		prefs_common.mainview_width = allocation.width;
 	}
 
-	allocation = &mainwin->window->allocation;
-	if (allocation->width > 1 && allocation->height > 1 &&
+	gtk_widget_get_allocation(mainwin->window, &allocation);
+	if (allocation.width > 1 && allocation.height > 1 &&
 	    !prefs_common.mainwin_maximised && !prefs_common.mainwin_fullscreen) {
-		prefs_common.mainview_height = allocation->height;
-		prefs_common.mainwin_width   = allocation->width;
-		prefs_common.mainwin_height  = allocation->height;
+		prefs_common.mainview_height = allocation.height;
+		prefs_common.mainwin_width   = allocation.width;
+		prefs_common.mainwin_height  = allocation.height;
 	}
 
-	allocation = &(GTK_WIDGET_PTR(mainwin->folderview)->allocation);
-	if (allocation->width > 1 && allocation->height > 1 &&
+	gtk_widget_get_allocation(GTK_WIDGET_PTR(mainwin->folderview), &allocation);
+	if (allocation.width > 1 && allocation.height > 1 &&
 	    !prefs_common.mainwin_fullscreen) {
-		prefs_common.folderview_width  = allocation->width;
-		prefs_common.folderview_height = allocation->height;
+		prefs_common.folderview_width  = allocation.width;
+		prefs_common.folderview_height = allocation.height;
 	}
-
-	allocation = &(GTK_WIDGET_PTR(mainwin->messageview)->allocation);
-	if (allocation->width > 1 && allocation->height > 1 &&
+	
+	gtk_widget_get_allocation(GTK_WIDGET_PTR(mainwin->messageview), &allocation);
+	if (allocation.width > 1 && allocation.height > 1 &&
 	    !prefs_common.mainwin_fullscreen) {
-		prefs_common.msgview_width = allocation->width;
-		prefs_common.msgview_height = allocation->height;
+		prefs_common.msgview_width = allocation.width;
+		prefs_common.msgview_height = allocation.height;
 	}
 
 /*	debug_print("summaryview size: %d x %d\n",
@@ -3082,6 +3090,10 @@
 		if ((selection == SUMMARY_NONE && item->hide_read_msgs)
 		    || selection != SUMMARY_NONE)
 			state |= M_HIDE_READ_MSG;
+
+		if ((selection == SUMMARY_NONE && item->hide_read_threads)
+		    || selection != SUMMARY_NONE)
+			state |= M_HIDE_READ_THREADS;
 	}		
 	if (mainwin->summaryview->threaded)
 		state |= M_THREADED;
@@ -3188,7 +3200,7 @@
 	SummaryView *summaryview;
 	gchar *menu_path;
 	GtkWidget *menu;
-	GList *cur_item;
+	GList *children, *cur_item;
 	gint i;
 
 	static const struct {
@@ -3210,6 +3222,7 @@
 		{"Menu/View/ThreadView"               , M_EXEC|M_SUMMARY_ISLIST},
 		{"Menu/View/ExpandThreads"        , M_MSG_EXIST|M_SUMMARY_ISLIST},
 		{"Menu/View/CollapseThreads"      , M_MSG_EXIST|M_SUMMARY_ISLIST},
+		{"Menu/View/HideReadThreads"	   , M_HIDE_READ_THREADS|M_SUMMARY_ISLIST},
 		{"Menu/View/HideReadMessages"	   , M_HIDE_READ_MSG|M_SUMMARY_ISLIST},
 		{"Menu/View/HideDelMessages"	   , M_SUMMARY_ISLIST},
 		{"Menu/View/Goto/Prev"        , M_MSG_EXIST},
@@ -3294,8 +3307,8 @@
 	menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(
 		gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive")));
 
-	for (cur_item = GTK_MENU_SHELL(menu)->children; cur_item != NULL;
-	     cur_item = cur_item->next) {
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (cur_item = children; cur_item != NULL; cur_item = cur_item->next) {
 		if (cur_item->data == gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive/Separator1")) {
 			cur_item = cur_item->next;
 			break;
@@ -3307,6 +3320,8 @@
 					 (M_UNLOCKED & state) != 0);
 	}
 
+	g_list_free(children);
+
 	main_window_menu_callback_block(mainwin);
 
 	cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/ShowHide/MessageView",
@@ -3368,12 +3383,20 @@
 	&&  mainwin->messageview->mimeview
 	&&  mainwin->messageview->mimeview->textview)
 		cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/AllHeaders",
-			      mainwin->messageview->mimeview->textview->show_all_headers);
+			      			prefs_common.show_all_headers);
 	cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/ThreadView", (state & M_THREADED) != 0);
+	cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/ExpandThreads", (state & M_THREADED) != 0);
+	cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/CollapseThreads", (state & M_THREADED) != 0);
+	cm_menu_set_sensitive_full(mainwin->ui_manager, "Menu/View/HideReadThreads", (state & M_THREADED) != 0);
 	cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/CollapseAll", (prefs_common.hide_quotes == 1));
 	cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse2", (prefs_common.hide_quotes == 2));
 	cm_toggle_menu_set_active_full(mainwin->ui_manager, "Menu/View/Quotes/Collapse3", (prefs_common.hide_quotes == 3));
 
+	if (mainwin->summaryview->folder_item && mainwin->summaryview->folder_item->hide_read_msgs)
+		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);
+		
 	main_window_menu_callback_unblock(mainwin);
 }
 
@@ -3446,19 +3469,19 @@
 	GtkWidget *item, *menu;
 	const gchar *url_pt ;
 	gchar url_decoded[BUFFSIZE];
-	GList *amenu, *alist;
+	GList *children, *amenu;
 	gint menu_nb = 0;
 	
 	menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(menuitem));
 	
 	/* 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;
+	children = gtk_container_get_children(GTK_CONTAINER(menu));
+	for (amenu = children; amenu; amenu = amenu->next) {
 		item = GTK_WIDGET (amenu->data);
 		gtk_widget_destroy (item);
-		amenu = alist;
 	}
+	g_list_free(children);
 	if (list_header) {
 		for (url_pt = list_header; url_pt && *url_pt;) {
 			get_url_part (&url_pt, url_decoded, BUFFSIZE);
@@ -3597,20 +3620,18 @@
 {
 	static gboolean first_start = TRUE;
 
-	if (!gtkut_widget_get_visible(GTK_WIDGET(mainwin->window)))
+	if (!gtk_widget_get_visible(GTK_WIDGET(mainwin->window)))
 		main_window_show(mainwin);
 
 	if (prefs_common.mainwin_maximised)
 		gtk_window_maximize(GTK_WINDOW(mainwin->window));
 
 	if (first_start) {
-#ifdef G_OS_UNIX
-		gtk_window_deiconify(GTK_WINDOW(mainwin->window));
-#endif
 		first_start = FALSE;
 	} else {
 		gtkut_window_popup(mainwin->window);
 	}
+
 	if (prefs_common.layout_mode == SMALL_LAYOUT) {
 		if (mainwin->in_folder) {
 			mainwindow_enter_folder(mainwin);
@@ -3629,7 +3650,7 @@
         gtk_window_move(GTK_WINDOW(mainwin->window),
                                  prefs_common.mainwin_x,
                                  prefs_common.mainwin_y);
-
+	
 	gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
 			     prefs_common.folderview_width,
 			     prefs_common.folderview_height);
@@ -3661,33 +3682,13 @@
 	gboolean first_set = (mainwin->hpaned == NULL);
 	debug_print("Setting widgets... ");
 
-	if (layout_mode == SMALL_LAYOUT && first_set) {
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
-				    prefs_common.folderview_width,
-				    prefs_common.folderview_height);
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
-				    0,0);
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
-				    0,0);
-	} else {
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
-				    prefs_common.folderview_width,
-				    prefs_common.folderview_height);
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
-				    prefs_common.summaryview_width,
-				    prefs_common.summaryview_height);
-		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
-				    prefs_common.msgview_width,
-				    prefs_common.msgview_height);
-	}
-
 #ifndef GENERIC_UMPC
 	mainwin->messageview->statusbar = mainwin->statusbar;
 	mainwin->messageview->statusbar_cid = mainwin->messageview_cid;
 #endif
 	/* clean top-most container */
 	if (mainwin->hpaned) {
-		if (mainwin->hpaned->parent == mainwin->vpaned)
+		if (gtk_widget_get_parent(mainwin->hpaned) == mainwin->vpaned)
 			gtk_widget_destroy(mainwin->vpaned);
 		else
 			gtk_widget_destroy(mainwin->hpaned);
@@ -3803,6 +3804,19 @@
 				prefs_common.mainwin_width,
 				prefs_common.mainwin_height);
 		gtk_paned_set_position(GTK_PANED(mainwin->hpaned), 800);
+	} else {
+		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->folderview),
+				    prefs_common.folderview_width,
+				    prefs_common.folderview_height);
+		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->summaryview),
+				    prefs_common.summaryview_width,
+				    prefs_common.summaryview_height);
+		gtk_widget_set_size_request(GTK_WIDGET_PTR(mainwin->messageview),
+				    prefs_common.msgview_width,
+				    prefs_common.msgview_height);
+		gtk_widget_set_size_request(GTK_WIDGET(mainwin->window),
+				    prefs_common.mainwin_width,
+				    prefs_common.mainwin_height);
 	} 
 	/* remove headerview if not in prefs */
 	headerview_set_visibility(mainwin->messageview->headerview,
@@ -4132,12 +4146,12 @@
 	if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (gaction))) {
 		gtk_cmclist_column_titles_show(GTK_CMCLIST(folderview->ctree));
 		gtk_cmclist_column_titles_show(GTK_CMCLIST(summaryview->ctree));
-  		gtk_cmclist_column_titles_show(GTK_CMCLIST(mimeview->ctree));
+  		gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(mimeview->ctree), TRUE);
 		prefs_common.show_col_headers = TRUE;
 	} else {
 		gtk_cmclist_column_titles_hide(GTK_CMCLIST(folderview->ctree));
 		gtk_cmclist_column_titles_hide(GTK_CMCLIST(summaryview->ctree));
-   		gtk_cmclist_column_titles_hide(GTK_CMCLIST(mimeview->ctree));		
+   		gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(mimeview->ctree), FALSE);		
 		prefs_common.show_col_headers = FALSE;
 	}
 }
@@ -4367,7 +4381,7 @@
 {
 	MainWindow *mainwin = (MainWindow *)data;
 	if (mainwin->menu_lock_count) return;
-	mainwin->summaryview->messageview->all_headers = 
+	prefs_common.show_all_headers = 
 			gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 	summary_display_msg_selected(mainwin->summaryview,
 				     gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action)));
@@ -4500,7 +4514,7 @@
 	MainWindow *mainwin = (MainWindow *)data;
 	if (!mainwin->summaryview->displayed && mainwin->summaryview->selected) {
 		summary_display_msg_selected(mainwin->summaryview, 
-			mainwin->messageview->mimeview->textview->show_all_headers);
+					     prefs_common.show_all_headers);
 	}
 	messageview_list_urls(mainwin->messageview);
 }
@@ -4563,6 +4577,16 @@
 	summary_toggle_show_del_messages(mainwin->summaryview);
 }
 
+static void hide_read_threads (GtkAction *action, gpointer data)
+{
+	MainWindow *mainwin = (MainWindow *)data;
+	GtkWidget *menuitem = gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/View/HideReadThreads");
+	if (!mainwin->summaryview->folder_item
+	    || g_object_get_data(G_OBJECT(menuitem), "dont_toggle"))
+		return;
+	summary_toggle_show_read_threads(mainwin->summaryview);
+}
+
 static void thread_cb(GtkAction *action, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
@@ -4866,7 +4890,7 @@
 	MessageView *msgview = mainwin->messageview;
 
 	if (messageview_is_visible(msgview) &&
-		 (gtkut_widget_has_focus(msgview->mimeview->textview->text)))
+		 (gtk_widget_has_focus(msgview->mimeview->textview->text)))
 		messageview_select_all(mainwin->messageview);
 	else
 		summary_select_all(mainwin->summaryview);

Index: procheader.h
===================================================================
RCS file: /home/claws-mail/claws/src/procheader.h,v
retrieving revision 1.11.2.12
retrieving revision 1.11.2.12.2.1
diff -u -d -r1.11.2.12 -r1.11.2.12.2.1
--- procheader.h	16 Feb 2011 07:16:15 -0000	1.11.2.12
+++ procheader.h	29 Nov 2011 00:15:23 -0000	1.11.2.12.2.1
@@ -89,5 +89,11 @@
 gboolean procheader_headername_equal    (char * hdr1, char * hdr2);
 void procheader_header_free             (Header * header);
 
-gint procheader_get_header_from_msginfo(MsgInfo *msginfo, gchar *buf, gint len,gchar *header);
+gint procheader_get_header_from_msginfo	(MsgInfo	*msginfo,
+					 gchar		*buf,
+					 gint 		len,
+					 gchar 		*header);
+
+HeaderEntry *procheader_entries_from_str(const gchar	*str);
+void procheader_entries_free		(HeaderEntry	*entries);
 #endif /* __PROCHEADER_H__ */

Index: prefs_account.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_account.c,v
retrieving revision 1.105.2.168
retrieving revision 1.105.2.168.2.1
diff -u -d -r1.105.2.168 -r1.105.2.168.2.1
--- prefs_account.c	29 Aug 2011 15:42:10 -0000	1.105.2.168
+++ prefs_account.c	29 Nov 2011 00:15:21 -0000	1.105.2.168.2.1
@@ -34,7 +34,9 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
+#if !GTK_CHECK_VERSION(3, 0, 0)
 #include "gtkcmoptionmenu.h"
+#endif
 #include "main.h"
 #include "prefs_gtk.h"
 #include "prefs_account.h"
@@ -152,7 +154,7 @@
 	GtkWidget *frame_maxarticle;
 	GtkWidget *maxarticle_label;
 	GtkWidget *maxarticle_spinbtn;
-	GtkObject *maxarticle_spinbtn_adj;
+	GtkAdjustment *maxarticle_spinbtn_adj;
 } ReceivePage;
 
 typedef struct SendPage
@@ -283,8 +285,10 @@
 	GtkWidget *nntpport_spinbtn;
 	GtkWidget *domain_checkbtn;
 	GtkWidget *domain_entry;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *crosspost_checkbtn;
  	GtkWidget *crosspost_colormenu;
+#endif
 
 #ifndef G_OS_WIN32
 	GtkWidget *tunnelcmd_checkbtn;
@@ -349,9 +353,11 @@
 static void prefs_account_enum_set_data_from_radiobtn	(PrefParam *pparam);
 static void prefs_account_enum_set_radiobtn		(PrefParam *pparam);
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void);
 static void prefs_account_crosspost_set_data_from_colormenu(PrefParam *pparam);
 static void prefs_account_crosspost_set_colormenu(PrefParam *pparam);
+#endif
 
 static void prefs_account_nntpauth_toggled(GtkToggleButton *button,
 					   gpointer user_data);
@@ -814,6 +820,7 @@
 	 &advanced_page.tunnelcmd_entry,
 	 prefs_set_data_from_entry, prefs_set_entry},
 #endif
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	{"mark_crosspost_read", "FALSE", &tmp_ac_prefs.mark_crosspost_read, P_BOOL,
 	 &advanced_page.crosspost_checkbtn,
 	 prefs_set_data_from_toggle, prefs_set_toggle},
@@ -822,6 +829,7 @@
 	 &advanced_page.crosspost_colormenu,
 	 prefs_account_crosspost_set_data_from_colormenu,
 	 prefs_account_crosspost_set_colormenu},
+#endif
 
 	{"set_sent_folder", "FALSE", &tmp_ac_prefs.set_sent_folder, P_BOOL,
 	 &advanced_page.sent_folder_checkbtn,
@@ -1382,8 +1390,7 @@
 	GtkWidget *frame2;
 	GtkWidget *maxarticle_label;
 	GtkWidget *maxarticle_spinbtn;
-	GtkObject *maxarticle_spinbtn_adj;
-	CLAWS_TIP_DECL();
+	GtkAdjustment *maxarticle_spinbtn_adj;
 
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);
@@ -2396,7 +2403,6 @@
 	GtkWidget *hbox;
 	GtkWidget *hbox_spc;
 	GtkWidget *label;
-	CLAWS_TIP_DECL();
 
 	vbox1 = gtk_vbox_new (FALSE, VSPACING);
 	gtk_widget_show (vbox1);
@@ -2609,9 +2615,11 @@
 	GtkWidget *checkbtn_domain;
 	GtkWidget *entry_domain;
 	gchar *tip_domain;
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	GtkWidget *checkbtn_crosspost;
  	GtkWidget *colormenu_crosspost;
  	GtkWidget *menu;
+#endif
 #ifndef G_OS_WIN32
 	GtkWidget *checkbtn_tunnelcmd;
 	GtkWidget *entry_tunnelcmd;
@@ -2628,8 +2636,6 @@
 	GtkWidget *trash_folder_checkbtn;
 	GtkWidget *trash_folder_entry;
 	GtkWidget *imap_use_trash_checkbtn;
-
-	CLAWS_TIP_DECL();
 	GtkSizeGroup *size_group = gtk_size_group_new(GTK_SIZE_GROUP_HORIZONTAL);
 #define PACK_HBOX(hbox) \
 	{ \
@@ -2710,6 +2716,7 @@
 	CLAWS_SET_TIP(imap_use_trash_checkbtn,
 			     _("Moves deleted mails to trash instead of using the \\Deleted flag without expunging."));
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 	PACK_CHECK_BUTTON (hbox1, checkbtn_crosspost, 
 			   _("Mark cross-posted messages as read and color:"));
 	g_signal_connect (G_OBJECT (checkbtn_crosspost), "toggled",
@@ -2723,6 +2730,7 @@
 	menu = colorlabel_create_color_menu();
 	gtk_cmoption_menu_set_menu (GTK_CMOPTION_MENU(colormenu_crosspost), menu);
 	SET_TOGGLE_SENSITIVITY(checkbtn_crosspost, colormenu_crosspost);
+#endif
 
 	PACK_HBOX (hbox1);
 #undef PACK_HBOX
@@ -2788,8 +2796,10 @@
 	page->nntpport_spinbtn		= spinbtn_nntpport;
 	page->domain_checkbtn		= checkbtn_domain;
 	page->domain_entry		= entry_domain;
+#if !GTK_CHECK_VERSION(3, 0, 0)
  	page->crosspost_checkbtn	= checkbtn_crosspost;
  	page->crosspost_colormenu	= colormenu_crosspost;
+#endif
 
 #ifndef G_OS_WIN32
 	page->tunnelcmd_checkbtn	= checkbtn_tunnelcmd;
@@ -3688,10 +3698,19 @@
 	if (cancelled && new_account) {
 		prefs_account_free(ac_prefs);
 		return NULL;
-	} else 
+	} else {
+		if (ac_prefs->recv_server)
+			g_strstrip(ac_prefs->recv_server);
+		if (ac_prefs->smtp_server)
+			g_strstrip(ac_prefs->smtp_server);
+		if (ac_prefs->nntp_server)
+			g_strstrip(ac_prefs->nntp_server);
+
 		return ac_prefs;
+	}
 }
 
+#if !GTK_CHECK_VERSION(3, 0, 0)
 static void crosspost_color_toggled(void)
 {
 	gboolean is_active;
@@ -3724,6 +3743,7 @@
 	menuitem = gtk_menu_get_active(GTK_MENU(menu));
 	gtk_menu_item_activate(GTK_MENU_ITEM(menuitem));
 }
+#endif
 
 static void pop_bfr_smtp_tm_set_sens(GtkWidget *widget, gpointer data)
 {
@@ -4155,8 +4175,10 @@
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_show(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_show(advanced_page.crosspost_checkbtn);
 		gtk_widget_show(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4251,8 +4273,10 @@
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4360,8 +4384,10 @@
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_show(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
 		gtk_widget_show(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_show(advanced_page.tunnelcmd_entry);
@@ -4454,8 +4480,10 @@
 		gtk_widget_hide(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4554,8 +4582,10 @@
 		gtk_widget_show(advanced_page.popport_hbox);
 		gtk_widget_hide(advanced_page.imapport_hbox);
 		gtk_widget_hide(advanced_page.nntpport_hbox);
+#if !GTK_CHECK_VERSION(3, 0, 0)
 		gtk_widget_hide(advanced_page.crosspost_checkbtn);
 		gtk_widget_hide(advanced_page.crosspost_colormenu);
+#endif
 #ifndef G_OS_WIN32
 		gtk_widget_hide(advanced_page.tunnelcmd_checkbtn);
 		gtk_widget_hide(advanced_page.tunnelcmd_entry);
@@ -4576,7 +4606,7 @@
 {
 	gboolean auth;
 
-	if (!gtkut_widget_get_sensitive (GTK_WIDGET (button)))
+	if (!gtk_widget_get_sensitive (GTK_WIDGET (button)))
 		return;
 	auth = gtk_toggle_button_get_active (button);
 	gtk_widget_set_sensitive(basic_page.uid_label,  auth);

Index: procheader.c
===================================================================
RCS file: /home/claws-mail/claws/src/procheader.c,v
retrieving revision 1.47.2.54
retrieving revision 1.47.2.54.2.1
diff -u -d -r1.47.2.54 -r1.47.2.54.2.1
--- procheader.c	16 Feb 2011 07:16:15 -0000	1.47.2.54
+++ procheader.c	29 Nov 2011 00:15:23 -0000	1.47.2.54.2.1
@@ -1033,3 +1033,51 @@
 
 	return 0;
 }
+
+HeaderEntry *procheader_entries_from_str(const gchar *str)
+{
+	HeaderEntry *entries = NULL, *he;
+	int numh = 0, i = 0;
+	gchar **names = NULL;
+	const gchar *s = str;
+
+	if (s == NULL) {
+		return NULL;
+	}
+	while (*s != '\0') {
+		if (*s == ' ') ++numh;
+		++s;
+	}
+	if (numh == 0) {
+		return NULL;
+	}
+	entries = g_new0(HeaderEntry, numh + 1); /* room for last NULL */
+	s = str;
+	++s; /* skip first space */
+	names = g_strsplit(s, " ", numh);
+	he = entries;
+	while (names[i]) {
+		he->name = g_strdup_printf("%s:", names[i]);
+		he->body = NULL;
+		he->unfold = FALSE;
+		++i, ++he;
+	}
+	he->name = NULL;
+	g_strfreev(names);
+	return entries;
+}
+
+void procheader_entries_free (HeaderEntry *entries)
+{
+	if (entries != NULL) {
+		HeaderEntry *he = entries;
+		while (he->name != NULL) {
+			g_free(he->name);
+			if (he->body != NULL)
+				g_free(he->body);
+			++he;			
+		}
+		g_free(entries);
+	}
+}
+

Index: editldap_basedn.c
===================================================================
RCS file: /home/claws-mail/claws/src/editldap_basedn.c,v
retrieving revision 1.10.2.18
retrieving revision 1.10.2.18.2.1
diff -u -d -r1.10.2.18 -r1.10.2.18.2.1
--- editldap_basedn.c	16 Feb 2011 07:15:57 -0000	1.10.2.18
+++ editldap_basedn.c	29 Nov 2011 00:15:20 -0000	1.10.2.18.2.1
@@ -74,7 +74,7 @@
 }
 
 static gboolean edit_ldap_bdn_key_pressed( GtkWidget *widget, GdkEventKey *event, gboolean *cancelled ) {
-	if (event && event->keyval == GDK_Escape) {
+	if (event && event->keyval == GDK_KEY_Escape) {
 		ldapedit_basedn_cancelled = TRUE;
 		gtk_main_quit();
 	}

Index: prefs_ext_prog.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_ext_prog.c,v
retrieving revision 1.3.2.26
retrieving revision 1.3.2.26.2.1
diff -u -d -r1.3.2.26 -r1.3.2.26.2.1
--- prefs_ext_prog.c	16 Feb 2011 07:16:12 -0000	1.3.2.26
+++ prefs_ext_prog.c	29 Nov 2011 00:15:22 -0000	1.3.2.26.2.1
@@ -82,7 +82,6 @@
 	GtkWidget *exteditor_entry;
 	GtkWidget *astextviewer_label;
 	GtkWidget *astextviewer_entry;
-	CLAWS_TIP_DECL();
 	int i = 0;
 	gchar *tmp;
 

Index: jpilot.c
===================================================================
RCS file: /home/claws-mail/claws/src/jpilot.c,v
retrieving revision 1.18.2.32
retrieving revision 1.18.2.32.2.1
diff -u -d -r1.18.2.32 -r1.18.2.32.2.1
--- jpilot.c	16 Feb 2011 07:16:04 -0000	1.18.2.32
+++ jpilot.c	29 Nov 2011 00:15:21 -0000	1.18.2.32.2.1
@@ -1610,9 +1610,9 @@
 			str[ ++len ] = '\0';
 		}
 	}
-	strcat( str, JPILOT_DBHOME_DIR );
-	strcat( str, G_DIR_SEPARATOR_S );
-	strcat( str, JPILOT_DBHOME_FILE );
+	strncat( str, JPILOT_DBHOME_DIR, WORK_BUFLEN );
+	strncat( str, G_DIR_SEPARATOR_S, WORK_BUFLEN );
+	strncat( str, JPILOT_DBHOME_FILE, WORK_BUFLEN );
 
 	/* Attempt to open */
 	if( ( fp = g_fopen( str, "rb" ) ) != NULL ) {

Index: noticeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/noticeview.c,v
retrieving revision 1.5.2.25
retrieving revision 1.5.2.25.2.1
diff -u -d -r1.5.2.25 -r1.5.2.25.2.1
--- noticeview.c	16 Feb 2011 07:16:11 -0000	1.5.2.25
+++ noticeview.c	29 Nov 2011 00:15:21 -0000	1.5.2.25.2.1
@@ -68,7 +68,6 @@
 	GtkWidget  *widget;
 	GtkWidget  *widget2;
 	GtkWidget  *evtbox;
-	CLAWS_TIP_DECL();
 
 	debug_print("Creating notice view...\n");
 	noticeview = g_new0(NoticeView, 1);
@@ -217,7 +216,7 @@
 				       NoticeView *noticeview)
 {
 	if (noticeview->icon_clickable)
-		gdk_window_set_cursor(noticeview->evtbox->window, hand_cursor);
+		gdk_window_set_cursor(gtk_widget_get_window(noticeview->evtbox), hand_cursor);
 	return FALSE;
 }
 
@@ -225,7 +224,7 @@
 				      GdkEventCrossing *event,
 				      NoticeView *noticeview)
 {
-	gdk_window_set_cursor(noticeview->evtbox->window, NULL);
+	gdk_window_set_cursor(gtk_widget_get_window(noticeview->evtbox), NULL);
 	return FALSE;
 }
 
@@ -234,7 +233,7 @@
 				      NoticeView *noticeview)
 {
 	if (noticeview->icon_clickable)
-		gdk_window_set_cursor(noticeview->evtbox->window, hand_cursor);
+		gdk_window_set_cursor(gtk_widget_get_window(noticeview->evtbox), hand_cursor);
 	return FALSE;
 }
 



More information about the Commits mailing list