[gnome-color-manager/f16] Make sure the user can see the finished profile on the LiveCD.
Richard Hughes
rhughes at fedoraproject.org
Tue Apr 17 21:36:01 UTC 2012
commit 14661f769b073ecddd72787e0679e8312cd4692e
Author: Richard Hughes <richard at hughsie.com>
Date: Tue Apr 17 22:34:51 2012 +0100
Make sure the user can see the finished profile on the LiveCD.
...tual-ICC-profile-after-calibration-if-the.patch | 90 ++++++++++++++++++++
gnome-color-manager.spec | 9 ++-
2 files changed, 98 insertions(+), 1 deletions(-)
---
diff --git a/0001-Show-the-actual-ICC-profile-after-calibration-if-the.patch b/0001-Show-the-actual-ICC-profile-after-calibration-if-the.patch
new file mode 100644
index 0000000..17b3faf
--- /dev/null
+++ b/0001-Show-the-actual-ICC-profile-after-calibration-if-the.patch
@@ -0,0 +1,90 @@
+From f1851d03b5f860a12930b5469ffc109e9e0941af Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard at hughsie.com>
+Date: Sat, 14 Apr 2012 13:43:17 +0100
+Subject: [PATCH] Show the actual ICC profile after calibration if the user is
+ using a LiveCD
+
+---
+ src/gcm-calibrate-main.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 54 insertions(+)
+
+diff --git a/src/gcm-calibrate-main.c b/src/gcm-calibrate-main.c
+index 321e7d0..507c515 100644
+--- a/src/gcm-calibrate-main.c
++++ b/src/gcm-calibrate-main.c
+@@ -764,11 +764,60 @@ gcm_calib_setup_page_intro (GcmCalibratePriv *calib)
+ }
+
+ /**
++ * gcm_calibrate_is_livecd:
++ **/
++static gboolean
++gcm_calibrate_is_livecd (void)
++{
++ gboolean ret;
++ gchar *data = NULL;
++ GError *error = NULL;
++
++ /* get the kernel commandline */
++ ret = g_file_get_contents ("/proc/cmdline", &data, NULL, &error);
++ if (!ret) {
++ g_warning ("failed to get kernel command line: %s",
++ error->message);
++ g_error_free (error);
++ goto out;
++ }
++ ret = g_strstr_len (data, -1, "liveimg") != NULL;
++out:
++ g_free (data);
++ return ret;
++}
++
++/**
++ * gcm_calibrate_show_profile_location:
++ **/
++static void
++gcm_calibrate_show_profile_location (void)
++{
++ gboolean ret;
++ gchar *command_line;
++ GError *error = NULL;
++
++ /* just hardcode nautilus to open the folder */
++ command_line = g_strdup_printf ("nautilus %s/%s",
++ g_get_user_data_dir (),
++ "icc");
++ ret = g_spawn_command_line_async (command_line, &error);
++ if (!ret) {
++ g_warning ("failed to show profile: %s", error->message);
++ g_error_free (error);
++ goto out;
++ }
++out:
++ g_free (command_line);
++}
++
++/**
+ * gcm_calib_setup_page_summary:
+ **/
+ static void
+ gcm_calib_setup_page_summary (GcmCalibratePriv *calib)
+ {
++ gboolean ret;
+ GtkWidget *vbox;
+ GtkWidget *content;
+ GtkWidget *image;
+@@ -824,6 +873,11 @@ gcm_calib_setup_page_summary (GcmCalibratePriv *calib)
+ "GcmCalibrateMain::Index",
+ GUINT_TO_POINTER (GCM_CALIBRATE_PAGE_LAST));
+
++ /* show the user the profile to copy off the live system */
++ ret = gcm_calibrate_is_livecd ();
++ if (ret)
++ gcm_calibrate_show_profile_location ();
++
+ /* show page */
+ gtk_widget_show_all (vbox);
+ }
+--
+1.7.9.3
+
diff --git a/gnome-color-manager.spec b/gnome-color-manager.spec
index beea466..17ade0e 100644
--- a/gnome-color-manager.spec
+++ b/gnome-color-manager.spec
@@ -1,12 +1,15 @@
Summary: Color management tools for GNOME
Name: gnome-color-manager
Version: 3.2.3
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: Applications/System
URL: http://projects.gnome.org/gnome-color-manager/
Source0: http://download.gnome.org/sources/gnome-color-manager/3.2/%{name}-%{version}.tar.xz
+# Upstreamed: Show the user the icc file on the LiveCD
+Patch0: 0001-Show-the-actual-ICC-profile-after-calibration-if-the.patch
+
Requires: color-filesystem >= 1-7
Requires: gnome-icon-theme
Requires: shared-mime-info
@@ -49,6 +52,7 @@ and generate color profiles in the GNOME desktop.
%prep
%setup -q
+%patch0 -p1 -b .show-profile-on-livecd
%build
%configure --disable-scrollkeeper --disable-schemas-install
@@ -101,6 +105,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
%{_datadir}/applications/gcm-*.desktop
%changelog
+* Tue Apr 17 2012 Richard Hughes <rhughes at redhat.com> - 3.2.3-2
+- Make sure the user can see the finished profile on the LiveCD.
+
* Sun Mar 18 2012 Richard Hughes <rhughes at redhat.com> - 3.2.3-1
- New upstream version.
- Correctly import profiles with spaces in the filename.
More information about the scm-commits
mailing list