diff options
author | Shi Pu <shi.pu@sun.com> | 2006-04-30 11:25:15 +0800 |
---|---|---|
committer | Irene Huang <ireneh@src.gnome.org> | 2006-04-30 11:25:15 +0800 |
commit | 9b9eea0891366a8c52287a5fc9942e061a450f21 (patch) | |
tree | 8d1079123a91b372d935fbe7336c7c791d4fb820 | |
parent | b1cb5ad05f1ad24b1621e5fc5c56752f91671614 (diff) | |
download | gsoc2013-evolution-9b9eea0891366a8c52287a5fc9942e061a450f21.tar.gz gsoc2013-evolution-9b9eea0891366a8c52287a5fc9942e061a450f21.tar.zst gsoc2013-evolution-9b9eea0891366a8c52287a5fc9942e061a450f21.zip |
** Fixes bug #323853
2006-04-30 Shi Pu <shi.pu@sun.com>
** 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
-rw-r--r-- | mail/ChangeLog | 11 | ||||
-rw-r--r-- | mail/em-composer-prefs.c | 10 | ||||
-rw-r--r-- | mail/em-mailer-prefs.c | 14 | ||||
-rw-r--r-- | mail/em-mailer-prefs.h | 4 | ||||
-rw-r--r-- | mail/mail-config.glade | 90 |
5 files changed, 49 insertions, 80 deletions
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 <shi.pu@sun.com> + + ** 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 <dobey@novell.com> * 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 <gtk/gtkimage.h> #include <gtk/gtkstock.h> -#include <libgnomeui/gnome-file-entry.h> +#include <gtk/gtkfilechooserbutton.h> #include <libgnomeui/gnome-color-picker.h> #include <gtkhtml/gtkhtml.h> @@ -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 <libgnomeui/gnome-color-picker.h> #include <libgnomeui/gnome-font-picker.h> -#include <libgnomeui/gnome-file-entry.h> +#include <gtk/gtkfilechooserbutton.h> #include <glade/glade.h> @@ -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"</property> </child> <child> - <widget class="GnomeFileEntry" id="source_path_entry"> + <widget class="GtkFileChooserButton" id="source_path_entry"> <property name="visible">True</property> - <property name="max_saved">10</property> - <property name="browse_dialog_title" translatable="yes">Mailbox location</property> - <property name="directory_entry">False</property> - <property name="modal">False</property> - <property name="use_filechooser">True</property> - <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="source_path"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> + <property name="title" translatable="yes">Mailbox location</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">2</property> <property name="bottom_attach">3</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> @@ -5475,7 +5462,7 @@ For example: "Work" or "Personal"</property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">txtNotifyPlaySound</property> + <property name="mnemonic_widget">fileNotifyPlaySoundButton</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -5489,28 +5476,14 @@ For example: "Work" or "Personal"</property> </child> <child> - <widget class="GnomeFileEntry" id="fileNotifyPlaySound"> + <widget class="GtkFileChooserButton" id="fileNotifyPlaySoundButton"> <property name="visible">True</property> - <property name="max_saved">10</property> - <property name="browse_dialog_title" translatable="yes">Select sound file</property> - <property name="directory_entry">False</property> - <property name="modal">False</property> - <property name="use_filechooser">True</property> - <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="txtNotifyPlaySound"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> + <property name="title" translatable="yes">Select sound file</property> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">False</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> </widget> <packing> <property name="padding">0</property> @@ -8746,7 +8719,7 @@ for display purposes only. </property> <property name="yalign">0.5</property> <property name="xpad">0</property> <property name="ypad">0</property> - <property name="mnemonic_widget">combo-entry2</property> + <property name="mnemonic_widget">filechooserbutton_add_script</property> <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property> <property name="width_chars">-1</property> <property name="single_line_mode">False</property> @@ -8784,34 +8757,21 @@ for display purposes only. </property> </child> <child> - <widget class="GnomeFileEntry" id="fileentry_add_script_script"> + <widget class="GtkFileChooserButton" id="filechooserbutton_add_script"> + <property name="title" translatable="yes"></property> <property name="visible">True</property> - <property name="history_id">evolution_script_signature</property> - <property name="max_saved">10</property> - <property name="directory_entry">False</property> - <property name="modal">False</property> - <property name="use_filechooser">True</property> - <property name="filechooser_action">GTK_FILE_CHOOSER_ACTION_OPEN</property> - - <child internal-child="entry"> - <widget class="GtkEntry" id="combo-entry2"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="editable">True</property> - <property name="visibility">True</property> - <property name="max_length">0</property> - <property name="text" translatable="yes"></property> - <property name="has_frame">True</property> - <property name="invisible_char">*</property> - <property name="activates_default">False</property> - </widget> - </child> + <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property> + <property name="local_only">True</property> + <property name="show_hidden">False</property> + <property name="do_overwrite_confirmation">False</property> + <property name="width_chars">-1</property> </widget> <packing> <property name="left_attach">1</property> <property name="right_attach">2</property> <property name="top_attach">1</property> <property name="bottom_attach">2</property> + <property name="x_options">fill</property> <property name="y_options"></property> </packing> </child> |