From: Colin Leroy Date: Wed, 29 Sep 2004 09:36:22 +0000 (+0000) Subject: 2004-09-29 [colin] 0.9.12cvs114.1 X-Git-Tag: gtk2_win32_last_merge~152 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=383947ce07d5e827b4cf0be571061d97ffce843b;hp=14edff4b009efb3223c0afc074e7679ebbaf4ea6 2004-09-29 [colin] 0.9.12cvs114.1 * src/compose.c Sync with HEAD Fix focus handling in headers --- diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index b38320a21..f9b0503d6 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -1,3 +1,9 @@ +2004-09-29 [colin] 0.9.12cvs114.1 + + * src/compose.c + Sync with HEAD + Fix focus handling in headers + 2004-09-29 [paul] 0.9.12cvs113.1 * src/quote_fmt_parse.y diff --git a/PATCHSETS b/PATCHSETS index d69c36879..2e16dfee4 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -182,3 +182,4 @@ ( cvs diff -u -r 1.207.2.15 -r 1.207.2.16 src/folderview.c; ) > 0.9.12cvs110.1.patchset ( cvs diff -u -r 1.207.2.16 -r 1.207.2.17 src/folderview.c; cvs diff -u -r 1.274.2.19 -r 1.274.2.20 src/mainwindow.c; ) > 0.9.12cvs112.1.patchset ( cvs diff -u -r 1.654.2.215 -r 1.654.2.216 configure.ac; cvs diff -u -r 1.22.2.2 -r 1.22.2.3 src/quote_fmt_parse.y; ) > 0.9.12cvs113.1.patchset +( cvs diff -u -r 1.382.2.47 -r 1.382.2.48 src/compose.c; ) > 0.9.12cvs114.1.patchset diff --git a/configure.ac b/configure.ac index dbaaaf2af..f505b77cf 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=9 MICRO_VERSION=12 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=113 +EXTRA_VERSION=114 EXTRA_RELEASE= EXTRA_GTK2_VERSION=.1 diff --git a/src/compose.c b/src/compose.c index 9a44a59cf..f3c620fdc 100644 --- a/src/compose.c +++ b/src/compose.c @@ -484,9 +484,6 @@ gboolean compose_headerentry_changed_cb (GtkWidget *entry, gboolean compose_headerentry_key_press_event_cb(GtkWidget *entry, GdkEventKey *event, ComposeHeaderEntry *headerentry); -static gboolean compose_headerentry_button_pressed (GtkWidget *entry, - GdkEventButton *event, - gpointer data); static void compose_show_first_last_header (Compose *compose, gboolean show_first); @@ -3329,14 +3326,22 @@ gint compose_send(Compose *compose) goto bail; } - compose->sending = FALSE; - gtk_widget_destroy(compose->window); - /* No more compose access in the normal codepath after this point! */ + + if (prefs_common.send_dialog_mode != SEND_DIALOG_ALWAYS) { + compose->sending = FALSE; + gtk_widget_destroy(compose->window); + /* No more compose access in the normal codepath + * after this point! */ + } if (msgnum == 0) { alertpanel_error(_("The message was queued but could not be " "sent.\nUse \"Send queued messages\" from " "the main window to retry.")); + if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) { + compose->sending = FALSE; + compose_allow_user_actions (compose, TRUE); + } return 0; } @@ -3344,9 +3349,20 @@ gint compose_send(Compose *compose) val = procmsg_send_message_queue(msgpath); g_free(msgpath); + if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) { + compose->sending = FALSE; + compose_allow_user_actions (compose, TRUE); + if (val != 0) { + folder_item_remove_msg(folder, msgnum); + folder_item_scan(folder); + } + } + if (val == 0) { folder_item_remove_msg(folder, msgnum); folder_item_scan(folder); + if (prefs_common.send_dialog_mode == SEND_DIALOG_ALWAYS) + gtk_widget_destroy(compose->window); } return 0; @@ -4798,6 +4814,7 @@ static void compose_create_header_entry(Compose *compose) } if (header) gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), header); + g_signal_connect(G_OBJECT(GTK_COMBO(combo)->entry), "grab_focus", G_CALLBACK(compose_grab_focus_before_cb), compose); g_signal_connect_after(G_OBJECT(GTK_COMBO(combo)->entry), "grab_focus", @@ -4820,10 +4837,6 @@ static void compose_create_header_entry(Compose *compose) G_CALLBACK(compose_grab_focus_before_cb), compose); g_signal_connect_after(G_OBJECT(entry), "grab_focus", G_CALLBACK(compose_grab_focus_cb), compose); - g_signal_connect(G_OBJECT(entry), "button-press-event", - G_CALLBACK(compose_headerentry_button_pressed), - NULL); - address_completion_register_entry(GTK_ENTRY(entry)); headerentry->compose = compose; @@ -7679,15 +7692,6 @@ gboolean compose_headerentry_changed_cb(GtkWidget *entry, return FALSE; } -static gboolean compose_headerentry_button_pressed - (GtkWidget *entry, GdkEventButton *event, gpointer data) -{ - /* if this is a lclick, grab the focus */ - if (event->button == 1) - gtk_widget_grab_focus(entry); - return FALSE; -} - static void compose_show_first_last_header(Compose *compose, gboolean show_first) { GtkAdjustment *vadj;