[nautilus/gnome-3-6] application: display an error dialog when connecting to server fails



commit 367b59db3033ebc72d23cdfb9d523cf672926893
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Oct 2 13:20:08 2012 -0400

    application: display an error dialog when connecting to server fails
    
    Since we always return TRUE from the nautilus_window_go_to_full()
    callback, we fail to show the error dialog in case connecting fails, and
    we print a warning to command line.
    In case there's an error, remove the warning and return FALSE instead,
    to report the error to the user.

 src/nautilus-application.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/nautilus-application.c b/src/nautilus-application.c
index cda9854..4038e90 100644
--- a/src/nautilus-application.c
+++ b/src/nautilus-application.c
@@ -710,6 +710,7 @@ go_to_server_cb (NautilusWindow *window,
 		 gpointer        user_data)
 {
 	GFile *location = user_data;
+	gboolean retval;
 
 	if (error == NULL) {
 		GBookmarkFile *bookmarks;
@@ -754,13 +755,15 @@ go_to_server_cb (NautilusWindow *window,
 
 		g_free (filename);
 		g_bookmark_file_free (bookmarks);
+
+		retval = TRUE;
 	} else {
-		g_warning ("Unable to connect to server: %s\n", error->message);
+		retval = FALSE;
 	}
 
 	g_object_unref (location);
 
-	return TRUE;
+	return retval;
 }
 
 static void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]