[Commits] [SCM] claws branch, master, updated. 3.16.0-182-gb0460fa

claws at claws-mail.org claws at claws-mail.org
Sat May 26 12:21:23 CEST 2018


The branch, master has been updated
       via  b0460fa371588d774e6c120b19b90f7d7b724a55 (commit)
      from  a1f14b84ca0e901c125547707df71ec28c9c687c (commit)

Summary of changes:
 AUTHORS             |    1 +
 src/common/plugin.c |    2 +-
 src/gtk/authors.h   |    1 +
 src/jpilot.c        |    2 +-
 src/mbox.c          |    4 ++--
 src/procmsg.c       |    3 ++-
 src/textview.c      |    5 ++++-
 src/toolbar.c       |   13 ++++++++-----
 8 files changed, 20 insertions(+), 11 deletions(-)


- Log -----------------------------------------------------------------
commit b0460fa371588d774e6c120b19b90f7d7b724a55
Author: Paul <paul at claws-mail.org>
Date:   Sat May 26 11:21:19 2018 +0100

    fix bug #4023, 'Fix some small issues'
    
    * src/common/plugin.c: Remove redundant 'const' qualifier
    * src/jpilot.c: Remove redundant parentheses
    * src/mbox.c: Likewise
    * src/procmsg.c: Use fabs instead of abs for 'double' arg
    * src/ textview.c: Declare 'shortcut' only if not GENERIC_UMPC
    * src/toolbar.c: Declare 'toolbar_reply_menu_cb()' and
    'toolbar_delete_dup_menu_cb' only if not GENERIC_UMPC
    
    Patch by Avinash Sonawane

diff --git a/AUTHORS b/AUTHORS
index 9bbc156..22e1370 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -323,3 +323,4 @@ contributors (in addition to the above; based on Changelog)
 	Ralph Sennhauser
 	Michael Schwendt
 	Eric S. Raymond
+	Avinash Sonawane
diff --git a/src/common/plugin.c b/src/common/plugin.c
index 5677214..64a6f01 100644
--- a/src/common/plugin.c
+++ b/src/common/plugin.c
@@ -80,7 +80,7 @@ const gchar *plugin_feature_names[] =
 /* The plugin must be at least under one of these licences and have
    the corresponding token returned by the plugin_licence function.
  */
-const gchar const *plugin_licence_tokens[] = {
+const gchar *plugin_licence_tokens[] = {
   "LGPL2.1+", "LGPLv2.1+", "LGPL2.1", "LGPLv2.1",
   "LGPL3+", "LGPLv3+", "LGPL3", "LGPLv3",
   "GPL3+", "GPLv3+", "GPL3", "GPLv3",
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 360f514..2d4a706 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -283,6 +283,7 @@ static char *CONTRIBS_LIST[] = {
 "Jesse Skinner",
 "Ville Skyttä",
 "Dale P. Smith",
+"Avinash Sonawane",
 "Andrea Spadaccini",
 "Bogdan Sumanariu",
 "TAKANO",
diff --git a/src/jpilot.c b/src/jpilot.c
index cedfca9..fc3927c 100644
--- a/src/jpilot.c
+++ b/src/jpilot.c
@@ -508,7 +508,7 @@ static int find_next_offset( mem_rec_header *mem_rh, long fpos,
 			/* *attrib = temp_mem_rh->attrib; */
 			/* *unique_id = temp_mem_rh->unique_id; */
 		}
-		if ((temp_mem_rh->offset == fpos)) {
+		if (temp_mem_rh->offset == fpos) {
 			found = 1;
 			*attrib = temp_mem_rh->attrib;
 			*unique_id = temp_mem_rh->unique_id;
diff --git a/src/mbox.c b/src/mbox.c
index e2c51cc..9929a29 100644
--- a/src/mbox.c
+++ b/src/mbox.c
@@ -174,7 +174,7 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter,
 			/* From separator or quoted From */
 			offset = 0;
 			/* detect leading '>' char(s) */
-			while ((buf[offset] == '>')) {
+			while (buf[offset] == '>') {
 				offset++;
 			}
 			if (!strncmp(buf+offset, "From ", 5)) {
@@ -605,7 +605,7 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
 
 			offset = 0;
 			/* detect leading '>' char(s) */
-			while ((buf[offset] == '>')) {
+			while (buf[offset] == '>') {
 				offset++;
 			}
 			if (!strncmp(buf+offset, "From ", 5)) {
diff --git a/src/procmsg.c b/src/procmsg.c
index 3e989dd..e484700 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -23,6 +23,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#include <math.h>
 
 #include "main.h"
 #include "utils.h"
@@ -182,7 +183,7 @@ static GNode *subject_hashtable_lookup(GHashTable *hashtable, MsgInfo *msginfo)
 
 		/* parent node must not be more then thread_by_subject_max_age
 		   days older then msginfo */
-		if (abs(difftime(msginfo->date_t, hashtable_msginfo->date_t)) >
+		if (fabs(difftime(msginfo->date_t, hashtable_msginfo->date_t)) >
                     prefs_common.thread_by_subject_max_age * 3600 * 24)
 			match = FALSE;
 
diff --git a/src/textview.c b/src/textview.c
index e033347..e54b2e8 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -948,8 +948,11 @@ void textview_show_mime_part(TextView *textview, MimeInfo *partinfo)
 	GtkTextBuffer *buffer;
 	GtkTextIter iter;
 	const gchar *name;
-	gchar *content_type, *shortcut;
+	gchar *content_type;
 	GtkUIManager *ui_manager;
+#ifndef GENERIC_UMPC
+	gchar *shortcut;
+#endif
 
 	if (!partinfo) return;
 
diff --git a/src/toolbar.c b/src/toolbar.c
index 6212927..823a894 100644
--- a/src/toolbar.c
+++ b/src/toolbar.c
@@ -2203,6 +2203,7 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
 	gtk_widget_show(item);								\
 }
 
+#ifndef GENERIC_UMPC
 static void toolbar_reply_menu_cb(GtkWidget *widget, gpointer data)
 {
 	gpointer int_value = g_object_get_data(G_OBJECT(widget), "int-value");
@@ -2211,22 +2212,24 @@ static void toolbar_reply_menu_cb(GtkWidget *widget, gpointer data)
 	toolbar_reply(toolbar_item, GPOINTER_TO_INT(int_value));
 }
 
-static void toolbar_learn_menu_cb(GtkWidget *widget, gpointer data)
+static void toolbar_delete_dup_menu_cb(GtkWidget *widget, gpointer data)
 {
 	gpointer int_value = g_object_get_data(G_OBJECT(widget), "int-value");
 	ToolbarItem *toolbar_item = (ToolbarItem *)data;
 	
-	toolbar_learn(toolbar_item, GPOINTER_TO_INT(int_value));
+	toolbar_delete_dup(toolbar_item, GPOINTER_TO_INT(int_value));
 }
+#endif
 
-static void toolbar_delete_dup_menu_cb(GtkWidget *widget, gpointer data)
+static void toolbar_learn_menu_cb(GtkWidget *widget, gpointer data)
 {
 	gpointer int_value = g_object_get_data(G_OBJECT(widget), "int-value");
 	ToolbarItem *toolbar_item = (ToolbarItem *)data;
-	
-	toolbar_delete_dup(toolbar_item, GPOINTER_TO_INT(int_value));
+
+	toolbar_learn(toolbar_item, GPOINTER_TO_INT(int_value));
 }
 
+
 /**
  * Create a new toolbar with specified type
  * if a callback list is passed it will be used before the 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list