From 591b98e2192bb7f36ad1b5638acd2c225e13aac3 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 17 May 2004 06:10:53 +0000 Subject: put the None item at the head of the providers list. 2004-05-17 Not Zed * mail-account-gui.c (mail_account_gui_setup): put the None item at the head of the providers list. (mail_account_gui_setup): only set the transport default fallback if it is not a STORE_AND_TRANSPORT type provider (since that was just disabled). #57939. * message-list.c (on_selection_changed_cmd): only NOOP if we have no selection and no uid, if we have a selection and no uid, then always update. Fixes #58267 without breaking the double-load thing. svn path=/trunk/; revision=25919 --- mail/mail-account-gui.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'mail/mail-account-gui.c') diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index fb0b2d14cc..f5a3d25ddc 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1924,7 +1924,7 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog) void mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) { - GtkWidget *stores, *transports, *item; + GtkWidget *stores, *transports, *item, *none; GtkWidget *fstore = NULL, *ftransport = NULL; int si = 0, hstore = 0, ti = 0, htransport = 0; int max_width = 0; @@ -1950,6 +1950,15 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) /* Construct source/transport option menus */ stores = gtk_menu_new (); transports = gtk_menu_new (); + + /* add a "None" option to the stores menu */ + none = item = gtk_menu_item_new_with_label (_("None")); + g_object_set_data ((GObject *) item, "provider", NULL); + g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui); + gtk_menu_shell_append(GTK_MENU_SHELL(stores), item); + gtk_widget_show (item); + si++; + providers = camel_provider_list(TRUE); /* sort the providers, remote first */ @@ -2000,7 +2009,8 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) if (CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider)) gtk_widget_set_sensitive (item, FALSE); - if (!ftransport) { + if (!ftransport + && !CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider)) { ftransport = item; htransport = ti; } @@ -2035,18 +2045,9 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) } g_list_free (providers); - /* add a "None" option to the stores menu */ - item = gtk_menu_item_new_with_label (_("None")); - g_object_set_data ((GObject *) item, "provider", NULL); - g_signal_connect (item, "activate", G_CALLBACK (source_type_changed), gui); - - gtk_menu_shell_append(GTK_MENU_SHELL(stores), item); - - gtk_widget_show (item); - if (!fstore || !source_proto) { - fstore = item; - hstore = si; + fstore = none; + hstore = 0; } /* set the menus on the optionmenus */ -- cgit v1.2.3