From f465875a69cf6efa9d73011dfc88e6998ebcff8e Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Sat, 8 Feb 2003 18:25:14 +0000 Subject: Error handling in moz bookmarks import. Error handling in moz bookmarks import. --- ChangeLog | 6 ++++++ src/ephy-shell.c | 26 ++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 956e1b378..f1eab9f0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-02-08 Xan Lopez + + * src/ephy-shell.c: + + Error handling in Mozilla bookmarks import. + 2003-02-08 Xan Lopez * embed/mozilla/StartHereProtocolHandler.cpp: diff --git a/src/ephy-shell.c b/src/ephy-shell.c index 9f903c500..8d8e461e8 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -135,14 +135,24 @@ ephy_shell_command_cb (EphyEmbedShell *shell, if (strcmp (command, "import-mozilla-bookmarks") == 0) { - ephy_bookmarks_import_mozilla (bookmarks, param); - - dialog = gtk_message_dialog_new - (NULL, - GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_OK, - _("Bookmarks imported successfully.")); + if (ephy_bookmarks_import_mozilla (bookmarks, param)) + { + dialog = gtk_message_dialog_new + (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Mozilla bookmarks imported successfully.")); + } + else + { + dialog = gtk_message_dialog_new + (NULL, + GTK_DIALOG_MODAL, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + _("Importing Mozilla bookmarks failed.")); + } gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } -- cgit v1.2.3