[gnome-color-manager/colord: 18/72] Use CdRenderingIntent from colord
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/colord: 18/72] Use CdRenderingIntent from colord
- Date: Tue, 8 Mar 2011 11:24:51 +0000 (UTC)
commit bc3343b485b9a4d5a05a96e3fd9bca56d6853c2d
Author: Richard Hughes <richard hughsie com>
Date: Sun Jan 16 19:42:04 2011 +0000
Use CdRenderingIntent from colord
src/cc-color-panel.c | 10 +++++-----
src/gcm-enum.c | 34 ----------------------------------
src/gcm-enum.h | 11 -----------
src/gcm-utils.c | 24 ++++++++++++------------
src/gcm-utils.h | 4 ++--
5 files changed, 19 insertions(+), 64 deletions(-)
---
diff --git a/src/cc-color-panel.c b/src/cc-color-panel.c
index ee2021d..3a13b2c 100644
--- a/src/cc-color-panel.c
+++ b/src/cc-color-panel.c
@@ -2042,7 +2042,7 @@ cc_color_panel_renderer_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel
return;
/* save to GSettings */
- g_debug ("changed rendering intent to %s", gcm_intent_to_string (active+1));
+ g_debug ("changed rendering intent to %s", cd_rendering_intent_to_string (active+1));
g_settings_set_enum (panel->priv->settings, key, active+1);
}
@@ -2050,16 +2050,16 @@ cc_color_panel_renderer_combo_changed_cb (GtkWidget *widget, CcColorPanel *panel
* cc_color_panel_setup_rendering_combobox:
**/
static void
-cc_color_panel_setup_rendering_combobox (GtkWidget *widget, GcmIntent intent)
+cc_color_panel_setup_rendering_combobox (GtkWidget *widget, CdRenderingIntent intent)
{
guint i;
gboolean ret = FALSE;
gchar *label;
- for (i=1; i<GCM_INTENT_LAST; i++) {
+ for (i=1; i<CD_RENDERING_INTENT_LAST; i++) {
label = g_strdup_printf ("%s - %s",
- gcm_intent_to_localized_text (i),
- gcm_intent_to_localized_description (i));
+ cd_rendering_intent_to_localized_text (i),
+ cd_rendering_intent_to_localized_description (i));
gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), label);
g_free (label);
if (i == intent) {
diff --git a/src/gcm-enum.c b/src/gcm-enum.c
index a3e0566..325d1d1 100644
--- a/src/gcm-enum.c
+++ b/src/gcm-enum.c
@@ -31,40 +31,6 @@
#include "gcm-enum.h"
/**
- * gcm_intent_to_string:
- **/
-const gchar *
-gcm_intent_to_string (GcmIntent intent)
-{
- if (intent == GCM_INTENT_PERCEPTUAL)
- return "perceptual";
- if (intent == GCM_INTENT_RELATIVE_COLORMETRIC)
- return "relative-colormetric";
- if (intent == GCM_INTENT_SATURATION)
- return "saturation";
- if (intent == GCM_INTENT_ABSOLUTE_COLORMETRIC)
- return "absolute-colormetric";
- return "unknown";
-}
-
-/**
- * gcm_intent_from_string:
- **/
-GcmIntent
-gcm_intent_from_string (const gchar *intent)
-{
- if (g_strcmp0 (intent, "perceptual") == 0)
- return GCM_INTENT_PERCEPTUAL;
- if (g_strcmp0 (intent, "relative-colormetric") == 0)
- return GCM_INTENT_RELATIVE_COLORMETRIC;
- if (g_strcmp0 (intent, "saturation") == 0)
- return GCM_INTENT_SATURATION;
- if (g_strcmp0 (intent, "absolute-colormetric") == 0)
- return GCM_INTENT_ABSOLUTE_COLORMETRIC;
- return GCM_INTENT_UNKNOWN;
-}
-
-/**
* gcm_colorspace_to_string:
**/
const gchar *
diff --git a/src/gcm-enum.h b/src/gcm-enum.h
index 88058bb..a0cf2ee 100644
--- a/src/gcm-enum.h
+++ b/src/gcm-enum.h
@@ -25,15 +25,6 @@
#include <glib-object.h>
typedef enum {
- GCM_INTENT_UNKNOWN,
- GCM_INTENT_PERCEPTUAL,
- GCM_INTENT_RELATIVE_COLORMETRIC,
- GCM_INTENT_SATURATION,
- GCM_INTENT_ABSOLUTE_COLORMETRIC,
- GCM_INTENT_LAST
-} GcmIntent;
-
-typedef enum {
GCM_COLORSPACE_UNKNOWN,
GCM_COLORSPACE_XYZ,
GCM_COLORSPACE_LAB,
@@ -48,8 +39,6 @@ typedef enum {
GCM_COLORSPACE_LAST
} GcmColorspace;
-GcmIntent gcm_intent_from_string (const gchar *intent);
-const gchar *gcm_intent_to_string (GcmIntent intent);
const gchar *gcm_colorspace_to_string (GcmColorspace colorspace);
GcmColorspace gcm_colorspace_from_string (const gchar *colorspace);
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index 1541ebf..a83d327 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -484,24 +484,24 @@ gcm_utils_device_kind_to_profile_kind (CdDeviceKind kind)
}
/**
- * gcm_intent_to_localized_text:
+ * cd_rendering_intent_to_localized_text:
**/
const gchar *
-gcm_intent_to_localized_text (GcmIntent intent)
+cd_rendering_intent_to_localized_text (CdRenderingIntent intent)
{
- if (intent == GCM_INTENT_PERCEPTUAL) {
+ if (intent == CD_RENDERING_INTENT_PERCEPTUAL) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Perceptual");
}
- if (intent == GCM_INTENT_RELATIVE_COLORMETRIC) {
+ if (intent == CD_RENDERING_INTENT_RELATIVE_COLORMETRIC) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Relative");
}
- if (intent == GCM_INTENT_SATURATION) {
+ if (intent == CD_RENDERING_INTENT_SATURATION) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Saturation");
}
- if (intent == GCM_INTENT_ABSOLUTE_COLORMETRIC) {
+ if (intent == CD_RENDERING_INTENT_ABSOLUTE_COLORMETRIC) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Absolute");
}
@@ -509,24 +509,24 @@ gcm_intent_to_localized_text (GcmIntent intent)
}
/**
- * gcm_intent_to_localized_description:
+ * cd_rendering_intent_to_localized_description:
**/
const gchar *
-gcm_intent_to_localized_description (GcmIntent intent)
+cd_rendering_intent_to_localized_description (CdRenderingIntent intent)
{
- if (intent == GCM_INTENT_PERCEPTUAL) {
+ if (intent == CD_RENDERING_INTENT_PERCEPTUAL) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("High quality photography");
}
- if (intent == GCM_INTENT_RELATIVE_COLORMETRIC) {
+ if (intent == CD_RENDERING_INTENT_RELATIVE_COLORMETRIC) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Precise color matching");
}
- if (intent == GCM_INTENT_SATURATION) {
+ if (intent == CD_RENDERING_INTENT_SATURATION) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Graphs and presentations");
}
- if (intent == GCM_INTENT_ABSOLUTE_COLORMETRIC) {
+ if (intent == CD_RENDERING_INTENT_ABSOLUTE_COLORMETRIC) {
/* TRANSLATORS: rendering intent: you probably want to google this */
return _("Proofing devices");
}
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index f5bb319..378b87b 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -78,8 +78,8 @@ gboolean gcm_utils_install_package (const gchar *package_name,
GtkWindow *window);
gboolean gcm_utils_is_icc_profile (GFile *file);
gchar *gcm_utils_linkify (const gchar *text);
-const gchar *gcm_intent_to_localized_text (GcmIntent intent);
-const gchar *gcm_intent_to_localized_description (GcmIntent intent);
+const gchar *cd_rendering_intent_to_localized_text (CdRenderingIntent intent);
+const gchar *cd_rendering_intent_to_localized_description (CdRenderingIntent intent);
const gchar *gcm_colorspace_to_localised_string (GcmColorspace colorspace);
#endif /* __GCM_UTILS_H */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]