Don't let the importers run if people don't want them to
svn path=/trunk/; revision=14664
This commit is contained in:
@ -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
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
Reference in New Issue
Block a user