[Commits] addrbook.c 1.22.2.24.2.1 1.22.2.24.2.2 exportldif.c 1.1.4.22.2.1 1.1.4.22.2.2 mimeview.c 1.83.2.170.2.3 1.83.2.170.2.4

miras at claws-mail.org miras at claws-mail.org
Mon Jan 23 01:01:26 CET 2012


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

Modified Files:
      Tag: new-contacts
	addrbook.c exportldif.c mimeview.c 
Log Message:
2012-01-23 [mir]	3.7.10cvs16.20-new-contacts

	* commitHelper
	* src/addrbook.c
	* src/exportldif.c
	* src/mimeview.c
	    Applied patch 3.8.0cvs14, 3.8.0cvs15, 3.8.0cvs16 from HEAD.

Index: addrbook.c
===================================================================
RCS file: /home/claws-mail/claws/src/addrbook.c,v
retrieving revision 1.22.2.24.2.1
retrieving revision 1.22.2.24.2.2
diff -u -d -r1.22.2.24.2.1 -r1.22.2.24.2.2
--- addrbook.c	29 Nov 2011 00:15:19 -0000	1.22.2.24.2.1
+++ addrbook.c	23 Jan 2012 00:01:24 -0000	1.22.2.24.2.2
@@ -1804,7 +1804,7 @@
 	GDir *dir;
 	const gchar *dir_name;
 	struct stat statbuf;
-	gchar buf[WORK_BUFLEN];
+	gchar buf[WORK_BUFLEN + 1];
 	gchar numbuf[WORK_BUFLEN];
 	gint len, lenpre, lensuf, lennum;
 	long int val, maxval;
@@ -1827,7 +1827,7 @@
 	}
 
 	adbookdir = g_strdup(buf);
-	strncat(buf, ADDRBOOK_PREFIX, WORK_BUFLEN);
+	strncat(buf, ADDRBOOK_PREFIX, WORK_BUFLEN - strlen(buf));
 
 	if( ( dir = g_dir_open( adbookdir, 0, NULL ) ) == NULL ) {
 		book->retVal = MGU_OPEN_DIRECTORY;
@@ -1846,7 +1846,7 @@
 		gboolean flg;
 
 		strncpy(buf, adbookdir, WORK_BUFLEN);
-		strncat(buf, dir_name, WORK_BUFLEN);
+		strncat(buf, dir_name, WORK_BUFLEN - strlen(buf));
 		g_stat(buf, &statbuf);
 		if (S_ISREG(statbuf.st_mode)) {
 			if (strncmp(

Index: exportldif.c
===================================================================
RCS file: /home/claws-mail/claws/src/exportldif.c,v
retrieving revision 1.1.4.22.2.1
retrieving revision 1.1.4.22.2.2
diff -u -d -r1.1.4.22.2.1 -r1.1.4.22.2.2
--- exportldif.c	29 Nov 2011 00:15:20 -0000	1.1.4.22.2.1
+++ exportldif.c	23 Jan 2012 00:01:24 -0000	1.1.4.22.2.2
@@ -197,7 +197,7 @@
 static gchar *exportldif_fmt_dn(
 		ExportLdifCtl *ctl, const ItemPerson *person )
 {
-	gchar buf[ FMT_BUFSIZE ];
+	gchar buf[ FMT_BUFSIZE + 1 ];
 	gchar *retVal = NULL;
 	gchar *attr = NULL;
 	gchar *value = NULL;
@@ -231,23 +231,23 @@
 	if( attr ) {
 		if( value ) {
 			if( strlen( value ) > 0 ) {
-				strncat( buf, attr, FMT_BUFSIZE );
-				strncat( buf, "=", FMT_BUFSIZE );
+				strncat( buf, attr, FMT_BUFSIZE - strlen(buf) );
+				strncat( buf, "=", FMT_BUFSIZE - strlen(buf) );
 				if( dupval ) {
 					/* Format and free duplicated value */
-					strncat( buf, dupval, FMT_BUFSIZE );
+					strncat( buf, dupval, FMT_BUFSIZE - strlen(buf) );
 					g_free( dupval );
 				}
 				else {
 					/* Use original value */
-					strncat( buf, value, FMT_BUFSIZE );
+					strncat( buf, value, FMT_BUFSIZE - strlen(buf) );
 				}
 
 				/* Append suffix */
 				if( ctl->suffix ) {
 					if( strlen( ctl->suffix ) > 0 ) {
-						strncat( buf, ",", FMT_BUFSIZE );
-						strncat( buf, ctl->suffix, FMT_BUFSIZE );
+						strncat( buf, ",", FMT_BUFSIZE - strlen(buf) );
+						strncat( buf, ctl->suffix, FMT_BUFSIZE - strlen(buf) );
 					}
 				}
 

Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.170.2.3
retrieving revision 1.83.2.170.2.4
diff -u -d -r1.83.2.170.2.3 -r1.83.2.170.2.4
--- mimeview.c	1 Jan 2012 10:31:00 -0000	1.83.2.170.2.3
+++ mimeview.c	23 Jan 2012 00:01:24 -0000	1.83.2.170.2.4
@@ -89,10 +89,6 @@
 
 static void mimeview_selected		(GtkTreeSelection	*selection,
 					 MimeView	*mimeview);
-static void mimeview_start_drag 	(GtkWidget	*widget,
-					 gint		 button,
-					 GdkEvent	*event,
-					 MimeView	*mimeview);
 static gint mimeview_button_pressed	(GtkWidget	*widget,
 					 GdkEventButton	*event,
 					 MimeView	*mimeview);
@@ -337,16 +333,16 @@
 
 	gtk_widget_show(ctree);
 	gtk_container_add(GTK_CONTAINER(scrolledwin), ctree);
+	gtk_drag_source_set(ctree, GDK_BUTTON1_MASK|GDK_BUTTON3_MASK, 
+			    mimeview_mime_types, 1, GDK_ACTION_COPY);
 
 	g_signal_connect(G_OBJECT(selection), "changed",
 			 G_CALLBACK(mimeview_selected), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "button-release-event",
+	g_signal_connect(G_OBJECT(ctree), "button_release_event",
 			 G_CALLBACK(mimeview_button_pressed), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "key-press-event",
+	g_signal_connect(G_OBJECT(ctree), "key_press_event",
 			 G_CALLBACK(mimeview_key_pressed), mimeview);
-	g_signal_connect(G_OBJECT (ctree),"drag-begin",
-			 G_CALLBACK (mimeview_start_drag), mimeview);
-	g_signal_connect(G_OBJECT(ctree), "drag-data-get",
+	g_signal_connect(G_OBJECT(ctree), "drag_data_get",
 			 G_CALLBACK(mimeview_drag_data_get), mimeview);
 
 	mime_notebook = gtk_notebook_new();
@@ -1449,24 +1445,6 @@
 	}
 }
 
-static void mimeview_start_drag(GtkWidget *widget, gint button,
-				GdkEvent *event, MimeView *mimeview)
-{
-	GdkDragContext *context;
-	MimeInfo *partinfo;
-
-	cm_return_if_fail(mimeview != NULL);
-
-	partinfo = mimeview_get_selected_part(mimeview);
-	if (partinfo == NULL || 
-	    partinfo->disposition == DISPOSITIONTYPE_INLINE)
-		return;
-
-	context = gtk_drag_begin(widget, mimeview->target_list,
-				 GDK_ACTION_COPY, button, event);
-	gtk_drag_set_icon_default(context);
-}
-
 static gint mimeview_button_pressed(GtkWidget *widget, GdkEventButton *event,
 				    MimeView *mimeview)
 {



More information about the Commits mailing list