aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-26 12:25:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-26 12:25:10 +0800
commitac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456 (patch)
treed31bbdc1752aea650b3bfadb272492291d3f8228 /mail/importers
parent1c11041eebd485a471e842ba4f75834c2ce6e1f7 (diff)
downloadgsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.gz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.bz2
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.lz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.xz
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.tar.zst
gsoc2013-evolution-ac8e0571f2e3478a2f1fc2a55a2df7dbf8aa0456.zip
set the default selection to inbox.
2004-05-26 Not Zed <NotZed@Ximian.com> * importers/evolution-mbox-importer.c (create_control_fn): set the default selection to inbox. * importers/evolution-outlook-importer.c (folder_selected) (create_control_fn): copied from mbox importer. fixes a crash & lets you choose the target folder. 2004-05-25 Not Zed <NotZed@Ximian.com> * mail-component.c (mc_add_local_store_done): removed, now redundant. * em-folder-tree.c (em_folder_tree_set_selected): fix for path changes. * em-folder-tree-model.c (em_folder_tree_model_set_unread_count): change to use full name rather than path name. * em-folder-tree-model.h: renamed path_hash to full_hash. * em-folder-tree-model.c (folder_subscribed): dont use g_path_get_dirname here, it is os dependent, we want / always. (full_hash_free): rename from path_hash free. svn path=/trunk/; revision=26090
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/evolution-mbox-importer.c5
-rw-r--r--mail/importers/evolution-outlook-importer.c31
2 files changed, 33 insertions, 3 deletions
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index 9e08bf2087..94b8403e28 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -111,13 +111,14 @@ create_control_fn(EvolutionImporter *importer, Bonobo_Control *control, void *da
{
GtkWidget *hbox, *w;
- hbox = gtk_hbox_new(FALSE, FALSE);
+ hbox = gtk_hbox_new(FALSE, 0);
w = gtk_label_new(_("Destination folder:"));
gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
w = em_folder_selection_button_new(_("Select folder"), _("Select folder to import into"));
- /* set selection to Inbox? */
+ em_folder_selection_button_set_selection((EMFolderSelectionButton *)w,
+ mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_INBOX));
g_signal_connect(w, "selected", G_CALLBACK(folder_selected), data);
gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c
index a2c6d035e6..83f5c241a2 100644
--- a/mail/importers/evolution-outlook-importer.c
+++ b/mail/importers/evolution-outlook-importer.c
@@ -113,6 +113,35 @@ process_item_fn(EvolutionImporter *eimporter, CORBA_Object listener, void *data,
/* EvolutionImporterFactory methods */
+static void
+folder_selected(EMFolderSelectionButton *button, OutlookImporter *importer)
+{
+ g_free(importer->uri);
+ importer->uri = g_strdup(em_folder_selection_button_get_selection(button));
+}
+
+static void
+create_control_fn(EvolutionImporter *importer, Bonobo_Control *control, void *data)
+{
+ GtkWidget *hbox, *w;
+
+ hbox = gtk_hbox_new(FALSE, 0);
+
+ w = gtk_label_new(_("Destination folder:"));
+ gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+
+ w = em_folder_selection_button_new(_("Select folder"), _("Select folder to import into"));
+ em_folder_selection_button_set_selection((EMFolderSelectionButton *)w,
+ mail_component_get_folder_uri(NULL, MAIL_COMPONENT_FOLDER_INBOX));
+ g_signal_connect(w, "selected", G_CALLBACK(folder_selected), data);
+ gtk_box_pack_start((GtkBox *)hbox, w, FALSE, TRUE, 6);
+
+ gtk_widget_show_all(hbox);
+
+ /* Another weird-arsed shell api */
+ *control = BONOBO_OBJREF(bonobo_control_new(hbox));
+}
+
static gboolean
support_format_fn(EvolutionImporter *importer, const char *filename, void *data)
{
@@ -252,7 +281,7 @@ outlook_importer_new(void)
oli = g_new0 (OutlookImporter, 1);
oli->status_lock = g_mutex_new();
- importer = evolution_importer_new (NULL, support_format_fn, load_file_fn, process_item_fn, NULL, oli);
+ importer = evolution_importer_new (create_control_fn, support_format_fn, load_file_fn, process_item_fn, NULL, oli);
g_object_weak_ref((GObject *)importer, importer_destroy_cb, oli);
return BONOBO_OBJECT (importer);