aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorJP Rosevear <jpr@ximian.com>2004-04-14 23:46:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-04-14 23:46:33 +0800
commita133c16ccf9334dc665a82d6ddc37a26c2d3a23d (patch)
tree816fa159f48f54cb16487d3a1a23177c76fd76d3 /shell
parentf10397cffaa4a7ca1027d5e45954d8b486ad5e2d (diff)
downloadgsoc2013-evolution-a133c16ccf9334dc665a82d6ddc37a26c2d3a23d.tar.gz
gsoc2013-evolution-a133c16ccf9334dc665a82d6ddc37a26c2d3a23d.tar.zst
gsoc2013-evolution-a133c16ccf9334dc665a82d6ddc37a26c2d3a23d.zip
differentiate between user cancellation and no importer (next_file_page):
2004-04-14 JP Rosevear <jpr@ximian.com> * e-shell-importer.c (get_iid_for_filetype): differentiate between user cancellation and no importer (next_file_page): don't throw up a dialog if the user cancelled the selection process svn path=/trunk/; revision=25461
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog7
-rw-r--r--shell/e-shell-importer.c25
2 files changed, 22 insertions, 10 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index dc5f7d4fae..a15b3dfcca 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,12 @@
2004-04-14 JP Rosevear <jpr@ximian.com>
+ * e-shell-importer.c (get_iid_for_filetype): differentiate between
+ user cancellation and no importer
+ (next_file_page): don't throw up a dialog if the user cancelled
+ the selection process
+
+2004-04-14 JP Rosevear <jpr@ximian.com>
+
* e-shell-importer.c (start_import): don't unref the dialog,
destroy it properly
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 79c961ef7d..18268cc004 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -370,13 +370,12 @@ choose_importer_from_list (GList *importer_list)
return g_strdup (iid);
}
-static char *
-get_iid_for_filetype (const char *filename)
+static gboolean
+get_iid_for_filetype (const char *filename, char **ret_iid)
{
Bonobo_ServerInfoList *info_list;
CORBA_Environment ev;
GList *can_handle = NULL;
- char *ret_iid;
int i, len = 0;
CORBA_exception_init (&ev);
@@ -420,22 +419,24 @@ get_iid_for_filetype (const char *filename)
iid = can_handle->data;
- ret_iid = g_strdup (iid->iid);
+ *ret_iid = g_strdup (iid->iid);
free_iid_list (can_handle);
g_list_free (can_handle);
- return ret_iid;
+ return TRUE;
} else if (len > 1) {
/* Display all the IIDs */
- ret_iid = choose_importer_from_list (can_handle);
+ *ret_iid = choose_importer_from_list (can_handle);
free_iid_list (can_handle);
g_list_free (can_handle);
- return ret_iid;
+ return *ret_iid ? TRUE : FALSE;
} else {
- return NULL;
+ *ret_iid = NULL;
+
+ return TRUE;
}
}
@@ -482,7 +483,7 @@ start_import (gpointer parent, const char *filename, EvolutionImporterClient *cl
g_object_unref (icd->client);
if (icd->dialog)
- gtk_widget_destroy (icd->dialog);
+ gtk_widget_destroy (GTK_WIDGET (icd->dialog));
g_free (icd);
return;
}
@@ -1029,7 +1030,11 @@ next_file_page (GnomeDruidPage *page,
/* Work out the component to use */
if (data->choosen_iid == NULL || strcmp (data->choosen_iid, "Automatic") == 0) {
- real_iid = get_iid_for_filetype (data->filename);
+ if (!get_iid_for_filetype (data->filename, &real_iid)) {
+ gnome_druid_set_page (druid, GNOME_DRUID_PAGE (data->filedialog));
+
+ return TRUE;
+ }
} else {
real_iid = g_strdup (data->choosen_iid);
}