[gnome-color-manager] Show an error if we can't open the file passed to gcm-viewer --file



commit 350d19d0c82349b9735a89bec5060c089165c27a
Author: Richard Hughes <richard hughsie com>
Date:   Tue Oct 11 11:07:27 2011 +0100

    Show an error if we can't open the file passed to gcm-viewer --file
    
    The new strings are not actually additions, as they are taken from gcm-import.c

 src/gcm-viewer.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-viewer.c b/src/gcm-viewer.c
index 44cde6a..1a46fac 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -1306,6 +1306,10 @@ gcm_viewer_show_single_profile_by_filename (GcmViewerPrivate *viewer,
 		g_warning ("failed to read file %s: %s",
 			   viewer->filename,
 			   error->message);
+		gcm_viewer_error_dialog (viewer,
+					 _("Failed to open ICC profile"),
+					 error->message);
+		g_application_release (G_APPLICATION (viewer->application));
 		g_error_free (error);
 		goto out;
 	}
@@ -1335,6 +1339,10 @@ gcm_viewer_show_single_profile_by_filename (GcmViewerPrivate *viewer,
 		g_warning ("failed to create profile %s: %s",
 			   viewer->filename,
 			   error->message);
+		gcm_viewer_error_dialog (viewer,
+					 _("Failed to import file"),
+					 error->message);
+		g_application_release (G_APPLICATION (viewer->application));
 		g_error_free (error);
 		goto out;
 	}



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