diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-08-28 03:28:05 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-08-28 03:28:05 +0800 |
commit | 4cf66ac5c7915a982c34faade300b0986a87f35a (patch) | |
tree | c3cb8b2b902de644e325b36dda3fb0ee0b7f1f9a | |
parent | 195c847106a571d00c82850e6105e698f850b7c2 (diff) | |
download | gsoc2013-evolution-4cf66ac5c7915a982c34faade300b0986a87f35a.tar.gz gsoc2013-evolution-4cf66ac5c7915a982c34faade300b0986a87f35a.tar.zst gsoc2013-evolution-4cf66ac5c7915a982c34faade300b0986a87f35a.zip |
Set the source and transport description labels. (transport_type_changed):
2001-08-27 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (mail_account_gui_new): Set the source and
transport description labels.
(transport_type_changed): Set the transport description label.
(source_type_changed): Set the source description label.
* mail-tools.c (mail_tool_make_message_attachment): Remove
X-Evolution* headers.
(mail_tool_remove_xevolution_headers): New function to convenience
removing the X-Evolution headers.
(mail_tool_restore_xevolution_headers): New convenience function
to restore the X-Evolution headers.
(mail_tool_destroy_xevolution): New function to cleanup the
structure.
(mail_tool_forward_message): Remove and restore the X-Evolution
headers here too.
svn path=/trunk/; revision=12487
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 36 | ||||
-rw-r--r-- | mail/mail-account-gui.h | 1 | ||||
-rw-r--r-- | mail/mail-config.glade | 34 | ||||
-rw-r--r-- | mail/mail-tools.h | 2 |
5 files changed, 65 insertions, 13 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 45da2cd300..4d86ac1e1a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2001-08-27 Jeffrey Stedfast <fejj@ximian.com> + * mail-account-gui.c (mail_account_gui_new): Set the source and + transport description labels. + (transport_type_changed): Set the transport description label. + (source_type_changed): Set the source description label. + * mail-tools.c (mail_tool_make_message_attachment): Remove X-Evolution* headers. (mail_tool_remove_xevolution_headers): New function to convenience diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 0a986c4f66..bb9150de7c 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -297,6 +297,11 @@ source_type_changed (GtkWidget *widget, gpointer user_data) gui->source.provider = provider; + if (provider) + gtk_label_set_text (gui->source.description, provider->description); + else + gtk_label_set_text (gui->source.description, ""); + frame = glade_xml_get_widget (gui->xml, "source_frame"); if (provider) { gtk_widget_show (frame); @@ -415,7 +420,13 @@ transport_type_changed (GtkWidget *widget, gpointer user_data) provider = gtk_object_get_data (GTK_OBJECT (widget), "provider"); gui->transport.provider = provider; - + + /* description */ + if (provider) + gtk_label_set_text (gui->transport.description, provider->description); + else + gtk_label_set_text (gui->transport.description, ""); + frame = glade_xml_get_widget (gui->xml, "transport_frame"); if (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_HOST) || (CAMEL_PROVIDER_ALLOWS (provider, CAMEL_URL_PART_AUTH) && @@ -854,7 +865,7 @@ setup_service (MailAccountGuiService *gsvc, MailConfigService *service) gboolean use_ssl = camel_url_get_param (url, "use_ssl") != NULL; gtk_toggle_button_set_active (gsvc->use_ssl, use_ssl); } - + if (url->authmech && CAMEL_PROVIDER_ALLOWS (gsvc->provider, CAMEL_URL_PART_AUTH)) { GList *children, *item; CamelServiceAuthType *authtype; @@ -1076,7 +1087,7 @@ load_signature (ESignatureEditor *editor) CORBA_Object_release (pstream_iface, &ev); CORBA_exception_free (&ev); bonobo_object_unref (BONOBO_OBJECT (stream)); - + g_free (html); } } @@ -1216,6 +1227,7 @@ mail_account_gui_new (MailConfigAccount *account) /* Source */ gui->source.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_type_omenu")); + gui->source.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description")); gui->source.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_host")); gtk_signal_connect (GTK_OBJECT (gui->source.hostname), "changed", GTK_SIGNAL_FUNC (service_changed), &gui->source); @@ -1237,6 +1249,7 @@ mail_account_gui_new (MailConfigAccount *account) /* Transport */ gui->transport.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_type_omenu")); + gui->transport.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description")); gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host")); gtk_signal_connect (GTK_OBJECT (gui->transport.hostname), "changed", GTK_SIGNAL_FUNC (service_changed), &gui->transport); @@ -1428,6 +1441,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) fstore = item; hstore = si; } + /* set the menus on the optionmenus */ gtk_option_menu_remove_menu (gui->source.type); gtk_option_menu_set_menu (gui->source.type, stores); @@ -1456,7 +1470,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) gtk_widget_set_usize (GTK_WIDGET (gui->transport.authtype), size_req.width, -1); } - + if (top != NULL) { gtk_widget_show_all (top); } @@ -1466,7 +1480,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) if (ftransport) gtk_signal_emit_by_name (GTK_OBJECT (ftransport), "activate", gui); - + if (source_proto) { setup_service (&gui->source, gui->account->source); gui->source.provider_type = CAMEL_PROVIDER_STORE; @@ -1484,8 +1498,6 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) gui->transport.provider_type = CAMEL_PROVIDER_TRANSPORT; g_free (transport_proto); } - - } static void @@ -1576,19 +1588,19 @@ mail_account_gui_save (MailAccountGui *gui) /* this would happen at an inconvenient time in the druid, * but the druid performs its own check so this can't happen * here. */ - + new_name = e_utf8_gtk_entry_get_text (gui->account_name); old_account = mail_config_get_account_by_name (new_name); - + if (old_account && old_account != account) { e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You may not create two accounts with the same name.")); return FALSE; } - + g_free (account->name); account->name = new_name; - + if (gtk_toggle_button_get_active (gui->default_account)) mail_config_set_default_account (account); @@ -1635,7 +1647,7 @@ mail_account_gui_save (MailAccountGui *gui) account->smime_always_sign = gtk_toggle_button_get_active (gui->smime_always_sign); mail_autoreceive_setup_account (account->source); - + return TRUE; } diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h index eaef146eda..5536182d60 100644 --- a/mail/mail-account-gui.h +++ b/mail/mail-account-gui.h @@ -39,6 +39,7 @@ extern "C" { typedef struct { GtkOptionMenu *type; + GtkLabel *description; GtkEntry *hostname; GtkEntry *username; GtkEntry *path; diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 73309bdf1a..42ad7ba248 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -721,6 +721,23 @@ Click "Finish" to save your settings.</text> <spacing>0</spacing> <widget> + <class>GtkLabel</class> + <name>source_description</name> + <label>description</label> + <justify>GTK_JUSTIFY_LEFT</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>0.5</yalign> + <xpad>5</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> <class>GtkTable</class> <name>table3</name> <border_width>3</border_width> @@ -1259,6 +1276,23 @@ Kerberos <spacing>0</spacing> <widget> + <class>GtkLabel</class> + <name>transport_description</name> + <label>description</label> + <justify>GTK_JUSTIFY_LEFT</justify> + <wrap>False</wrap> + <xalign>7.45058e-09</xalign> + <yalign>0.5</yalign> + <xpad>5</xpad> + <ypad>0</ypad> + <child> + <padding>0</padding> + <expand>False</expand> + <fill>False</fill> + </child> + </widget> + + <widget> <class>GtkTable</class> <name>table5</name> <border_width>3</border_width> diff --git a/mail/mail-tools.h b/mail/mail-tools.h index 0573840dd6..98e68e6920 100644 --- a/mail/mail-tools.h +++ b/mail/mail-tools.h @@ -68,7 +68,7 @@ mail_tool_move_folder_contents (CamelFolder *source, CamelFolder *dest, gboolean XEvolution *mail_tool_remove_xevolution_headers (CamelMimeMessage *message); void mail_tool_restore_xevolution_headers (CamelMimeMessage *message, XEvolution *xev); -void mail_tool_destroy_exevolution (XEvolution *xev); +void mail_tool_destroy_xevolution (XEvolution *xev); /* Generates the subject for a message forwarding @msg */ gchar * |