diff options
Diffstat (limited to 'mail/importers')
-rw-r--r-- | mail/importers/evolution-mbox-importer.c | 5 | ||||
-rw-r--r-- | mail/importers/evolution-outlook-importer.c | 31 |
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); |