aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-importer.c
diff options
context:
space:
mode:
authorIain Holmes <iain@src.gnome.org>2001-09-15 03:48:10 +0800
committerIain Holmes <iain@src.gnome.org>2001-09-15 03:48:10 +0800
commit2fe33405860f002a63f97f0c85d62f774bcc6fb0 (patch)
tree1da25fefa5853f79c62c50a4343936a2eeefa2a5 /shell/e-shell-importer.c
parent3e92e7a0eb9944948e9d919b06ae5a0079cd119f (diff)
downloadgsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar.gz
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar.bz2
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar.lz
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar.xz
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.tar.zst
gsoc2013-evolution-2fe33405860f002a63f97f0c85d62f774bcc6fb0.zip
Fix crash and remove warning
svn path=/trunk/; revision=12828
Diffstat (limited to 'shell/e-shell-importer.c')
-rw-r--r--shell/e-shell-importer.c34
1 files changed, 6 insertions, 28 deletions
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index a419091198..55145ff962 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -357,9 +357,12 @@ start_import (const char *folderpath,
/* Only allow importing to /local */
localpath = "/" E_LOCAL_STORAGE_NAME "/";
- if (strncmp (folderpath, localpath, strlen (localpath))) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, _("You may only import to local folders"));
- return;
+ if (folderpath != NULL) {
+ if (strncmp (folderpath, localpath, strlen (localpath))) {
+ e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
+ _("You may only import to local folders"));
+ return;
+ }
}
if (iid == NULL || strcmp (iid, "Automatic") == 0) {
@@ -637,13 +640,6 @@ import_druid_finish (GnomeDruidPage *page,
ImportData *data)
{
GtkWidget *folder;
-#if 0
- char *filename;
- char *iid;
-
- filename = g_strdup (gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (data->filepage->filename)))));
- iid = g_strdup (data->choosen_iid);
-#endif
folder = e_shell_folder_selection_dialog_new (data->shell,
_("Select folder"),
@@ -658,24 +654,6 @@ import_druid_finish (GnomeDruidPage *page,
gtk_widget_hide (data->dialog);
gtk_widget_show (folder);
-#if 0
- gnome_dialog_close_hides (GNOME_DIALOG (folder), TRUE);
- switch (gnome_dialog_run (GNOME_DIALOG (folder))) {
- case 0:
- case 2:
- foldername = e_shell_folder_selection_dialog_get_selected_path (E_SHELL_FOLDER_SELECTION_DIALOG (folder));
- g_print ("Folder name: %s", foldername);
- start_import (foldername, filename, iid);
- /* Fall through */
-
- default:
- gtk_widget_destroy (folder);
- break;
- }
-
- g_free (filename);
- g_free (iid);
-#endif
}
static gboolean