[gnome-color-manager] Prefix some profile titles with 'Colorspace' or 'Test Profile'
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Prefix some profile titles with 'Colorspace' or 'Test Profile'
- Date: Fri, 14 Oct 2011 13:49:29 +0000 (UTC)
commit 25e2bc3219b7d40e7c0a862047b2cd79898c81c5
Author: Richard Hughes <richard hughsie com>
Date: Fri Oct 14 14:47:42 2011 +0100
Prefix some profile titles with 'Colorspace' or 'Test Profile'
Use the DATA_source metadata to do this. You'll need a shared-color-profiles
and colord from git master if you're testing this.
src/gcm-cell-renderer-profile-text.c | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/src/gcm-cell-renderer-profile-text.c b/src/gcm-cell-renderer-profile-text.c
index 3437f18..96742c5 100644
--- a/src/gcm-cell-renderer-profile-text.c
+++ b/src/gcm-cell-renderer-profile-text.c
@@ -93,6 +93,28 @@ gcm_cell_renderer_get_profile_text (CdProfile *profile)
/* fall back to ID, ick */
string = g_string_new (cd_profile_get_id (profile));
out:
+
+ /* any source prefix? */
+ id = cd_profile_get_metadata_item (profile,
+ CD_PROFILE_METADATA_DATA_SOURCE);
+ if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_EDID) == 0) {
+ /* TRANSLATORS: this is a profile prefix to signify the
+ * profile has been auto-generated for this hardware */
+ g_string_prepend (string, _("Default: "));
+ }
+#if CD_CHECK_VERSION(0,1,14)
+ if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_STANDARD) == 0) {
+ /* TRANSLATORS: this is a profile prefix to signify the
+ * profile his a standard space like AdobeRGB */
+ g_string_prepend (string, _("Colorspace: "));
+ }
+ if (g_strcmp0 (id, CD_PROFILE_METADATA_DATA_SOURCE_TEST) == 0) {
+ /* TRANSLATORS: this is a profile prefix to signify the
+ * profile is a test profile */
+ g_string_prepend (string, _("Test profile: "));
+ }
+#endif
+
g_free (markup);
return string;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]