Index: src/compose.c =================================================================== RCS file: //claws/src/compose.c,v retrieving revision 1.382.2.604 retrieving revision 1.382.2.605 diff -u -r1.382.2.604 -r1.382.2.605 --- src/compose.c 7 Jul 2012 07:09:26 -0000 1.382.2.604 +++ src/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) {