diff options
-rw-r--r-- | importers/ChangeLog | 19 | ||||
-rw-r--r-- | importers/elm-importer.c | 22 | ||||
-rw-r--r-- | importers/evolution-gnomecard-importer.c | 3 | ||||
-rw-r--r-- | importers/netscape-importer.c | 20 | ||||
-rw-r--r-- | importers/pine-importer.c | 18 |
5 files changed, 49 insertions, 33 deletions
diff --git a/importers/ChangeLog b/importers/ChangeLog index b80ca5493b..e5e6900b40 100644 --- a/importers/ChangeLog +++ b/importers/ChangeLog @@ -1,3 +1,22 @@ +2001-11-09 Iain Holmes <iain@ximian.com> + + * netscape-importer.c (netscape_create_structure): Don't open the + dialog window if we're not importing anything. + (netscape_restore_settings): Always set do_mail and do_settings to + FALSE. + + * pine-importer.c (pine_restore_settings): Always set do_mail and + do_address to FALSE. + (pine_create_structure): Onlu open a dialog if something is being + imported. + + * elm-importer.c (elm_restore_settings): Always set do_mail to FALSE. + (elm_create_structure): Only open a dialog if the mail is being + imported. + + * evolution-gnomecard-importer.c (gnomecard_restore_settings): Always + set do_addresses to FALSE. + 2001-10-30 Iain Holmes <iain@ximian.com> * evolution-gnomecard-importer.c (create_checkboxes_control): Remove the diff --git a/importers/elm-importer.c b/importers/elm-importer.c index 5b0aeac77a..ad48fb446b 100644 --- a/importers/elm-importer.c +++ b/importers/elm-importer.c @@ -114,8 +114,7 @@ elm_store_settings (ElmImporter *importer) static void elm_restore_settings (ElmImporter *importer) { - importer->do_mail = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Elm/mail", TRUE, NULL); + importer->do_mail = FALSE; } static void @@ -443,19 +442,18 @@ elm_create_structure (EvolutionIntelligentImporter *ii, elm_store_settings (importer); - /* Create a dialog */ - importer->dialog = create_importer_gui (importer); - gtk_widget_show_all (importer->dialog); - while (gtk_events_pending ()) { - gtk_main_iteration (); - } - if (importer->do_mail == TRUE) { char *elmdir; + importer->dialog = create_importer_gui (importer); + gtk_widget_show_all (importer->dialog); + while (gtk_events_pending ()) { + gtk_main_iteration (); + } + bonobo_config_set_boolean (importer->db, - "/Importer/Elm/mail-imported", TRUE, NULL); - + "/Importer/Elm/mail-imported", TRUE, NULL); + maildir = elm_get_rc_value ("maildir"); if (maildir == NULL) { maildir = g_strdup ("Mail"); @@ -470,7 +468,7 @@ elm_create_structure (EvolutionIntelligentImporter *ii, } g_free (maildir); - + scan_dir (importer, "/", maildir); g_free (maildir); diff --git a/importers/evolution-gnomecard-importer.c b/importers/evolution-gnomecard-importer.c index 8b90d69024..e910a10426 100644 --- a/importers/evolution-gnomecard-importer.c +++ b/importers/evolution-gnomecard-importer.c @@ -64,8 +64,7 @@ gnomecard_store_settings (GnomeCardImporter *importer) static void gnomecard_restore_settings (GnomeCardImporter *importer) { - importer->do_addresses = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Gnomecard/address", TRUE, NULL); + importer->do_addresses = FALSE; } static gboolean diff --git a/importers/netscape-importer.c b/importers/netscape-importer.c index 4e6df275b3..d8daf4329e 100644 --- a/importers/netscape-importer.c +++ b/importers/netscape-importer.c @@ -129,11 +129,8 @@ netscape_store_settings (NetscapeImporter *importer) static void netscape_restore_settings (NetscapeImporter *importer) { - importer->do_mail = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Netscape/mail", TRUE, NULL); - - importer->do_settings = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Netscape/settings", TRUE, NULL); + importer->do_mail = FALSE; + importer->do_settings = FALSE; } static const char * @@ -866,11 +863,14 @@ netscape_create_structure (EvolutionIntelligentImporter *ii, netscape_store_settings (importer); - /* Create a dialog */ - importer->dialog = create_importer_gui (importer); - gtk_widget_show_all (importer->dialog); - while (gtk_events_pending ()) { - gtk_main_iteration (); + /* Create a dialog if we're going to be active */ + if (importer->do_settings == TRUE || + importer->do_mail == TRUE) { + importer->dialog = create_importer_gui (importer); + gtk_widget_show_all (importer->dialog); + while (gtk_events_pending ()) { + gtk_main_iteration (); + } } if (importer->do_settings == TRUE) { diff --git a/importers/pine-importer.c b/importers/pine-importer.c index ab00c7d0ab..f2c812ddca 100644 --- a/importers/pine-importer.c +++ b/importers/pine-importer.c @@ -122,11 +122,8 @@ pine_store_settings (PineImporter *importer) static void pine_restore_settings (PineImporter *importer) { - importer->do_mail = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Pine/mail", TRUE, NULL); - - importer->do_address = bonobo_config_get_boolean_with_default ( - importer->db, "/Importer/Pine/address", TRUE, NULL); + importer->do_mail = FALSE; + importer->do_address = FALSE; } @@ -548,10 +545,13 @@ pine_create_structure (EvolutionIntelligentImporter *ii, pine_store_settings (importer); /* Create a dialog */ - importer->dialog = create_importer_gui (importer); - gtk_widget_show_all (importer->dialog); - while (gtk_events_pending ()) { - gtk_main_iteration (); + if (importer->do_address == TRUE || + importer->do_mail == TRUE) { + importer->dialog = create_importer_gui (importer); + gtk_widget_show_all (importer->dialog); + while (gtk_events_pending ()) { + gtk_main_iteration (); + } } if (importer->do_address == TRUE) { |