diff --git a/mail/ChangeLog b/mail/ChangeLog index 2af99139da..3c26efdc5b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,20 @@ +2001-08-06 Jeffrey Stedfast + + * mail-config.glade: Added key accelerators to a bunch of the + config options and moved the Bcc and empty-subject checkboxes to + the composer tab where they belong. + + * mail-callbacks.c (providers_config): Raise the dialog if it + exists already. + (manage_subscriptions): Raise the dialog if it already exists. + (main_select_first_unread): Removed (we haven't needed this code + in ages). + (select_first_unread): Same. + (save_msg_ok): If the path is empty, just return. + + * mail-local.c (mail_local_reconfigure_folder): Raise the dialog + if it already exists. + 2001-08-06 Jeffrey Stedfast * mail-callbacks.c (expunge_folder): Set the message-display diff --git a/mail/component-factory.c b/mail/component-factory.c index 4275079894..cee845c732 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1016,13 +1016,13 @@ mail_remove_storage (CamelStore *store) * any call to camel_session_get_{service,store} with the same * URL will always return the same object. So this works. */ - + storage = g_hash_table_lookup (storages_hash, store); g_hash_table_remove (storages_hash, store); shell_client = evolution_shell_component_get_owner (shell_component); corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); - + evolution_storage_deregister_on_shell (storage, corba_shell); camel_service_disconnect (CAMEL_SERVICE (store), TRUE, NULL); diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c index f5084270d3..1f37511e96 100644 --- a/mail/mail-account-editor.c +++ b/mail/mail-account-editor.c @@ -70,10 +70,10 @@ static void mail_account_editor_class_init (MailAccountEditorClass *class) { GtkObjectClass *object_class; - + object_class = (GtkObjectClass *) class; parent_class = gtk_type_class (gnome_dialog_get_type ()); - + object_class->finalize = mail_account_editor_finalize; } @@ -81,7 +81,7 @@ static void mail_account_editor_finalize (GtkObject *obj) { MailAccountEditor *editor = (MailAccountEditor *) obj; - + mail_account_gui_destroy (editor->gui); ((GtkObjectClass *)(parent_class))->finalize (obj); } @@ -109,10 +109,16 @@ apply_changes (MailAccountEditor *editor) } mail_account_gui_save (editor->gui); + + /* FIXME: uh, what the hell is this for? */ account = editor->gui->account; /* save any changes we may have */ mail_config_write (); + + /* FIXME: #1549: if the account was a remote store, delete it from the folder-tree and re-add it */ + /* FIXME: preferably, we'd only do this if there were changes... oh well */ + return TRUE; } @@ -120,7 +126,7 @@ static void apply_clicked (GtkWidget *widget, gpointer data) { MailAccountEditor *editor = data; - + apply_changes (editor); } diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c index e5ac76bc56..b140f5197f 100644 --- a/mail/mail-callbacks.c +++ b/mail/mail-callbacks.c @@ -61,7 +61,6 @@ #include "subscribe-dialog.h" #include "e-messagebox.h" -/* FIXME: is there another way to do this? */ #include "Evolution.h" #include "evolution-storage.h" @@ -169,31 +168,11 @@ check_send_configuration (FolderBrowser *fb) return TRUE; } -#if 0 -/* FIXME: is this still required when we send & receive email ? I am not so sure ... */ -static void -main_select_first_unread (CamelObject *object, gpointer event_data, gpointer data) -{ - FolderBrowser *fb = FOLDER_BROWSER (data); - /*ETable *table = E_TABLE_SCROLLED (fb->message_list->etable)->table;*/ - - message_list_select (fb->message_list, 0, MESSAGE_LIST_SELECT_NEXT, - 0, CAMEL_MESSAGE_SEEN); -} - -static void -select_first_unread (CamelObject *object, gpointer event_data, gpointer data) -{ - mail_op_forward_event (main_select_first_unread, object, event_data, data); -} -#endif - void send_receive_mail (GtkWidget *widget, gpointer user_data) { const MailConfigAccount *account; - /* receive first then send, this is a temp fix for POP-before-SMTP */ if (!mail_config_is_configured ()) { if (!configure_mail (FOLDER_BROWSER (user_data))) return; @@ -1481,29 +1460,31 @@ save_msg_ok (GtkWidget *widget, gpointer user_data) { CamelFolder *folder; GPtrArray *uids; - char *path; + const char *path; int fd, ret = 0; - /* FIXME: is path an allocated string? */ path = gtk_file_selection_get_filename (GTK_FILE_SELECTION (user_data)); + if (path[0] == '\0') + return; fd = open (path, O_RDONLY); if (fd != -1) { - GtkWidget *dlg; + GtkWidget *dialog; GtkWidget *text; close (fd); - dlg = gnome_dialog_new (_("Overwrite file?"), - GNOME_STOCK_BUTTON_YES, - GNOME_STOCK_BUTTON_NO, - NULL); + dialog = gnome_dialog_new (_("Overwrite file?"), + GNOME_STOCK_BUTTON_YES, + GNOME_STOCK_BUTTON_NO, + NULL); + text = gtk_label_new (_("A file by that name already exists.\nOverwrite it?")); - gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dlg)->vbox), text, TRUE, TRUE, 4); - gtk_window_set_policy (GTK_WINDOW (dlg), FALSE, TRUE, FALSE); + gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), text, TRUE, TRUE, 4); + gtk_window_set_policy (GTK_WINDOW (dialog), FALSE, TRUE, FALSE); gtk_widget_show (text); - ret = gnome_dialog_run_and_close (GNOME_DIALOG (dlg)); + ret = gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); } if (ret == 0) { @@ -1803,7 +1784,7 @@ providers_config (BonoboUIComponent *uih, void *user_data, const char *path) gnome_dialog_run_and_close (GNOME_DIALOG (dialog)); dialog = NULL; } else { - /* FIXME: raise the dialog? */ + gdk_window_raise (GTK_WIDGET (dialog)->window); } } @@ -1908,7 +1889,7 @@ print_preview_msg (GtkWidget *button, gpointer user_data) /******************** Begin Subscription Dialog ***************************/ -static GtkObject *subscribe_dialog = NULL; +static GtkWidget *subscribe_dialog = NULL; static void subscribe_dialog_destroy (GtkWidget *widget, gpointer user_data) @@ -1925,9 +1906,9 @@ manage_subscriptions (BonoboUIComponent *uih, void *user_data, const char *path) subscribe_dialog_destroy, NULL); subscribe_dialog_run_and_close (SUBSCRIBE_DIALOG (subscribe_dialog)); - gtk_object_unref (subscribe_dialog); + gtk_object_unref (GTK_OBJECT (subscribe_dialog)); } else { - /* FIXME: raise the subscription dialog window... */ + gdk_window_raise (GTK_WIDGET (subscribe_dialog)->window); } } diff --git a/mail/mail-config.c b/mail/mail-config.c index 146fa20de2..fae3a8a0d0 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -278,7 +278,7 @@ config_read (void) gint len, i, default_num; mail_config_clear (); - + len = bonobo_config_get_long_with_default (config->db, "/Mail/Accounts/num", 0, NULL); diff --git a/mail/mail-config.glade b/mail/mail-config.glade index ea1fbe4b05..48a78496ed 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -2296,7 +2296,7 @@ Kerberos cmdMailAble True True - + GTK_RELIEF_NORMAL @@ -2380,7 +2380,7 @@ Kerberos cmdNewsAdd True True - + GTK_RELIEF_NORMAL @@ -2389,7 +2389,7 @@ Kerberos cmdNewsEdit True True - + GTK_RELIEF_NORMAL @@ -2398,7 +2398,7 @@ Kerberos cmdNewsDelete True True - + GTK_RELIEF_NORMAL @@ -2439,7 +2439,7 @@ Kerberos GtkCheckButton chckHighlightCitations True - + False True @@ -2496,7 +2496,7 @@ Kerberos GtkCheckButton checkMarkTimeout True - + False True @@ -2569,7 +2569,7 @@ Kerberos GtkRadioButton radioImagesNever True - + False True images @@ -2584,7 +2584,7 @@ Kerberos GtkRadioButton radioImagesSometimes True - + True True images @@ -2599,7 +2599,7 @@ Kerberos GtkRadioButton radioImagesAlways True - + False True images @@ -2616,7 +2616,7 @@ Kerberos GtkCheckButton chkThreadedList True - + False True @@ -2630,7 +2630,7 @@ Kerberos GtkCheckButton chkShowPreview True - + True True @@ -2665,7 +2665,7 @@ Kerberos GtkCheckButton chkSendHTML True - + False True @@ -2719,6 +2719,34 @@ Quoted + + + GtkCheckButton + chkPromptEmptySubject + True + + True + True + + 0 + False + False + + + + + GtkCheckButton + chkPromptBccOnly + True + + True + True + + 0 + False + False + + @@ -2755,13 +2783,14 @@ Quoted GtkLabel lblPgpPath - + GTK_JUSTIFY_CENTER False 0.5 0.5 0 0 + combo-entry1 0 False @@ -2799,7 +2828,7 @@ Quoted GtkCheckButton chkRememberPGPPassphrase True - + True True @@ -2856,7 +2885,7 @@ Quoted GtkCheckButton chkEmptyTrashOnExit True - + False True @@ -2865,34 +2894,6 @@ Quoted False - - - GtkCheckButton - chkPromptEmptySubject - True - - True - True - - 0 - False - False - - - - - GtkCheckButton - chkPromptBccOnly - True - - True - True - - 0 - False - False - - diff --git a/mail/mail-local.c b/mail/mail-local.c index 6671087ea2..e5cb0fb6d8 100644 --- a/mail/mail-local.c +++ b/mail/mail-local.c @@ -984,7 +984,7 @@ mail_local_reconfigure_folder (FolderBrowser *fb) reconfigure_folder_hash = g_hash_table_new (g_direct_hash, g_direct_equal); if ((gd = g_hash_table_lookup (reconfigure_folder_hash, fb->folder))) { - /* FIXME: raise this dialog?? */ + gdk_window_raise (GTK_WIDGET (gd)->window); return; }