[gnome-commander/gcmd-1-3] Simplify error handling
- From: Piotr Eljasiak <epiotr src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-commander/gcmd-1-3] Simplify error handling
- Date: Tue, 14 Jul 2009 22:19:43 +0000 (UTC)
commit 509c05f870ad909fccbb6ceef691693dc9946aa0
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Tue Jul 14 23:55:07 2009 +0200
Simplify error handling
src/gnome-cmd-file-selector.cc | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index b27be9c..1e1e402 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1473,29 +1473,21 @@ static void on_con_open_done (GnomeCmdCon *con, GnomeCmdFileSelector *fs)
}
-static void on_con_open_failed (GnomeCmdCon *con, const gchar *emsg, GnomeVFSResult result, GnomeCmdFileSelector *fs)
+static void on_con_open_failed (GnomeCmdCon *con, const gchar *msg, GnomeVFSResult result, GnomeCmdFileSelector *fs)
{
g_return_if_fail (GNOME_CMD_IS_FILE_SELECTOR (fs));
g_return_if_fail (fs->priv->con_opening != NULL);
g_return_if_fail (fs->priv->con_opening == con);
g_return_if_fail (fs->priv->con_open_dialog != NULL);
- gchar *s;
-
DEBUG('m', "on_con_open_failed\n");
gtk_signal_disconnect_by_data (GTK_OBJECT (con), fs);
- if (emsg)
- s = g_strdup (emsg);
+ if (msg)
+ gnome_cmd_show_message (NULL, msg);
else
- s = g_strdup_printf (_("Failed to open connection: %s\n"), gnome_vfs_result_to_string (result));
-
- if (result != GNOME_VFS_OK || emsg != NULL)
- create_error_dialog (s);
+ gnome_cmd_show_message (NULL, _("Failed to open connection."), gnome_vfs_result_to_string (result));
- g_free (s);
-
- gtk_widget_destroy (fs->priv->con_open_dialog);
fs->priv->con_open_dialog = NULL;
fs->priv->con_opening = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]