From 9b9eea0891366a8c52287a5fc9942e061a450f21 Mon Sep 17 00:00:00 2001 From: Shi Pu Date: Sun, 30 Apr 2006 03:25:15 +0000 Subject: ** Fixes bug #323853 2006-04-30 Shi Pu ** Fixes bug #323853 * em-composer-prefs.c: (sig_edit_cb), (sig_add_script_response): * em-mailer-prefs.c: (notify_sound_changed), (em_mailer_prefs_construct): * em-mailer-prefs.h: * mail-config.glade: Replace GnomeFileEntry by GtkFileChooserButton. svn path=/trunk/; revision=31933 --- mail/ChangeLog | 11 ++++++ mail/em-composer-prefs.c | 10 +++--- mail/em-mailer-prefs.c | 14 ++++---- mail/em-mailer-prefs.h | 4 +-- mail/mail-config.glade | 90 ++++++++++++++---------------------------------- 5 files changed, 49 insertions(+), 80 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 3583dc3a62..a91c245810 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +2006-04-30 Shi Pu + + ** Fixes bug #323853 + + * em-composer-prefs.c: (sig_edit_cb), (sig_add_script_response): + * em-mailer-prefs.c: (notify_sound_changed), + (em_mailer_prefs_construct): + * em-mailer-prefs.h: + * mail-config.glade: + Replace GnomeFileEntry by GtkFileChooserButton. + 2006-04-27 Rodney Dawes * em-folder-tree.c (render_pixbuf): Use gnome-fs-trash-empty rather diff --git a/mail/em-composer-prefs.c b/mail/em-composer-prefs.c index 8f4df147a3..10a8321025 100644 --- a/mail/em-composer-prefs.c +++ b/mail/em-composer-prefs.c @@ -57,7 +57,7 @@ #include #include -#include +#include #include #include @@ -319,8 +319,8 @@ sig_edit_cb (GtkWidget *widget, EMComposerPrefs *prefs) /* signature script */ GtkWidget *entry; - entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); - gnome_file_entry_set_filename ((GnomeFileEntry *) entry, sig->filename); + entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script"); + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (entry), sig->filename); entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); gtk_entry_set_text (GTK_ENTRY (entry), sig->name); @@ -383,8 +383,8 @@ sig_add_script_response (GtkWidget *widget, int button, EMComposerPrefs *prefs) int argc; if (button == GTK_RESPONSE_ACCEPT) { - entry = glade_xml_get_widget (prefs->sig_script_gui, "fileentry_add_script_script"); - script = gnome_file_entry_get_full_path((GnomeFileEntry *)entry, FALSE); + entry = glade_xml_get_widget (prefs->sig_script_gui, "filechooserbutton_add_script"); + script = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (entry)); entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name"); name = gtk_entry_get_text (GTK_ENTRY (entry)); diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index bf32fd9fb3..f15dcf3990 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -37,7 +37,7 @@ #include #include -#include +#include #include @@ -662,10 +662,8 @@ static void notify_sound_changed (GtkWidget *widget, EMMailerPrefs *prefs) { const char *filename; - GtkWidget *entry; - - entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (prefs->notify_sound_file)); - filename = gtk_entry_get_text (GTK_ENTRY (entry)); + + filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (prefs->notify_sound_file)); gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/notify/sound", filename, NULL); } @@ -806,10 +804,10 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) if (locked) gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_play_sound, FALSE); - prefs->notify_sound_file = GNOME_FILE_ENTRY (glade_xml_get_widget (gui, "fileNotifyPlaySound")); + prefs->notify_sound_file = GTK_FILE_CHOOSER_BUTTON (glade_xml_get_widget (gui, "fileNotifyPlaySoundButton")); buf = gconf_client_get_string (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL); - gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (prefs->notify_sound_file)), buf ? buf : ""); - g_signal_connect (gnome_file_entry_gtk_entry (prefs->notify_sound_file), "changed", + gtk_file_chooser_set_filename (GTK_FILE_CHOOSER_BUTTON (prefs->notify_sound_file), buf ? buf : ""); + g_signal_connect (GTK_FILE_CHOOSER_BUTTON (prefs->notify_sound_file), "selection-changed", G_CALLBACK (notify_sound_changed), prefs); if (!gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/notify/sound", NULL)) gtk_widget_set_sensitive ((GtkWidget *) prefs->notify_sound_file, FALSE); diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index 7f38c3a164..0d5eb2cc97 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -38,7 +38,7 @@ struct _GdkPixbuf; struct _GtkWidget; struct _GladeXML; struct _GnomeColorPicker; -struct _GnomeFileEntry; +struct _GtkFileChooserbutton; struct _GnomeFontPicker; struct _GConfClient; struct _GtkButton; @@ -87,7 +87,7 @@ struct _EMMailerPrefs { struct _GtkToggleButton *notify_not; struct _GtkToggleButton *notify_beep; struct _GtkToggleButton *notify_play_sound; - struct _GnomeFileEntry *notify_sound_file; + struct _GtkFileChooserButton *notify_sound_file; /* HTML Mail tab */ struct _GnomeFontPicker *font_variable; diff --git a/mail/mail-config.glade b/mail/mail-config.glade index cd90f77df5..5dafaec6b4 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1341,34 +1341,21 @@ For example: "Work" or "Personal" - + True - 10 - Mailbox location - False - False - True - GTK_FILE_CHOOSER_ACTION_OPEN - - - - True - True - True - True - 0 - - True - * - False - - + Mailbox location + GTK_FILE_CHOOSER_ACTION_OPEN + True + False + False + -1 1 2 2 3 + fill @@ -5475,7 +5462,7 @@ For example: "Work" or "Personal" 0.5 0 0 - txtNotifyPlaySound + fileNotifyPlaySoundButton PANGO_ELLIPSIZE_NONE -1 False @@ -5489,28 +5476,14 @@ For example: "Work" or "Personal" - + True - 10 - Select sound file - False - False - True - GTK_FILE_CHOOSER_ACTION_OPEN - - - - True - True - True - True - 0 - - True - * - False - - + Select sound file + GTK_FILE_CHOOSER_ACTION_OPEN + False + False + False + -1 0 @@ -8746,7 +8719,7 @@ for display purposes only. 0.5 0 0 - combo-entry2 + filechooserbutton_add_script PANGO_ELLIPSIZE_NONE -1 False @@ -8784,34 +8757,21 @@ for display purposes only. - + + True - evolution_script_signature - 10 - False - False - True - GTK_FILE_CHOOSER_ACTION_OPEN - - - - True - True - True - True - 0 - - True - * - False - - + GTK_FILE_CHOOSER_ACTION_OPEN + True + False + False + -1 1 2 1 2 + fill -- cgit v1.2.3