talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit f25a3857b6d657c30d76ed0ac45b295db083956a
parent 6dee9fb1323559406dd8b7c0b236c792176f6572
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Fri, 27 Jul 2012 17:51:33 +0000

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.

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/compose.c | 14++++++--------
4 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +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. + 2012-07-25 [ticho] 3.8.1cvs19 * manual/advanced.xml diff --git a/PATCHSETS b/PATCHSETS @@ -4394,3 +4394,4 @@ ( cvs diff -u -r 1.12.2.60 -r 1.12.2.61 src/gtk/prefswindow.c; ) > 3.8.1cvs17.patchset ( cvs diff -u -r 1.9.2.78 -r 1.9.2.79 src/gtk/gtkaspell.c; ) > 3.8.1cvs18.patchset ( cvs diff -u -r 1.1.2.60 -r 1.1.2.61 manual/advanced.xml; ) > 3.8.1cvs19.patchset +( cvs diff -u -r 1.382.2.604 -r 1.382.2.605 src/compose.c; ) > 3.8.1cvs20.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=19 +EXTRA_VERSION=20 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/compose.c b/src/compose.c @@ -9438,14 +9438,8 @@ static gboolean attach_button_pressed(GtkWidget *widget, GdkEventButton *event, 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 @@ static void compose_attach_cb(GtkAction *action, gpointer data) 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) {