From: Andrej Kacian <ticho@claws-mail.org>
Date: Sun, 7 Dec 2014 21:33:26 +0000 (+0100)
Subject: Compose window: activating the GtkEntry with sender address activates the account... 
X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e746281f5fd9a7678550c29c5618f67c50ee055b
Bug: http://www.thewildbeast.co.uk/claws-mail/bugzilla/show_bug.cgi?id=3345

Compose window: activating the GtkEntry with sender address activates the account selection combobox. Closes bug #3345, reported by  Barry Warsaw.
---

diff --git a/src/compose.c b/src/compose.c
index 0e3b9b6..b118028 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -562,6 +562,7 @@ static void compose_attach_update_label(Compose *compose);
 static void compose_set_folder_prefs(Compose *compose, FolderItem *folder,
 				     gboolean respect_default_to);
 static void compose_subject_entry_activated(GtkWidget *widget, gpointer data);
+static void from_name_activate_cb(GtkWidget *widget, gpointer data);
 
 static GtkActionEntry compose_popup_entries[] =
 {
@@ -8065,6 +8066,8 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
 	
 	g_signal_connect_after(G_OBJECT(from_name), "grab_focus",
 			 G_CALLBACK(compose_grab_focus_cb), compose);
+	g_signal_connect_after(G_OBJECT(from_name), "activate",
+			 G_CALLBACK(from_name_activate_cb), optmenu);
 
 	for (; accounts != NULL; accounts = accounts->next, num++) {
 		PrefsAccount *ac = (PrefsAccount *)accounts->data;
@@ -11860,6 +11863,12 @@ static void compose_subject_entry_activated(GtkWidget *widget, gpointer data)
 	gtk_widget_grab_focus(compose->text);
 }
 
+static void from_name_activate_cb(GtkWidget *widget, gpointer data)
+{
+	gtk_combo_box_popup(GTK_COMBO_BOX(data));
+}
+
+
 /*
  * End of Source.
  */
