[Commits] mainwindow.c 1.274.2.353 1.274.2.354

mones at claws-mail.org mones at claws-mail.org
Sat Oct 6 22:15:33 CEST 2012


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

Modified Files:
      Tag: gtk2
	mainwindow.c 
Log Message:
2012-10-06 [mones]	3.8.1cvs85

	* po/POTFILES.in
		Added src/gtk/menu.c
	* src/common/defs.h
	* src/gtk/menu.c
	* src/gtk/menu.h
		New function cm_menu_item_new_label_from_url to
		avoid crashing on huge URL strings and warn user
		about the possible causes
	* src/mainwindow.c
		Use it to create List menu items safely 

Index: mainwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/mainwindow.c,v
retrieving revision 1.274.2.353
retrieving revision 1.274.2.354
diff -u -d -r1.274.2.353 -r1.274.2.354
--- mainwindow.c	19 Sep 2012 22:50:44 -0000	1.274.2.353
+++ mainwindow.c	6 Oct 2012 20:15:30 -0000	1.274.2.354
@@ -3564,7 +3564,7 @@
 			get_url_part (&url_pt, url_decoded);
 			item = NULL;
 			if (!g_ascii_strncasecmp(url_decoded, "mailto:", 7)) {
- 				item = gtk_menu_item_new_with_label ((url_decoded));
+ 				item = cm_menu_item_new_label_from_url ((url_decoded));
 				g_signal_connect(G_OBJECT(item), "activate",
 						 G_CALLBACK(mailing_list_compose),
 						 NULL);
@@ -3572,7 +3572,7 @@
  			else if (!g_ascii_strncasecmp(url_decoded, "http:", 5) ||
 				 !g_ascii_strncasecmp(url_decoded, "https:",6)) {
 
-				item = gtk_menu_item_new_with_label ((url_decoded));
+				item = cm_menu_item_new_label_from_url ((url_decoded));
 				g_signal_connect(G_OBJECT(item), "activate",
 						 G_CALLBACK(mailing_list_open_uri),
 						 NULL);



More information about the Commits mailing list