aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-08-16 05:47:04 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-08-16 05:47:04 +0800
commit02d49661f322939923b052ab986cda7b0cf50e18 (patch)
tree363caa8fa4ae546a0d485c34986654c4b7b8453c /mail/mail-display.c
parent7da638d6aa8f721765a318abb0250133152ae1e3 (diff)
downloadgsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar.gz
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar.bz2
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar.lz
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar.xz
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.tar.zst
gsoc2013-evolution-02d49661f322939923b052ab986cda7b0cf50e18.zip
Remember the filename is in utf8, so use the e_utf8 functions to set the
2001-08-15 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (save_part): Remember the filename is in utf8, so use the e_utf8 functions to set the filename in the file selection dialog. svn path=/trunk/; revision=12076
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index a681fdd5cf..0a6631d4c7 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -30,6 +30,7 @@
#include <gdk-pixbuf/gdk-pixbuf-loader.h>
#include <gal/util/e-util.h>
#include <gal/widgets/e-popup-menu.h>
+#include <gal/widgets/e-unicode.h>
#include <gtk/gtkinvisible.h>
#include <gtkhtml/gtkhtml-embedded.h>
#include <gtkhtml/htmlengine.h> /* XXX */
@@ -211,24 +212,26 @@ save_part (CamelMimePart *part)
{
GtkFileSelection *file_select;
char *filename;
-
- if(save_pathname == NULL)
+
+ if (save_pathname == NULL)
save_pathname = g_strdup (g_get_home_dir ());
-
+
filename = make_safe_filename (save_pathname, part);
-
+
file_select = GTK_FILE_SELECTION (
gtk_file_selection_new (_("Save Attachment")));
gtk_file_selection_set_filename (file_select, filename);
+ /* set the GtkEntry with the locale filename by breaking abstraction */
+ e_utf8_gtk_entry_set_text (GTK_ENTRY (file_select->selection_entry), g_basename (filename));
g_free (filename);
-
+
gtk_signal_connect (GTK_OBJECT (file_select->ok_button), "clicked",
GTK_SIGNAL_FUNC (save_data_cb), part);
gtk_signal_connect_object (GTK_OBJECT (file_select->cancel_button),
"clicked",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (file_select));
-
+
gtk_widget_show (GTK_WIDGET (file_select));
}