[gnome-color-manager] trivial: remove a few unused methods
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: remove a few unused methods
- Date: Tue, 23 Aug 2011 21:49:37 +0000 (UTC)
commit a591c0d97657376403deb2567241799a23e26205
Author: Richard Hughes <richard hughsie com>
Date: Tue Aug 23 20:54:21 2011 +0100
trivial: remove a few unused methods
src/gcm-self-test.c | 3 -
src/gcm-utils.c | 115 ---------------------------------------------------
src/gcm-utils.h | 5 --
3 files changed, 0 insertions(+), 123 deletions(-)
---
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index f4599a9..bd87398 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -710,9 +710,6 @@ gcm_test_utils_func (void)
gcm_utils_ensure_sensible_filename (filename);
g_assert_cmpstr (filename, ==, "Hel lo__Wo-(r)ld_");
g_free (filename);
-
- g_assert (gcm_utils_device_kind_to_profile_kind (CD_DEVICE_KIND_SCANNER) == CD_PROFILE_KIND_INPUT_DEVICE);
- g_assert (gcm_utils_device_kind_to_profile_kind (CD_DEVICE_KIND_UNKNOWN) == CD_PROFILE_KIND_UNKNOWN);
}
static void
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index ed47a74..5ca791d 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -193,47 +193,6 @@ gcm_utils_output_is_lcd (const gchar *output_name)
}
/**
- * gcm_utils_mkdir_for_filename:
- **/
-gboolean
-gcm_utils_mkdir_for_filename (const gchar *filename, GError **error)
-{
- gboolean ret = FALSE;
- GFile *file;
- GFile *parent_dir = NULL;
-
- /* get a file from the URI / path */
- file = g_file_new_for_path (filename);
- if (file == NULL)
- file = g_file_new_for_uri (filename);
- if (file == NULL) {
- g_set_error (error, 1, 0, "could not resolve file for %s", filename);
- goto out;
- }
-
- /* get parent */
- parent_dir = g_file_get_parent (file);
- if (parent_dir == NULL) {
- g_set_error (error, 1, 0, "could not get parent dir %s", filename);
- goto out;
- }
-
- /* ensure desination exists */
- ret = g_file_query_exists (parent_dir, NULL);
- if (!ret) {
- ret = g_file_make_directory_with_parents (parent_dir, NULL, error);
- if (!ret)
- goto out;
- }
-out:
- if (file != NULL)
- g_object_unref (file);
- if (parent_dir != NULL)
- g_object_unref (parent_dir);
- return ret;
-}
-
-/**
* gcm_utils_get_profile_destination:
**/
GFile *
@@ -359,80 +318,6 @@ gcm_utils_ensure_sensible_filename (gchar *data)
}
/**
- * gcm_utils_device_kind_to_profile_kind:
- **/
-CdProfileKind
-gcm_utils_device_kind_to_profile_kind (CdDeviceKind kind)
-{
- CdProfileKind profile_kind;
- switch (kind) {
- case CD_DEVICE_KIND_DISPLAY:
- profile_kind = CD_PROFILE_KIND_DISPLAY_DEVICE;
- break;
- case CD_DEVICE_KIND_CAMERA:
- case CD_DEVICE_KIND_SCANNER:
- profile_kind = CD_PROFILE_KIND_INPUT_DEVICE;
- break;
- case CD_DEVICE_KIND_PRINTER:
- profile_kind = CD_PROFILE_KIND_OUTPUT_DEVICE;
- break;
- default:
- profile_kind = CD_PROFILE_KIND_UNKNOWN;
- }
- return profile_kind;
-}
-
-/**
- * cd_rendering_intent_to_localized_text:
- **/
-const gchar *
-cd_rendering_intent_to_localized_text (CdRenderingIntent intent)
-{
- if (intent == CD_RENDERING_INTENT_PERCEPTUAL) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Perceptual");
- }
- if (intent == CD_RENDERING_INTENT_RELATIVE_COLORIMETRIC) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Relative Colorimetric");
- }
- if (intent == CD_RENDERING_INTENT_SATURATION) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Saturation");
- }
- if (intent == CD_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Absolute Colorimetric");
- }
- return "unknown";
-}
-
-/**
- * cd_rendering_intent_to_localized_description:
- **/
-const gchar *
-cd_rendering_intent_to_localized_description (CdRenderingIntent intent)
-{
- if (intent == CD_RENDERING_INTENT_PERCEPTUAL) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("High quality photography");
- }
- if (intent == CD_RENDERING_INTENT_RELATIVE_COLORIMETRIC) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Precise color matching");
- }
- if (intent == CD_RENDERING_INTENT_SATURATION) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Graphs and presentations");
- }
- if (intent == CD_RENDERING_INTENT_ABSOLUTE_COLORIMETRIC) {
- /* TRANSLATORS: rendering intent: you probably want to google this */
- return _("Proofing devices");
- }
- return "unknown";
-}
-
-/**
* cd_colorspace_to_localised_string:
**/
const gchar *
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 6cbadd3..19d3a9a 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -38,8 +38,6 @@
#define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES "shared-color-profiles"
#define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES_EXTRA "shared-color-profiles-extra"
-gboolean gcm_utils_mkdir_for_filename (const gchar *filename,
- GError **error);
GFile *gcm_utils_get_profile_destination (GFile *file);
gchar **gcm_utils_ptr_array_to_strv (GPtrArray *array);
gboolean gcm_gnome_help (const gchar *link_id);
@@ -47,12 +45,9 @@ gboolean gcm_utils_output_is_lcd_internal (const gchar *output_name);
gboolean gcm_utils_output_is_lcd (const gchar *output_name);
void gcm_utils_alphanum_lcase (gchar *string);
void gcm_utils_ensure_sensible_filename (gchar *string);
-CdProfileKind gcm_utils_device_kind_to_profile_kind (CdDeviceKind kind);
gboolean gcm_utils_install_package (const gchar *package_name,
GtkWindow *window);
gchar *gcm_utils_linkify (const gchar *text);
-const gchar *cd_rendering_intent_to_localized_text (CdRenderingIntent intent);
-const gchar *cd_rendering_intent_to_localized_description (CdRenderingIntent intent);
const gchar *cd_colorspace_to_localised_string (CdColorspace colorspace);
gboolean gcm_profile_has_colorspace_description (CdProfile *profile);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]