[evolution-patches] Fix bug 323853
- From: Nancy Cai <Nancy Cai Sun COM>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Fix bug 323853
- Date: Wed, 25 Jan 2006 15:36:18 +0800
Hi
I have fixed bug 323853. You can visit the page at
http://bugzilla.gnome.org/show_bug.cgi?id=323853 for more details.
Thanks.
--Nancy
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/shell/ChangeLog,v
retrieving revision 1.1557
diff -u -p -r1.1557 ChangeLog
--- ChangeLog 23 Jan 2006 16:48:05 -0000 1.1557
+++ ChangeLog 25 Jan 2006 06:40:49 -0000
@@ -1,3 +1,10 @@
+2006-01-25 Nancy Cai <nancy cai sun com>
+
+ * e-shell-importer.c: (filename_changed), (item_selected),
+ (importer_file_page_new), (prepare_file_page):replacing
+ GnomeFileEntry by GtkFileButton, which can import task files
+ with none UTF-8 filenames.Fixes bug 323853.
+
2006-01-23 Joe Marcus Clarke <marcus freebsd org>
* e-user-creatable-items-handler.c: adding a check to make sure
Index: e-shell-importer.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/e-shell-importer.c,v
retrieving revision 1.85
diff -u -p -r1.85 e-shell-importer.c
--- e-shell-importer.c 18 Dec 2005 04:33:14 -0000 1.85
+++ e-shell-importer.c 25 Jan 2006 06:40:50 -0000
@@ -177,7 +177,7 @@ create_help (const char *name)
/* Importing functions */
static void
-filename_changed (GtkEntry *entry,
+filename_changed (GtkWidget *widget,
ImportData *data)
{
ImportDialogFilePage *page;
@@ -186,7 +186,11 @@ filename_changed (GtkEntry *entry,
page = data->filepage;
- filename = gtk_entry_get_text (entry);
+#ifdef USE_GTKFILECHOOSER
+ filename = gtk_file_chooser_get_filename ((GtkFileChooser *)widget);
+#else
+ filename = gtk_entry_get_text ((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)widget));
+#endif
fileok = filename && filename[0] && g_file_test(filename, G_FILE_TEST_IS_REGULAR);
if (fileok) {
@@ -239,7 +243,7 @@ item_selected (GtkWidget *item,
ImportData *data)
{
data->filepage->importer = g_object_get_data((GObject *)item, "importer");
- filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+ filename_changed(data->filepage->filename, data);
}
#if 0
@@ -287,11 +291,16 @@ importer_file_page_new (ImportData *data
GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment (GTK_MISC (label), 1, 0.5);
+#ifdef USE_GTKFILECHOOSER
+ page->filename = gtk_file_chooser_button_new (_("Select a file"), GTK_FILE_CHOOSER_ACTION_OPEN);
+ g_signal_connect (page->filename, "selection-changed",G_CALLBACK (filename_changed),data);
+#else
page->filename = gnome_file_entry_new ("Evolution_Importer_FileName", _("Select a file"));
g_object_set (G_OBJECT (page->filename), "use_filechooser", TRUE, NULL);
entry = gnome_file_entry_gtk_entry((GnomeFileEntry *)page->filename);
g_signal_connect (entry, "changed", G_CALLBACK (filename_changed), data);
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
+#endif
gtk_table_attach (GTK_TABLE (table), page->filename, 1, 2,
row, row + 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
@@ -546,7 +555,7 @@ prepare_file_page (GnomeDruidPage *dpage
ImportDialogFilePage *page = data->filepage;
if (page->target != NULL) {
- filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+ filename_changed(data->filepage->filename, data);
return FALSE;
}
@@ -571,7 +580,7 @@ prepare_file_page (GnomeDruidPage *dpage
data->filepage->menu = menu;
gtk_option_menu_set_menu((GtkOptionMenu *)data->filepage->filetype, menu);
- filename_changed((GtkEntry *)gnome_file_entry_gtk_entry((GnomeFileEntry *)data->filepage->filename), data);
+ filename_changed(data->filepage->filename, data);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]