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



commit 0ba58d416cb4221dae789427f9d78edaa212edd4
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 28772c8..cb285fa 100644
--- a/src/gcm-viewer.c
+++ b/src/gcm-viewer.c
@@ -1276,6 +1276,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;
 	}
@@ -1305,6 +1309,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]