From c7ac2cb4f382d432eeba52777bff2c5c99680d4c Mon Sep 17 00:00:00 2001 From: Rodney Dawes Date: Thu, 25 Mar 2004 06:56:12 +0000 Subject: Use gtk_window_present instead of doing a show then raise, as this also 2004-03-25 Rodney Dawes * em-composer-prefs.c (sig_edit_cb): (sig_add_script_cb): Use gtk_window_present instead of doing a show then raise, as this also puts the window on the current workspace (em_composer_prefs_construct): Fix the border widths for the dialog vbox and action area to be HIG-compliant, and realize the window Remove the dialog separator Use a box_pack_start, rather than box_pack_start_defaults which causes some weird behaviour when changing the border widths * em-subscribe-editor.c (em_subscribe_editor_new): Realize the dialog and set the border widths for its vbox and action area to be compliant with the HIG * local-config.glade: Removed this file as it is no longer used * mail-account-editor.c (construct): Realize the dialog, remove its separator, and set the border widths for its vbox and action area to be HIG-compliant * mail-account-editor.c (source_type_changed): (transport_type_changed): Fix the showing and hiding of the widgets related to the SSL options (mail_account_gui_new): Get the transport/source frames for the SSL options, and hide them by default Show the default folder buttons by default here (mail_account_gui_setup): Only call _show not _show_all here, so we don't mess up the shown/hidden state of things * mail-account-gui.h: Add ssl_frame widget to the MailAccountGuiService * mail-config.glade: * mail-search.glade: * mail-security.glade: HIG-compliance fixes for the glade dialogs * message-tag-followup.c (construct): Don't set border_width on the dialog itself Remove the separator from the dialog Set the border_widths for the dialog's vbox and action areas to be compliant with the HIG * message-tags.glade: * subscribe-dialog.glade: HIG-compliance fixes for these dialogs Original patch from Martyn Russell svn path=/trunk/; revision=25183 --- mail/mail-account-gui.c | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'mail/mail-account-gui.c') diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 5dbebf3d91..920fb18c0c 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -567,11 +567,14 @@ source_type_changed (GtkWidget *widget, gpointer user_data) /* ssl */ #ifdef HAVE_SSL - if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) + gtk_widget_hide (gui->source.no_ssl); + if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) { + gtk_widget_show (gui->source.ssl_frame); gtk_widget_show (gui->source.ssl_hbox); - else + } else { + gtk_widget_hide (gui->source.ssl_frame); gtk_widget_hide (gui->source.ssl_hbox); - gtk_widget_hide (gui->source.no_ssl); + } #else gtk_widget_hide (gui->source.ssl_hbox); gtk_widget_show (gui->source.no_ssl); @@ -660,11 +663,14 @@ transport_type_changed (GtkWidget *widget, gpointer user_data) /* ssl */ #ifdef HAVE_SSL - if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) + gtk_widget_hide (gui->transport.no_ssl); + if (provider && provider->flags & CAMEL_PROVIDER_SUPPORTS_SSL) { + gtk_widget_show (gui->transport.ssl_frame); gtk_widget_show (gui->transport.ssl_hbox); - else + } else { + gtk_widget_hide (gui->transport.ssl_frame); gtk_widget_hide (gui->transport.ssl_hbox); - gtk_widget_hide (gui->transport.no_ssl); + } #else gtk_widget_hide (gui->transport.ssl_hbox); gtk_widget_show (gui->transport.no_ssl); @@ -1597,6 +1603,8 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog) gui->source.path = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_path")); g_signal_connect (gui->source.path, "changed", G_CALLBACK (service_changed), &gui->source); + gui->source.ssl_frame = glade_xml_get_widget (gui->xml, "source_security_frame"); + gtk_widget_hide (gui->source.ssl_frame); gui->source.ssl_hbox = glade_xml_get_widget (gui->xml, "source_ssl_hbox"); gui->source.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_use_ssl")); construct_ssl_menu (&gui->source); @@ -1620,6 +1628,8 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog) gui->transport.username = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_user")); g_signal_connect (gui->transport.username, "changed", G_CALLBACK (service_changed), &gui->transport); + gui->transport.ssl_frame = glade_xml_get_widget (gui->xml, "transport_security_frame"); + gtk_widget_hide (gui->transport.ssl_frame); gui->transport.ssl_hbox = glade_xml_get_widget (gui->xml, "transport_ssl_hbox"); gui->transport.use_ssl = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_use_ssl")); construct_ssl_menu (&gui->transport); @@ -1641,7 +1651,8 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog) else gui->drafts_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_DRAFTS)); em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->drafts_folder_button, gui->drafts_folder_uri); - + gtk_widget_show (gui->drafts_folder_button); + /* Sent folder */ gui->sent_folder_button = GTK_BUTTON (glade_xml_get_widget (gui->xml, "sent_button")); g_signal_connect (gui->sent_folder_button, "selected", G_CALLBACK (folder_selected), &gui->sent_folder_uri); @@ -1650,7 +1661,8 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog) else gui->sent_folder_uri = g_strdup(mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_SENT)); em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri); - + gtk_widget_show (gui->sent_folder_button); + /* Special Folders "Reset Defaults" button */ gui->restore_folders_button = (GtkButton *)glade_xml_get_widget (gui->xml, "default_folders_button"); g_signal_connect (gui->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), gui); @@ -1876,7 +1888,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top) } if (top != NULL) { - gtk_widget_show_all (top); + gtk_widget_show (top); } if (fstore) { -- cgit v1.2.3