[Commits] compose.c 1.382.2.604 1.382.2.605

ticho at claws-mail.org ticho at claws-mail.org
Fri Jul 27 19:51:35 CEST 2012


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

Modified Files:
      Tag: gtk2
	compose.c 
Log Message:
2012-07-27 [ticho]	3.8.1cvs20

	* src/compose.c
		Fixed "transient for" property for file attach dialog when
		called from Attachments list popup menu. Simplified menu item
		sensitivities setting code logic for this menu.

Index: compose.c
===================================================================
RCS file: /home/claws-mail/claws/src/compose.c,v
retrieving revision 1.382.2.604
retrieving revision 1.382.2.605
diff -u -d -r1.382.2.604 -r1.382.2.605
--- compose.c	7 Jul 2012 07:09:26 -0000	1.382.2.604
+++ compose.c	27 Jul 2012 17:51:33 -0000	1.382.2.605
@@ -9438,14 +9438,8 @@
 		attach_selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(widget));
 		attach_nr_selected = gtk_tree_selection_count_selected_rows(attach_selection);
 			
-		if (attach_nr_selected > 0)
-		{
-			cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Remove", TRUE);
-			cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Properties", TRUE);
-		} else {
-			cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Remove", FALSE);
-			cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Properties", FALSE);
-		}
+		cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Remove", (attach_nr_selected > 0));
+		cm_menu_set_sensitive_full(compose->ui_manager, "Popup/Compose/Properties", (attach_nr_selected > 0));
 			
 		gtk_menu_popup(GTK_MENU(compose->popupmenu), NULL, NULL,
 			       NULL, NULL, event->button, event->time);
@@ -9851,6 +9845,10 @@
 	if (compose->redirect_filename != NULL)
 		return;
 
+	/* Set focus_window properly, in case we were called via popup menu,
+	 * which unsets it (via focus_out_event callback on compose window). */
+	manage_window_focus_in(compose->window, NULL, NULL);
+
 	file_list = filesel_select_multiple_files_open(_("Select file"));
 
 	if (file_list) {



More information about the Commits mailing list