[Commits] [SCM] claws branch, master, updated. 3.11.1-191-g90d8c2d

ticho at claws-mail.org ticho at claws-mail.org
Tue Jul 7 18:47:29 CEST 2015


The branch, master has been updated
       via  90d8c2dc5a38de2bb992826583c8f20dac2f1ba4 (commit)
       via  33fd5d6227e037fa5ff50ed5e1a07db8630e7f8e (commit)
      from  13198cd1802012dec7e8c87a6185b4f8c11f63ae (commit)

Summary of changes:
 src/folderview.c                             |    5 +++++
 src/plugins/att_remover/att_remover.c        |    2 +-
 src/plugins/att_remover/claws.def            |    1 -
 src/plugins/bogofilter/bogofilter.c          |    2 +-
 src/plugins/bsfilter/bsfilter.c              |    2 +-
 src/plugins/bsfilter/claws.def               |    1 -
 src/plugins/clamd/clamav_plugin.c            |    4 ++--
 src/plugins/gdata/cm_gdata_contacts.c        |    2 +-
 src/plugins/geolocation/geolocation_plugin.c |    2 +-
 src/plugins/python/clawsmailmodule.c         |    4 ++--
 src/plugins/rssyl/claws.def                  |    1 -
 src/plugins/rssyl/rssyl_cb_menu.c            |    2 +-
 src/plugins/rssyl/rssyl_feed.c               |    2 +-
 src/plugins/rssyl/rssyl_update_feed.c        |    6 +++---
 src/plugins/spamassassin/spamassassin.c      |    8 ++++----
 15 files changed, 23 insertions(+), 21 deletions(-)


- Log -----------------------------------------------------------------
commit 90d8c2dc5a38de2bb992826583c8f20dac2f1ba4
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Jul 7 18:45:55 2015 +0200

    Avoid some unnecessary foldertree redraws.
    
    In particular, there were some redraws before moving a folder
    and before moving to a next unread message in different folder.
    This slowed these actions perceptibly on Windows.

diff --git a/src/folderview.c b/src/folderview.c
index c9b3f24..45e6537 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -877,11 +877,13 @@ static void folderview_select_node(FolderView *folderview, GtkCMCTreeNode *node)
 		return;
 	}
 
+	gtk_cmclist_freeze(GTK_CMCLIST(ctree));
 	gtkut_ctree_expand_parent_all(ctree, node);
 
 	folderview->open_folder = TRUE;
 	gtkut_ctree_set_focus_row(ctree, node);
 	gtk_cmctree_select(ctree, node);
+	gtk_cmclist_thaw(GTK_CMCLIST(ctree));
 	if ((folderview->summaryview->folder_item &&
 	    folderview->summaryview->folder_item->total_msgs > 0) ||
 	     prefs_common.layout_mode == SMALL_LAYOUT)
@@ -2496,6 +2498,7 @@ void folderview_move_folder(FolderView *folderview, FolderItem *from_folder,
 
 	statusbar_verbosity_set(FALSE);
 	folder_item_update_freeze();
+	gtk_cmclist_freeze(GTK_CMCLIST(folderview->ctree));
 	if ((status = folder_item_move_to(from_folder, to_folder, &new_folder, copy)) == F_MOVE_OK) {
 		statusbar_verbosity_set(FALSE);
 		main_window_cursor_normal(folderview->mainwin);
@@ -2507,10 +2510,12 @@ void folderview_move_folder(FolderView *folderview, FolderItem *from_folder,
 			gtk_cmctree_find_by_row_data(GTK_CMCTREE(folderview->ctree), 
 				NULL, to_folder), new_folder->folder);
 		folderview_select(folderview, new_folder);
+		gtk_cmclist_thaw(GTK_CMCLIST(folderview->ctree));
 	} else {
 		statusbar_verbosity_set(FALSE);		
 		main_window_cursor_normal(folderview->mainwin);
 		STATUSBAR_POP(folderview->mainwin);
+		gtk_cmclist_thaw(GTK_CMCLIST(folderview->ctree));
 		folder_item_update_thaw();
 		switch (status) {
 		case F_MOVE_FAILED_DEST_IS_PARENT:

commit 33fd5d6227e037fa5ff50ed5e1a07db8630e7f8e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Jul 7 18:44:34 2015 +0200

    Use accessor for common preferences in all plugins.

diff --git a/src/plugins/att_remover/att_remover.c b/src/plugins/att_remover/att_remover.c
index a60c1ef..a629515 100644
--- a/src/plugins/att_remover/att_remover.c
+++ b/src/plugins/att_remover/att_remover.c
@@ -349,7 +349,7 @@ static void remove_attachments_dialog(AttRemover *attremover)
 				  -1));
 	list_view = GTK_TREE_VIEW(gtk_tree_view_new_with_model(model));
 	g_object_unref(model);	
-	gtk_tree_view_set_rules_hint(list_view, prefs_common.use_stripes_everywhere);
+	gtk_tree_view_set_rules_hint(list_view, prefs_common_get_prefs()->use_stripes_everywhere);
 	
 	renderer = gtk_cell_renderer_toggle_new();
 	g_signal_connect(renderer, "toggled", G_CALLBACK(remove_toggled_cb), model);
diff --git a/src/plugins/att_remover/claws.def b/src/plugins/att_remover/claws.def
index 2c69e2c..6b2cf4e 100644
--- a/src/plugins/att_remover/claws.def
+++ b/src/plugins/att_remover/claws.def
@@ -35,7 +35,6 @@ matcherlist_new
 matcherprop_new
 pref_get_escaped_pref
 pref_get_unescaped_pref
-prefs_common
 prefs_common_get_prefs
 prefs_file_close
 prefs_file_close_revert
diff --git a/src/plugins/bogofilter/bogofilter.c b/src/plugins/bogofilter/bogofilter.c
index 66bd311..45ef823 100644
--- a/src/plugins/bogofilter/bogofilter.c
+++ b/src/plugins/bogofilter/bogofilter.c
@@ -619,7 +619,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 			msg =  g_strdup_printf(_("The Bogofilter plugin couldn't filter "
 					   "a message. The command `%s %s %s` couldn't be run."), 
 					   bogo_args[0], bogo_args[1], bogo_args[2]);
-		if (!prefs_common.no_recv_err_panel) {
+		if (!prefs_common_get_prefs()->no_recv_err_panel) {
 			if (!warned_error) {
 				alertpanel_error("%s", msg);
 			}
diff --git a/src/plugins/bsfilter/bsfilter.c b/src/plugins/bsfilter/bsfilter.c
index 8484b2c..ac051e5 100644
--- a/src/plugins/bsfilter/bsfilter.c
+++ b/src/plugins/bsfilter/bsfilter.c
@@ -400,7 +400,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 			msg =  g_strdup_printf(_("The Bsfilter plugin couldn't filter "
 					   "a message. The command `%s` couldn't be run."), 
 					   bs_exec);
-		if (!prefs_common.no_recv_err_panel) {
+		if (!prefs_common_get_prefs()->no_recv_err_panel) {
 			if (!warned_error) {
 				alertpanel_error("%s", msg);
 			}
diff --git a/src/plugins/bsfilter/claws.def b/src/plugins/bsfilter/claws.def
index 2c39c40..602907b 100644
--- a/src/plugins/bsfilter/claws.def
+++ b/src/plugins/bsfilter/claws.def
@@ -17,7 +17,6 @@ matcherlist_new
 matcherprop_new
 pref_get_escaped_pref
 pref_get_unescaped_pref
-prefs_common
 prefs_file_close
 prefs_file_close_revert
 prefs_gtk_register_page
diff --git a/src/plugins/clamd/clamav_plugin.c b/src/plugins/clamd/clamav_plugin.c
index c363e95..42f60bf 100644
--- a/src/plugins/clamd/clamav_plugin.c
+++ b/src/plugins/clamd/clamav_plugin.c
@@ -119,8 +119,8 @@ static gboolean scan_func(GNode *node, gpointer data)
 						msg = g_strconcat(_("Detected %s virus."),
 							clamd_get_virus_name(buf.msg), NULL);
 						g_warning("%s\n", msg);
-						debug_print("no_recv: %d\n", prefs_common.no_recv_err_panel);
-						if (prefs_common.no_recv_err_panel) {
+						debug_print("no_recv: %d\n", prefs_common_get_prefs()->no_recv_err_panel);
+						if (prefs_common_get_prefs()->no_recv_err_panel) {
 						    statusbar_print_all("%s", msg);
 						}
 						else {
diff --git a/src/plugins/gdata/cm_gdata_contacts.c b/src/plugins/gdata/cm_gdata_contacts.c
index b6f39ff..20ae00d 100644
--- a/src/plugins/gdata/cm_gdata_contacts.c
+++ b/src/plugins/gdata/cm_gdata_contacts.c
@@ -603,7 +603,7 @@ void cm_gdata_add_contacts(GList **address_list)
 
 gboolean cm_gdata_update_contacts_cache(void)
 {
-  if(prefs_common.work_offline)
+  if(prefs_common_get_prefs()->work_offline)
   {
     debug_print("GData plugin: Offline mode\n");
   }
diff --git a/src/plugins/geolocation/geolocation_plugin.c b/src/plugins/geolocation/geolocation_plugin.c
index ed5fc87..158d825 100644
--- a/src/plugins/geolocation/geolocation_plugin.c
+++ b/src/plugins/geolocation/geolocation_plugin.c
@@ -488,7 +488,7 @@ static gboolean my_messageview_show_hook(gpointer source, gpointer data)
   }
 
   /* do nothing except hiding the button if claws mail is in offline mode */
-  if(prefs_common.work_offline) {
+  if(prefs_common_get_prefs()->work_offline) {
     gtk_widget_hide(container);
     return FALSE;
   }
diff --git a/src/plugins/python/clawsmailmodule.c b/src/plugins/python/clawsmailmodule.c
index c573aaf..5ce3b95 100644
--- a/src/plugins/python/clawsmailmodule.c
+++ b/src/plugins/python/clawsmailmodule.c
@@ -353,7 +353,7 @@ static PyObject* quicksearch_search(PyObject *self, PyObject *args)
   MainWindow *mainwin;
 
   /* must be given exactly one argument, which is a string */
-  searchtype = prefs_common.summary_quicksearch_type;
+  searchtype = prefs_common_get_prefs()->summary_quicksearch_type;
   if(!PyArg_ParseTuple(args, "s|i", &string, &searchtype))
     return NULL;
 
@@ -382,7 +382,7 @@ static PyObject* quicksearch_clear(PyObject *self, PyObject *args)
   }
 
   qs = mainwin->summaryview->quicksearch;
-  quicksearch_set(qs, prefs_common.summary_quicksearch_type, "");
+  quicksearch_set(qs, prefs_common_get_prefs()->summary_quicksearch_type, "");
 
   Py_INCREF(Py_None);
   return Py_None;
diff --git a/src/plugins/rssyl/claws.def b/src/plugins/rssyl/claws.def
index d819bed..ad106c9 100644
--- a/src/plugins/rssyl/claws.def
+++ b/src/plugins/rssyl/claws.def
@@ -89,7 +89,6 @@ make_dir_hier
 mh_get_class
 move_file
 msgcache_destroy
-prefs_common
 prefs_common_get_prefs
 prefs_file_close
 prefs_file_close_revert
diff --git a/src/plugins/rssyl/rssyl_cb_menu.c b/src/plugins/rssyl/rssyl_cb_menu.c
index 771791b..2d31a88 100644
--- a/src/plugins/rssyl/rssyl_cb_menu.c
+++ b/src/plugins/rssyl/rssyl_cb_menu.c
@@ -250,7 +250,7 @@ void rssyl_refresh_feed_cb(GtkAction *action,
 	ritem = (RFolderItem *)item;
 
 	/* Offline check */
-	if( prefs_common.work_offline &&
+	if( prefs_common_get_prefs()->work_offline &&
 			!inc_offline_should_override(TRUE,
 					ngettext("Claws Mail needs network access in order "
 					"to update the feed.",
diff --git a/src/plugins/rssyl/rssyl_feed.c b/src/plugins/rssyl/rssyl_feed.c
index 46edc01..302ddc0 100644
--- a/src/plugins/rssyl/rssyl_feed.c
+++ b/src/plugins/rssyl/rssyl_feed.c
@@ -128,7 +128,7 @@ gboolean rssyl_refresh_timeout_cb(gpointer data)
 
 	g_return_val_if_fail(ctx != NULL, FALSE);
 
-	if( prefs_common.work_offline)
+	if( prefs_common_get_prefs()->work_offline)
 		return TRUE;
 
 	if( ctx->ritem == NULL || ctx->ritem->url == NULL ) {
diff --git a/src/plugins/rssyl/rssyl_update_feed.c b/src/plugins/rssyl/rssyl_update_feed.c
index 284b548..8e8b964 100644
--- a/src/plugins/rssyl/rssyl_update_feed.c
+++ b/src/plugins/rssyl/rssyl_update_feed.c
@@ -165,7 +165,7 @@ RFetchCtx *rssyl_prep_fetchctx_from_item(RFolderItem *ritem)
 	ctx->success = TRUE;
 	ctx->ready = FALSE;
 
-	feed_set_timeout(ctx->feed, prefs_common.io_timeout_secs);
+	feed_set_timeout(ctx->feed, prefs_common_get_prefs()->io_timeout_secs);
 	feed_set_cookies_path(ctx->feed, rssyl_prefs_get()->cookies_path);
 	feed_set_ssl_verify_peer(ctx->feed, ritem->ssl_verify_peer);
 	feed_set_auth(ctx->feed, ritem->auth);
@@ -191,7 +191,7 @@ RFetchCtx *rssyl_prep_fetchctx_from_url(gchar *url)
 	ctx->success = TRUE;
 	ctx->ready = FALSE;
 
-	feed_set_timeout(ctx->feed, prefs_common.io_timeout_secs);
+	feed_set_timeout(ctx->feed, prefs_common_get_prefs()->io_timeout_secs);
 	feed_set_cookies_path(ctx->feed, rssyl_prefs_get()->cookies_path);
 	feed_set_ssl_verify_peer(ctx->feed, rssyl_prefs_get()->ssl_verify_peer);
 #ifdef G_OS_WIN32
@@ -325,7 +325,7 @@ void rssyl_update_all_func(FolderItem *item, gpointer data)
 
 void rssyl_update_all_feeds(void)
 {
-	if (prefs_common.work_offline &&
+	if (prefs_common_get_prefs()->work_offline &&
 			!inc_offline_should_override(TRUE,
 				_("Claws Mail needs network access in order to update your feeds.")) ) {
 		return;
diff --git a/src/plugins/spamassassin/spamassassin.c b/src/plugins/spamassassin/spamassassin.c
index 41753d9..98dd1ad 100644
--- a/src/plugins/spamassassin/spamassassin.c
+++ b/src/plugins/spamassassin/spamassassin.c
@@ -373,7 +373,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 					   "a message. The probable cause of the error "
 					   "is an unreachable spamd daemon. Please make "
 					   "sure spamd is running and accessible.");
-		if (!prefs_common.no_recv_err_panel) {
+		if (!prefs_common_get_prefs()->no_recv_err_panel) {
 			if (!warned_error) {
 				alertpanel_error("%s", msg);
 			}
@@ -424,7 +424,7 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
 	}
 
 	if (config.transport == SPAMASSASSIN_TRANSPORT_TCP
-	&&  prefs_common.work_offline
+	&&  prefs_common_get_prefs()->work_offline
 	&&  !inc_offline_should_override(TRUE,
 		_("Claws Mail needs network access in order "
 		  "to feed this mail(s) to the remote learner."))) {
@@ -445,7 +445,7 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
 		} else {
 			cmd = g_strdup_printf("sa-learn -u %s%s %s %s",
 							config.username,
-							prefs_common.work_offline?" -L":"",
+							prefs_common_get_prefs()->work_offline?" -L":"",
 							spam?"--spam":"--ham", file);
 		}
 	}
@@ -479,7 +479,7 @@ int spamassassin_learn(MsgInfo *msginfo, GSList *msglist, gboolean spam)
 		} else {
 			cmd = g_strdup_printf("sa-learn -u %s%s %s",
 					config.username,
-					prefs_common.work_offline?" -L":"",
+					prefs_common_get_prefs()->work_offline?" -L":"",
 					spam?"--spam":"--ham");
 
 			/* concatenate all message tmpfiles to the sa-learn command-line */

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list