[gnome-color-manager] trivial: move some localised code to a common location for future code



commit 17f1aa9641507e78c8a2646086976e11a2bf2464
Author: Richard Hughes <richard hughsie com>
Date:   Tue Apr 27 22:12:56 2010 +0100

    trivial: move some localised code to a common location for future code

 src/gcm-enum.c  |   17 +++++++++++++++++
 src/gcm-enum.h  |    1 +
 src/gcm-prefs.c |   19 +------------------
 3 files changed, 19 insertions(+), 18 deletions(-)
---
diff --git a/src/gcm-enum.c b/src/gcm-enum.c
index c4bc311..2175969 100644
--- a/src/gcm-enum.c
+++ b/src/gcm-enum.c
@@ -112,6 +112,23 @@ gcm_colorspace_to_string (GcmColorspace colorspace)
 }
 
 /**
+ * gcm_colorspace_to_localised_string:
+ **/
+const gchar *
+gcm_colorspace_to_localised_string (GcmColorspace colorspace)
+{
+	if (colorspace == GCM_COLORSPACE_RGB) {
+		/* TRANSLATORS: this is the colorspace, e.g. red, green, blue */
+		return _("RGB");
+	}
+	if (colorspace == GCM_COLORSPACE_CMYK) {
+		/* TRANSLATORS: this is the colorspace, e.g. cyan, magenta, yellow, black */
+		return _("CMYK");
+	}
+	return NULL;
+}
+
+/**
  * gcm_colorspace_from_string:
  **/
 GcmColorspace
diff --git a/src/gcm-enum.h b/src/gcm-enum.h
index cd58064..5738b05 100644
--- a/src/gcm-enum.h
+++ b/src/gcm-enum.h
@@ -73,6 +73,7 @@ GcmIntent	 gcm_intent_from_string			(const gchar		*intent);
 const gchar	*gcm_intent_to_string			(GcmIntent		 intent);
 const gchar	*gcm_profile_kind_to_string		(GcmProfileKind		 profile_kind);
 const gchar	*gcm_colorspace_to_string		(GcmColorspace		 colorspace);
+const gchar	*gcm_colorspace_to_localised_string	(GcmColorspace	 colorspace);
 GcmColorspace	 gcm_colorspace_from_string		(const gchar		*colorspace);
 GcmDeviceKind	 gcm_device_kind_from_string		(const gchar		*kind);
 const gchar	*gcm_device_kind_to_string		(GcmDeviceKind		 kind);
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index bbdeb55..32e952c 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -2206,23 +2206,6 @@ gcm_prefs_startup_phase2_idle_cb (gpointer user_data)
 }
 
 /**
- * gcm_prefs_colorspace_to_localised_string:
- **/
-static const gchar *
-gcm_prefs_colorspace_to_localised_string (GcmColorspace colorspace)
-{
-	if (colorspace == GCM_COLORSPACE_RGB) {
-		/* TRANSLATORS: this is the colorspace, e.g. red, green, blue */
-		return _("RGB");
-	}
-	if (colorspace == GCM_COLORSPACE_CMYK) {
-		/* TRANSLATORS: this is the colorspace, e.g. cyan, magenta, yellow, black */
-		return _("CMYK");
-	}
-	return NULL;
-}
-
-/**
  * gcm_prefs_setup_space_combobox:
  **/
 static void
@@ -2266,7 +2249,7 @@ gcm_prefs_setup_space_combobox (GtkWidget *widget, GcmColorspace colorspace, con
 	if (!has_profile) {
 		/* TRANSLATORS: this is when there are no profiles that can be used; the search term is either "RGB" or "CMYK" */
 		text = g_strdup_printf (_("No %s color spaces available"),
-					gcm_prefs_colorspace_to_localised_string (colorspace));
+					gcm_colorspace_to_localised_string (colorspace));
 		gtk_combo_box_append_text (GTK_COMBO_BOX(widget), text);
 		gtk_combo_box_set_active (GTK_COMBO_BOX (widget), 0);
 		gtk_widget_set_sensitive (widget, FALSE);



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