aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-importer.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-01-16 06:31:45 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-01-16 06:31:45 +0800
commit33748a64453cf5bcbde73ec7bf0a983ecfa49ff4 (patch)
tree9fc1c809be81a37dec80d9140c665fd53460c061 /shell/e-shell-importer.c
parent7c0893f81c3f2d8305a4592dafb4a75262ec31a5 (diff)
downloadgsoc2013-evolution-33748a64453cf5bcbde73ec7bf0a983ecfa49ff4.tar.gz
gsoc2013-evolution-33748a64453cf5bcbde73ec7bf0a983ecfa49ff4.tar.zst
gsoc2013-evolution-33748a64453cf5bcbde73ec7bf0a983ecfa49ff4.zip
[Fix #17441, Crash trying to import Multiple VCard file into LDAP
folder.] * e-shell-importer.c (show_error): Add a NULL in the call to `gnome_message_box_new()'. svn path=/trunk/; revision=15333
Diffstat (limited to 'shell/e-shell-importer.c')
-rw-r--r--shell/e-shell-importer.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/shell/e-shell-importer.c b/shell/e-shell-importer.c
index 2dcb3b68bf..abb1edcbf1 100644
--- a/shell/e-shell-importer.c
+++ b/shell/e-shell-importer.c
@@ -379,7 +379,19 @@ get_iid_for_filetype (const char *filename)
return NULL;
}
}
-
+
+static void
+show_error (const char *message,
+ const char *title)
+{
+ GtkWidget *box;
+
+ box = gnome_message_box_new (message, GNOME_MESSAGE_BOX_ERROR, GNOME_STOCK_BUTTON_OK, NULL);
+ gtk_window_set_title (GTK_WINDOW (box), title);
+
+ gtk_widget_show (box);
+}
+
static void
start_import (const char *folderpath,
const char *filename,
@@ -395,7 +407,7 @@ start_import (const char *folderpath,
char *message;
message = g_strdup_printf (_("File %s does not exist"), filename);
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, message);
+ show_error (message, _("Evolution Error"));
g_free (message);
return;
@@ -405,8 +417,7 @@ start_import (const char *folderpath,
localpath = "/" E_LOCAL_STORAGE_NAME "/";
if (folderpath != NULL) {
if (strncmp (folderpath, localpath, strlen (localpath))) {
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
- _("You may only import to local folders"));
+ show_error (_("You may only import to local folders"), _("Evolution Error"));
return;
}
}
@@ -422,7 +433,7 @@ start_import (const char *folderpath,
char *message;
message = g_strdup_printf (_("There is no importer that is able to handle\n%s"), filename);
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, message);
+ show_error (message, _("Evolution Error"));
g_free (message);
return;
@@ -472,7 +483,7 @@ start_import (const char *folderpath,
if (evolution_importer_client_load_file (icd->client, filename, folderpath) == FALSE) {
label = g_strdup_printf (_("Error loading %s"), filename);
- e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, label);
+ show_error (label, _("Evolution Error"));
gtk_label_set_text (GTK_LABEL (icd->contents), label);
g_free (label);
@@ -900,6 +911,8 @@ folder_selected (EShellFolderSelectionDialog *dialog,
filename = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (data->filepage->filename), FALSE);
gtk_widget_destroy (data->dialog);
+ gtk_widget_hide (GTK_WIDGET (dialog));
+
start_import (path, filename, iid);
g_free (iid);