[gedit] Handle NOT_DIRECTORY error as NOT_FOUND in error messages



commit 1c7baecb01d18f6e265bed6e67cc93e3d8d1bc66
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date:   Mon Mar 1 09:00:10 2010 +0100

    Handle NOT_DIRECTORY error as NOT_FOUND in error messages

 gedit/gedit-io-error-message-area.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gedit/gedit-io-error-message-area.c b/gedit/gedit-io-error-message-area.c
index 371588c..09d687c 100644
--- a/gedit/gedit-io-error-message-area.c
+++ b/gedit/gedit-io-error-message-area.c
@@ -221,6 +221,7 @@ parse_gio_error (gint          code,
 	switch (code)
 	{
 	case G_IO_ERROR_NOT_FOUND:
+	case G_IO_ERROR_NOT_DIRECTORY:
 		*error_message = g_strdup_printf (_("Could not find the file %s."),
 						  uri_for_display);
 		*message_details = g_strdup (_("Please check that you typed the "
@@ -368,8 +369,8 @@ parse_error (const GError *error,
 
 	if (error->domain == G_IO_ERROR)
 	{
-		ret = parse_gio_error (error->code, 
-				       error_message, 
+		ret = parse_gio_error (error->code,
+				       error_message,
 				       message_details,
 				       uri,
 				       uri_for_display);
@@ -377,7 +378,7 @@ parse_error (const GError *error,
 	else if (error->domain == GEDIT_DOCUMENT_ERROR)
 	{
 		ret = parse_gedit_error (error->code,
-					 error_message, 
+					 error_message,
 					 message_details,
 					 uri,
 					 uri_for_display);



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