From 1cca6b24335a9de963ced4b6127f4558ed19cf48 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 8 Jan 2002 00:48:54 +0000 Subject: Renamed. (mail_config_get_new_mail_notify_sound_file): Renamed. 2002-01-07 Jeffrey Stedfast * mail-config.c (mail_config_set_new_mail_notify_sound_file): Renamed. (mail_config_get_new_mail_notify_sound_file): Renamed. * mail-accounts.c (notify_radio_toggled): Replace EXEC with PLAY_SOUND. (construct): renamed the exec_command stuff to play_sound. * main.c (main): Init and shutdown gnome_sound. * mail-ops.c (fetch_mail_fetch): Don't do any new-mail notification here. (filter_folder_filter): call camel_filter_driver_flush. * mail-session.c (main_get_filter_driver): Set the filter-driver exec_func here instead. * mail-ops.c (mail_fetch_mail): Don't set the filter-driver exec_func here. svn path=/trunk/; revision=15263 --- mail/mail-accounts.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'mail/mail-accounts.c') diff --git a/mail/mail-accounts.c b/mail/mail-accounts.c index 0d3eb4bc63..f00be07739 100644 --- a/mail/mail-accounts.c +++ b/mail/mail-accounts.c @@ -695,16 +695,16 @@ notify_radio_toggled (GtkWidget *radio, gpointer data) else if (radio == (GtkWidget *) dialog->notify_beep) mail_config_set_new_mail_notify (MAIL_CONFIG_NOTIFY_BEEP); else - mail_config_set_new_mail_notify (MAIL_CONFIG_NOTIFY_EXEC); + mail_config_set_new_mail_notify (MAIL_CONFIG_NOTIFY_PLAY_SOUND); } static void -notify_command_changed (GtkWidget *entry, gpointer data) +notify_sound_file_changed (GtkWidget *entry, gpointer data) { - char *command; + char *filename; - command = gtk_entry_get_text (GTK_ENTRY (entry)); - mail_config_set_new_mail_notify_command (command); + filename = gtk_entry_get_text (GTK_ENTRY (entry)); + mail_config_set_new_mail_notify_sound_file (filename); } static void @@ -991,16 +991,17 @@ construct (MailAccountsDialog *dialog) gtk_signal_connect (GTK_OBJECT (dialog->notify_beep), "toggled", GTK_SIGNAL_FUNC (notify_radio_toggled), dialog); - dialog->notify_exec = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radioNotifyExec")); - gtk_toggle_button_set_active (dialog->notify_exec, mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_EXEC); - gtk_signal_connect (GTK_OBJECT (dialog->notify_exec), "toggled", + dialog->notify_play_sound = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "radioNotifyPlaySound")); + gtk_toggle_button_set_active (dialog->notify_play_sound, + mail_config_get_new_mail_notify () == MAIL_CONFIG_NOTIFY_PLAY_SOUND); + gtk_signal_connect (GTK_OBJECT (dialog->notify_play_sound), "toggled", GTK_SIGNAL_FUNC (notify_radio_toggled), dialog); - dialog->command_line = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyExecCommandLine")); - gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->command_line)), - mail_config_get_new_mail_notify_command ()); - gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (dialog->command_line)), - "changed", GTK_SIGNAL_FUNC (notify_command_changed), dialog); + dialog->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound")); + gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (dialog->notify_sound_file)), + mail_config_get_new_mail_notify_sound_file ()); + gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (dialog->notify_sound_file)), + "changed", GTK_SIGNAL_FUNC (notify_sound_file_changed), dialog); /* now to fill in the clists */ dialog->accounts_row = -1; -- cgit v1.2.3