[gnome-color-manager/wip/hughsie/no-calibration: 1/4] Remove the calibration tools



commit 4f600e1d8a6f2e5550b664a8ab31e7b4db244ee1
Author: Richard Hughes <richard hughsie com>
Date:   Tue Mar 3 16:26:35 2020 +0000

    Remove the calibration tools
    
    This is not maintained, and does not work well.

 contrib/gnome-color-manager.spec.in |   19 -
 data/figures/calibration-long.svg   | 2165 --------------------------------
 data/figures/calibration-normal.svg | 1474 ----------------------
 data/figures/calibration-short.svg  | 1029 ---------------
 data/figures/clock.svg              | 1082 ----------------
 data/figures/meson.build            |   12 -
 data/figures/scan-target-bad.svg    |  765 -----------
 data/figures/scan-target-good.svg   |  765 -----------
 data/figures/scan-target.svg        |  758 -----------
 data/gcm-calibrate.desktop.in       |   14 -
 data/icons/meson.build              |    8 -
 data/icons/scalable/crt.svg         | 1333 --------------------
 data/icons/scalable/lcd.svg         |  276 ----
 data/icons/scalable/projector.svg   |  687 ----------
 data/meson.build                    |    3 -
 data/targets/CMP-DigitalTarget3.png |  Bin 44514 -> 0 bytes
 data/targets/CMP_DT_003.png         |  Bin 39273 -> 0 bytes
 data/targets/ColorChecker24.png     |  Bin 32929 -> 0 bytes
 data/targets/ColorCheckerDC.png     |  Bin 41637 -> 0 bytes
 data/targets/ColorCheckerSG.png     |  Bin 35945 -> 0 bytes
 data/targets/IT872.png              |  Bin 31624 -> 0 bytes
 data/targets/LaserSoftDCPro.png     |  Bin 37582 -> 0 bytes
 data/targets/QPcard_201.png         |  Bin 14875 -> 0 bytes
 data/targets/QPcard_202.png         |  Bin 36886 -> 0 bytes
 data/targets/i1_RGB_Scan_14.png     |  Bin 35079 -> 0 bytes
 data/targets/meson.build            |   15 -
 data/targets/unknown.png            |  Bin 2160 -> 0 bytes
 data/ti1/README.txt                 |    6 -
 data/ti1/display-long.ti1           |  333 -----
 data/ti1/display-normal.ti1         |  205 ---
 data/ti1/display-short.ti1          |  141 ---
 data/ti1/meson.build                |   10 -
 data/ti1/printer-long.ti1           |  661 ----------
 data/ti1/printer-normal.ti1         |  465 -------
 data/ti1/printer-short.ti1          |  269 ----
 man/gcm-calibrate.sgml              |   75 --
 man/meson.build                     |    7 -
 meson.build                         |   25 +-
 meson_options.txt                   |    2 -
 src/gcm-brightness.c                |  202 ---
 src/gcm-brightness.h                |   48 -
 src/gcm-calibrate-argyll.c          | 2368 -----------------------------------
 src/gcm-calibrate-argyll.h          |   57 -
 src/gcm-calibrate-main.c            | 2233 ---------------------------------
 src/gcm-calibrate.c                 | 1378 --------------------
 src/gcm-calibrate.h                 |  173 ---
 src/gcm-exif.c                      |  421 -------
 src/gcm-exif.h                      |   62 -
 src/gcm-helper-exiv.cpp             |   99 --
 src/gcm-print.c                     |  281 -----
 src/gcm-print.h                     |   54 -
 src/gcm-self-test.c                 |  181 +--
 src/gcm-utils.c                     |  199 ---
 src/gcm-utils.h                     |    9 -
 src/meson.build                     |   82 +-
 55 files changed, 10 insertions(+), 20441 deletions(-)
---
diff --git a/contrib/gnome-color-manager.spec.in b/contrib/gnome-color-manager.spec.in
index 2386ff34..6e945730 100644
--- a/contrib/gnome-color-manager.spec.in
+++ b/contrib/gnome-color-manager.spec.in
@@ -16,23 +16,14 @@ BuildRequires: gtk3-devel >= 3.0.0
 BuildRequires: gnome-doc-utils >= 0.3.2
 BuildRequires: desktop-file-utils
 BuildRequires: gettext
-BuildRequires: vte3-devel
 BuildRequires: gnome-doc-utils
 BuildRequires: lcms2-devel
-BuildRequires: libtiff-devel
-BuildRequires: libexif-devel
-BuildRequires: exiv2-devel
-BuildRequires: libcanberra-devel
 BuildRequires: glib2-devel >= 2.25.9-2
 BuildRequires: docbook-utils
 BuildRequires: colord-devel >= 0.1.12
-BuildRequires: colord-gtk-devel >= 0.1.22
 BuildRequires: itstool
 BuildRequires: meson
 
-Requires(post):   /usr/bin/gtk-update-icon-cache
-Requires(postun): /usr/bin/gtk-update-icon-cache
-
 # obsolete sub-package
 Obsoletes: gnome-color-manager-devel <= 3.1.1
 
@@ -80,19 +71,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
 %files -f %{name}.lang
 %defattr(-,root,root,-)
 %doc AUTHORS COPYING
-%{_bindir}/gcm-calibrate
-%{_libexecdir}/gcm-helper-exiv
 %dir %{_datadir}/gnome-color-manager
-%dir %{_datadir}/gnome-color-manager/targets
-%dir %{_datadir}/gnome-color-manager/icons
 %dir %{_datadir}/gnome-color-manager/figures
-%dir %{_datadir}/gnome-color-manager/ti1
-%{_datadir}/gnome-color-manager/targets/*
-%{_datadir}/gnome-color-manager/icons/*
 %{_datadir}/gnome-color-manager/figures/*
-%{_datadir}/gnome-color-manager/ti1/*
-%{_datadir}/man/man1/gcm-calibrate.1.gz
-%{_datadir}/applications/gcm-calibrate.desktop
 
 %files utils
 %{_datadir}/icons/hicolor/*/*/*.png
diff --git a/data/figures/meson.build b/data/figures/meson.build
index 695429a7..bb4d490b 100644
--- a/data/figures/meson.build
+++ b/data/figures/meson.build
@@ -6,15 +6,3 @@ install_data([
   ],
   install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/figures')
 )
-
-install_data([
-  'calibration-long.svg',
-  'calibration-normal.svg',
-  'calibration-short.svg',
-  'clock.svg',
-  'scan-target-bad.svg',
-  'scan-target-good.svg',
-  'scan-target.svg',
-  ],
-  install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/icons')
-)
diff --git a/data/icons/meson.build b/data/icons/meson.build
index f1b05b31..eac6c37a 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -14,11 +14,3 @@ install_data([
   ],
   install_dir : join_paths(prefixed_datadir, 'icons/hicolor/scalable/apps')
 )
-
-install_data([
-  'scalable/lcd.svg',
-  'scalable/crt.svg',
-  'scalable/projector.svg',
-  ],
-  install_dir : join_paths(prefixed_datadir, 'gnome-color-manager/icons/icons')
-)
diff --git a/data/meson.build b/data/meson.build
index 069395c9..35b9ba5f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -1,13 +1,10 @@
 subdir('appdata')
 subdir('figures')
 subdir('icons')
-subdir('targets')
-subdir('ti1')
 
 desktop_files = [
   'org.gnome.ColorProfileViewer.desktop',
   'gcm-picker.desktop',
-  'gcm-calibrate.desktop',
   'gcm-import.desktop',
 ]
 foreach desktop_file: desktop_files
diff --git a/man/meson.build b/man/meson.build
index 594fbb75..f88299ef 100644
--- a/man/meson.build
+++ b/man/meson.build
@@ -1,12 +1,5 @@
 docbook2man = find_program('docbook2man', required : false)
 if docbook2man.found()
-  custom_target('gcm-calibrate-man',
-    output : 'gcm-calibrate.1',
-    input : 'gcm-calibrate.sgml',
-    command : [docbook2man, '@INPUT@', '--output', 'man'],
-    install : true,
-    install_dir : join_paths(prefixed_mandir, 'man1'),
-  )
   custom_target('gcm-import-man',
     output : 'gcm-import.1',
     input : 'gcm-import.sgml',
diff --git a/meson.build b/meson.build
index 65cfde58..54e44789 100644
--- a/meson.build
+++ b/meson.build
@@ -1,4 +1,4 @@
-project('gnome-color-manager', 'c', 'cpp',
+project('gnome-color-manager', 'c',
   version : '3.32.0',
   license : 'GPL-2.0+',
   default_options : ['warning_level=1'],
@@ -39,6 +39,8 @@ test_args = [
   '-Wno-strict-aliasing',
   '-Wno-suggest-attribute=format',
   '-Wno-unused-parameter',
+  '-Wno-cast-function-type',
+  '-Wno-deprecated-declarations',
   '-Wold-style-definition',
   '-Woverride-init',
   '-Wpacked',
@@ -84,29 +86,10 @@ prefixed_pkgdatadir = join_paths(get_option('prefix'), get_option('datadir'), 'g
 
 libgio = dependency('gio-2.0', version : '>= 2.25.9')
 libgtk = dependency('gtk+-3.0', version : '>= 2.91.0')
-libexif = dependency('libexif')
-libtiff = dependency('libtiff-4')
-colord = dependency('colord', version : '>= 1.3.1')
-libcolord_gtk = dependency('colord-gtk', version : '>= 0.1.20')
-libcanberra = dependency('libcanberra-gtk3', version : '>= 0.10')
+libcolord = dependency('colord', version : '>= 1.3.1')
 libm = cc.find_library('libm', required: false)
 liblcms = dependency('lcms2', version : '>= 2.2')
 
-libvte = dependency('vte-2.91', version : '>= 0.25.1', required : false)
-if libvte.found()
-  conf.set('HAVE_VTE', '1')
-endif
-
-if get_option('exiv')
-  libexiv = dependency('exiv2')
-  conf.set('HAVE_EXIV', '1')
-endif
-
-if get_option('packagekit')
-  libexiv = dependency('exiv2')
-  conf.set('HAVE_PACKAGEKIT', '1')
-endif
-
 gnome = import('gnome')
 i18n = import('i18n')
 
diff --git a/meson_options.txt b/meson_options.txt
index 1c2cf1c9..75f95306 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1 @@
 option('tests', type : 'boolean', value : true, description : 'enable tests')
-option('exiv', type : 'boolean', value : true, description : 'enable EXIV support for RAW support')
-option('packagekit', type : 'boolean', value : true, description : 'enable PackageKit integration')
diff --git a/src/gcm-self-test.c b/src/gcm-self-test.c
index 9c9843bf..adf271bd 100644
--- a/src/gcm-self-test.c
+++ b/src/gcm-self-test.c
@@ -26,73 +26,12 @@
 #include <glib/gstdio.h>
 #include <stdlib.h>
 
-#include "gcm-brightness.h"
-#include "gcm-calibrate.h"
 #include "gcm-cie-widget.h"
 #include "gcm-debug.h"
-#include "gcm-exif.h"
 #include "gcm-gamma-widget.h"
-#include "gcm-print.h"
 #include "gcm-trc-widget.h"
 #include "gcm-utils.h"
 
-static void
-gcm_test_brightness_func (void)
-{
-       g_autoptr(GcmBrightness) brightness = NULL;
-       gboolean ret;
-       g_autoptr(GError) error = NULL;
-       guint orig_percentage;
-       guint percentage;
-
-       brightness = gcm_brightness_new ();
-       g_assert (brightness != NULL);
-
-       ret = gcm_brightness_get_percentage (brightness, &orig_percentage, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-
-       ret = gcm_brightness_set_percentage (brightness, 10, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-
-       ret = gcm_brightness_get_percentage (brightness, &percentage, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-       g_assert_cmpint (percentage, >, 5);
-       g_assert_cmpint (percentage, <, 15);
-
-       ret = gcm_brightness_set_percentage (brightness, orig_percentage, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-}
-
-static void
-gcm_test_calibrate_func (void)
-{
-       gboolean ret;
-       g_autoptr(GError) error = NULL;
-       g_autoptr(GcmCalibrate) calibrate = NULL;
-       g_autofree gchar *model = NULL;
-       g_autofree gchar *manufacturer = NULL;
-
-       calibrate = gcm_calibrate_new ();
-       g_assert (calibrate != NULL);
-
-       /* calibrate display manually */
-       ret = gcm_calibrate_set_from_exif (GCM_CALIBRATE(calibrate), TESTDATADIR "/test.tif", &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-
-       /* get device properties */
-       g_object_get (calibrate,
-                     "manufacturer", &manufacturer,
-                     "model", &model,
-                     NULL);
-       g_assert_cmpstr (model, ==, "NIKON D60");
-       g_assert_cmpstr (manufacturer, ==, "NIKON CORPORATION");
-}
-
 static void
 gcm_test_cie_widget_func (void)
 {
@@ -157,60 +96,6 @@ gcm_test_cie_widget_func (void)
        gtk_widget_destroy (dialog);
 }
 
-static void
-gcm_test_exif_func (void)
-{
-       gboolean ret;
-       g_autoptr(GError) error = NULL;
-       GFile *file;
-       g_autoptr(GcmExif) exif = NULL;
-
-       exif = gcm_exif_new ();
-       g_assert (exif != NULL);
-
-       /* TIFF */
-       file = g_file_new_for_path (TESTDATADIR "/test.tif");
-       ret = gcm_exif_parse (exif, file, &error);
-       g_object_unref (file);
-       g_assert_no_error (error);
-       g_assert (ret);
-       g_assert_cmpstr (gcm_exif_get_model (exif), ==, "NIKON D60");
-       g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "NIKON CORPORATION");
-       g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-       g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
-
-       /* JPG */
-       file = g_file_new_for_path (TESTDATADIR "/test.jpg");
-       ret = gcm_exif_parse (exif, file, &error);
-       g_object_unref (file);
-       g_assert_no_error (error);
-       g_assert (ret);
-       g_assert_cmpstr (gcm_exif_get_model (exif), ==, "NIKON D60");
-       g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "NIKON CORPORATION");
-       g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-       g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
-
-       /* RAW */
-#if 0
-       file = g_file_new_for_path (TESTDATADIR "/test.kdc");
-       ret = gcm_exif_parse (exif, file, &error);
-       g_object_unref (file);
-       g_assert_no_error (error);
-       g_assert (ret);
-       g_assert_cmpstr (gcm_exif_get_model (exif), ==, "Eastman Kodak Company");
-       g_assert_cmpstr (gcm_exif_get_manufacturer (exif), ==, "Kodak Digital Science DC50 Zoom Camera");
-       g_assert_cmpstr (gcm_exif_get_serial (exif), ==, NULL);
-       g_assert_cmpint (gcm_exif_get_device_kind (exif), ==, CD_DEVICE_KIND_CAMERA);
-#endif
-
-       /* PNG */
-       file = g_file_new_for_path (TESTDATADIR "/test.png");
-       ret = gcm_exif_parse (exif, file, &error);
-       g_object_unref (file);
-       g_assert_error (error, GCM_EXIF_ERROR, GCM_EXIF_ERROR_NO_SUPPORT);
-       g_assert (!ret);
-}
-
 static void
 gcm_test_gamma_widget_func (void)
 {
@@ -249,30 +134,6 @@ gcm_test_gamma_widget_func (void)
        gtk_widget_destroy (dialog);
 }
 
-static GPtrArray *
-gcm_print_test_render_cb (GcmPrint *print,  GtkPageSetup *page_setup, gpointer user_data, GError **error)
-{
-       GPtrArray *filenames;
-       filenames = g_ptr_array_new_with_free_func (g_free);
-       g_ptr_array_add (filenames, g_strdup (TESTDATADIR "/image-widget-nonembed.png"));
-       g_ptr_array_add (filenames, g_strdup (TESTDATADIR "/image-widget-good.png"));
-       return filenames;
-}
-
-static void
-gcm_test_print_func (void)
-{
-       gboolean ret;
-       g_autoptr(GError) error = NULL;
-       g_autoptr(GcmPrint) print = NULL;
-
-       print = gcm_print_new ();
-
-       ret = gcm_print_with_render_callback (print, NULL, gcm_print_test_render_cb, NULL, &error);
-       g_assert_no_error (error);
-       g_assert (ret);
-}
-
 static void
 gcm_test_trc_widget_func (void)
 {
@@ -319,45 +180,11 @@ gcm_test_trc_widget_func (void)
 static void
 gcm_test_utils_func (void)
 {
-       gboolean ret;
-       gchar *text;
-       gchar *filename;
-       g_autoptr(GFile) file = NULL;
-       g_autoptr(GFile) dest = NULL;
-
+       g_autofree gchar *text = NULL;
        text = gcm_utils_linkify ("http://www.dave.org is text http://www.hughsie.com that needs to be linked 
to http://www.bbc.co.uk really");
        g_assert_cmpstr (text, ==, "<a href=\"http://www.dave.org\";>http://www.dave.org</a> is text "
                             "<a href=\"http://www.hughsie.com\";>http://www.hughsie.com</a> that needs to be 
linked to "
                             "<a href=\"http://www.bbc.co.uk\";>http://www.bbc.co.uk</a> really");
-       g_free (text);
-
-       file = g_file_new_for_path ("dave.icc");
-       dest = gcm_utils_get_profile_destination (file);
-       filename = g_file_get_path (dest);
-       g_assert (g_str_has_suffix (filename, "/.local/share/icc/dave.icc"));
-       g_free (filename);
-
-       ret = gcm_utils_output_is_lcd_internal ("LVDS1");
-       g_assert (ret);
-
-       ret = gcm_utils_output_is_lcd_internal ("DVI1");
-       g_assert (!ret);
-
-       ret = gcm_utils_output_is_lcd ("LVDS1");
-       g_assert (ret);
-
-       ret = gcm_utils_output_is_lcd ("DVI1");
-       g_assert (ret);
-
-       filename = g_strdup ("Hello\n\rWorld!");
-       gcm_utils_alphanum_lcase (filename);
-       g_assert_cmpstr (filename, ==, "hello__world_");
-       g_free (filename);
-
-       filename = g_strdup ("Hel lo\n\rWo-(r)ld!");
-       gcm_utils_ensure_sensible_filename (filename);
-       g_assert_cmpstr (filename, ==, "Hel lo__Wo-(r)ld_");
-       g_free (filename);
 }
 
 int
@@ -369,18 +196,12 @@ main (int argc, char **argv)
        /* setup manually as we have no GMainContext */
        gcm_debug_setup (g_getenv ("VERBOSE") != NULL);
 
-       g_test_add_func ("/color/calibrate", gcm_test_calibrate_func);
-       g_test_add_func ("/color/exif", gcm_test_exif_func);
        g_test_add_func ("/color/utils", gcm_test_utils_func);
        if (g_test_thorough ()) {
-               g_test_add_func ("/color/brightness", gcm_test_brightness_func);
                g_test_add_func ("/color/trc", gcm_test_trc_widget_func);
                g_test_add_func ("/color/cie", gcm_test_cie_widget_func);
                g_test_add_func ("/color/gamma_widget", gcm_test_gamma_widget_func);
        }
-       if (g_test_slow ()) {
-               g_test_add_func ("/color/print", gcm_test_print_func);
-       }
 
        return g_test_run ();
 }
diff --git a/src/gcm-utils.c b/src/gcm-utils.c
index e7718b08..afbb936c 100644
--- a/src/gcm-utils.c
+++ b/src/gcm-utils.c
@@ -78,205 +78,6 @@ gcm_utils_linkify (const gchar *hostile_text)
        return g_string_free (string, FALSE);
 }
 
-gboolean
-gcm_utils_install_package (const gchar *package_name, GtkWindow *window)
-{
-       GDBusConnection *connection;
-       guint32 xid = 0;
-       g_autoptr(GError) error = NULL;
-       g_auto(GStrv) packages = NULL;
-       g_autoptr(GVariant) args = NULL;
-       g_autoptr(GVariantBuilder) builder = NULL;
-       g_autoptr(GVariant) response = NULL;
-
-       g_return_val_if_fail (package_name != NULL, FALSE);
-
-#ifndef HAVE_PACKAGEKIT
-       g_warning ("cannot install %s: this package was not compiled with --packagekit", package_name);
-       return FALSE;
-#endif
-
-       /* get xid of this window */
-       if (window != NULL)
-               xid = gdk_x11_window_get_xid (gtk_widget_get_window (GTK_WIDGET(window)));
-
-       /* we're expecting an array of packages */
-       packages = g_strsplit (package_name, "|", 1);
-
-       /* get a session bus connection */
-       connection = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error);
-       if (connection == NULL) {
-               /* TRANSLATORS: no DBus session bus */
-               g_print ("%s %s\n", _("Failed to connect to session bus:"), error->message);
-               return FALSE;
-       }
-
-       /* create arguments */
-       builder = g_variant_builder_new (G_VARIANT_TYPE ("(uass)"));
-       g_variant_builder_add_value (builder, g_variant_new_uint32 (xid));
-       g_variant_builder_add_value (builder, g_variant_new_strv ((const gchar * const *)packages, -1));
-       g_variant_builder_add_value (builder, g_variant_new_string ("hide-confirm-search,hide-finished"));
-       args = g_variant_builder_end (builder);
-
-       /* execute sync method */
-       response = g_dbus_connection_call_sync (connection,
-                                               PK_DBUS_SERVICE,
-                                               PK_DBUS_PATH,
-                                               PK_DBUS_INTERFACE_MODIFY,
-                                               "InstallPackageNames",
-                                               args,
-                                               NULL,
-                                               G_DBUS_CALL_FLAGS_NONE,
-                                               G_MAXINT, NULL, &error);
-       if (response == NULL) {
-               /* TRANSLATORS: the DBus method failed */
-               g_warning ("%s %s\n", _("The request failed:"), error->message);
-               return FALSE;
-       }
-
-       /* success */
-       return TRUE;
-}
-
-/**
- * gcm_utils_output_is_lcd_internal:
- * @output_name: the output name
- *
- * Return value: %TRUE is the output is an internal LCD panel
- **/
-gboolean
-gcm_utils_output_is_lcd_internal (const gchar *output_name)
-{
-       g_return_val_if_fail (output_name != NULL, FALSE);
-       if (g_strstr_len (output_name, -1, "LVDS") != NULL)
-               return TRUE;
-       if (g_strstr_len (output_name, -1, "lvds") != NULL)
-               return TRUE;
-       return FALSE;
-}
-
-/**
- * gcm_utils_output_is_lcd:
- * @output_name: the output name
- *
- * Return value: %TRUE is the output is an internal or external LCD panel
- **/
-gboolean
-gcm_utils_output_is_lcd (const gchar *output_name)
-{
-       g_return_val_if_fail (output_name != NULL, FALSE);
-       if (gcm_utils_output_is_lcd_internal (output_name))
-               return TRUE;
-       if (g_strstr_len (output_name, -1, "DVI") != NULL)
-               return TRUE;
-       if (g_strstr_len (output_name, -1, "dvi") != NULL)
-               return TRUE;
-       return FALSE;
-}
-
-GFile *
-gcm_utils_get_profile_destination (GFile *file)
-{
-       g_autofree gchar *basename = NULL;
-       g_autofree gchar *destination = NULL;
-
-       g_return_val_if_fail (file != NULL, NULL);
-
-       /* get destination filename for this source file */
-       basename = g_file_get_basename (file);
-       destination = g_build_filename (g_get_user_data_dir (), "icc", basename, NULL);
-       return g_file_new_for_path (destination);
-}
-
-/**
- * gcm_utils_ptr_array_to_strv:
- * @array: the GPtrArray of strings
- *
- * Form a composite string array of strings.
- * The data in the GPtrArray is copied.
- *
- * Return value: the string array, or %NULL if invalid
- **/
-gchar **
-gcm_utils_ptr_array_to_strv (GPtrArray *array)
-{
-       gchar **value;
-       const gchar *value_temp;
-       guint i;
-
-       g_return_val_if_fail (array != NULL, NULL);
-
-       /* copy the array to a strv */
-       value = g_new0 (gchar *, array->len + 1);
-       for (i = 0; i < array->len; i++) {
-               value_temp = (const gchar *) g_ptr_array_index (array, i);
-               value[i] = g_strdup (value_temp);
-       }
-
-       return value;
-}
-
-gboolean
-gcm_gnome_help (const gchar *link_id)
-{
-       g_autoptr(GError) error = NULL;
-       g_autofree gchar *uri = NULL;
-
-       if (link_id)
-               uri = g_strconcat ("help:gnome-color-manager?", link_id, NULL);
-       else
-               uri = g_strdup ("help:gnome-color-manager");
-       g_debug ("opening uri %s", uri);
-
-       gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, &error);
-
-       if (error != NULL) {
-               GtkWidget *d;
-               d = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
-                                           GTK_MESSAGE_ERROR, GTK_BUTTONS_OK, "%s", error->message);
-               gtk_dialog_run (GTK_DIALOG(d));
-               gtk_widget_destroy (d);
-               return FALSE;
-       }
-       return TRUE;
-}
-
-void
-gcm_utils_alphanum_lcase (gchar *data)
-{
-       guint i;
-
-       g_return_if_fail (data != NULL);
-
-       /* replace unsafe chars, and make lowercase */
-       for (i = 0; data[i] != '\0'; i++) {
-               if (!g_ascii_isalnum (data[i]))
-                       data[i] = '_';
-               data[i] = g_ascii_tolower (data[i]);
-       }
-}
-
-void
-gcm_utils_ensure_sensible_filename (gchar *data)
-{
-       guint i;
-
-       g_return_if_fail (data != NULL);
-
-       /* replace unsafe chars, and make lowercase */
-       for (i = 0; data[i] != '\0'; i++) {
-               if (data[i] != ' ' &&
-                   data[i] != '-' &&
-                   data[i] != '(' &&
-                   data[i] != ')' &&
-                   data[i] != '[' &&
-                   data[i] != ']' &&
-                   data[i] != ',' &&
-                   !g_ascii_isalnum (data[i]))
-                       data[i] = '_';
-       }
-}
-
 const gchar *
 cd_colorspace_to_localised_string (CdColorspace colorspace)
 {
diff --git a/src/gcm-utils.h b/src/gcm-utils.h
index 08cd7604..393f447e 100644
--- a/src/gcm-utils.h
+++ b/src/gcm-utils.h
@@ -36,15 +36,6 @@
 #define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES          "shared-color-profiles"
 #define GCM_PREFS_PACKAGE_NAME_COLOR_PROFILES_EXTRA    "shared-color-profiles-extra"
 
-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);
-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);
-gboolean        gcm_utils_install_package              (const gchar            *package_name,
-                                                        GtkWindow              *window);
 gchar          *gcm_utils_linkify                      (const gchar            *text);
 const gchar    *cd_colorspace_to_localised_string      (CdColorspace            colorspace);
 gboolean        gcm_utils_image_convert                (GtkImage               *image,
diff --git a/src/meson.build b/src/meson.build
index 7f9fcaf3..08e5cc71 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -14,68 +14,13 @@ gcm_viewer_resources = gnome.compile_resources(
   c_name : 'gcm',
 )
 
-if get_option('exiv')
-  executable(
-    'gcm-helper-exiv',
-    sources : [
-      'gcm-helper-exiv.cpp',
-    ],
-    include_directories : [
-      include_directories('..'),
-    ],
-    dependencies : [
-      libgio,
-      libexiv,
-    ],
-    c_args : cargs,
-    install : true,
-    install_dir : prefixed_libexecdir,
-  )
-endif
-
 shared_srcs = [
   'gcm-cie-widget.c',
   'gcm-debug.c',
-  'gcm-exif.c',
-  'gcm-print.c',
   'gcm-trc-widget.c',
   'gcm-utils.c',
 ]
 
-executable(
-  'gcm-calibrate',
-  sources : [
-    'gcm-brightness.c',
-    'gcm-brightness.h',
-    'gcm-calibrate-argyll.c',
-    'gcm-calibrate-argyll.h',
-    'gcm-calibrate.c',
-    'gcm-calibrate.h',
-    'gcm-cell-renderer-profile-text.c',
-    'gcm-cell-renderer-profile-text.h',
-    'gcm-gamma-widget.c',
-    'gcm-gamma-widget.h',
-    'gcm-calibrate-main.c',
-    shared_srcs
-  ],
-  include_directories : [
-    include_directories('..'),
-  ],
-  dependencies : [
-    libcanberra,
-    libtiff,
-    libcolord_gtk,
-    libm,
-    libexif,
-    libgio,
-    libgtk,
-    liblcms,
-    libvte,
-  ],
-  c_args : cargs,
-  install : true,
-)
-
 executable(
   'gcm-inspect',
   sources : [
@@ -86,10 +31,8 @@ executable(
     include_directories('..'),
   ],
   dependencies : [
-    libtiff,
-    libcolord_gtk,
+    libcolord,
     libm,
-    libexif,
     libgio,
     libgtk,
   ],
@@ -107,10 +50,8 @@ executable(
     include_directories('..'),
   ],
   dependencies : [
-    libtiff,
-    libcolord_gtk,
+    libcolord,
     libm,
-    libexif,
     libgio,
     libgtk,
   ],
@@ -129,11 +70,9 @@ executable(
     include_directories('..'),
   ],
   dependencies : [
-    libtiff,
     liblcms,
-    libcolord_gtk,
+    libcolord,
     libm,
-    libexif,
     libgio,
     libgtk,
   ],
@@ -154,12 +93,9 @@ executable(
     include_directories('..'),
   ],
   dependencies : [
-    libcanberra,
-    libtiff,
-    libcolord_gtk,
+    libcolord,
     libm,
     liblcms,
-    libexif,
     libgio,
     libgtk,
   ],
@@ -173,9 +109,6 @@ if get_option('tests')
     'gcm-self-test',
     sources : [
       shared_srcs,
-      'gcm-brightness.c',
-      'gcm-calibrate-argyll.c',
-      'gcm-calibrate.c',
       'gcm-gamma-widget.c',
       'gcm-self-test.c',
     ],
@@ -183,15 +116,10 @@ if get_option('tests')
       include_directories('..'),
     ],
     dependencies : [
-      libcolord_gtk,
-      libexif,
+      libcolord,
       libgio,
       libgtk,
-      libcanberra,
-      libexif,
       libm,
-      libtiff,
-      libvte,
     ],
     c_args : cargs
   )


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