[gnome-settings-daemon] color: Use two new properties in colord to get the system info



commit ef12fdb2e4b2aa619b14c9f034e4f3ddf53683e3
Author: Richard Hughes <richard hughsie com>
Date:   Fri Jul 5 17:50:45 2013 +0100

    color: Use two new properties in colord to get the system info

 plugins/color/Makefile.am         |    2 -
 plugins/color/gcm-dmi.c           |  177 -------------------------------------
 plugins/color/gcm-dmi.h           |   60 -------------
 plugins/color/gcm-self-test.c     |   14 ---
 plugins/color/gsd-color-manager.c |   15 +---
 5 files changed, 4 insertions(+), 264 deletions(-)
---
diff --git a/plugins/color/Makefile.am b/plugins/color/Makefile.am
index 3cc20cb..81878f2 100644
--- a/plugins/color/Makefile.am
+++ b/plugins/color/Makefile.am
@@ -4,8 +4,6 @@ plugin_LTLIBRARIES = \
        libcolor.la
 
 libcolor_la_SOURCES =                  \
-       gcm-dmi.c                       \
-       gcm-dmi.h                       \
        gcm-edid.c                      \
        gcm-edid.h                      \
        gsd-color-manager.c             \
diff --git a/plugins/color/gcm-self-test.c b/plugins/color/gcm-self-test.c
index aa3345e..9caad09 100644
--- a/plugins/color/gcm-self-test.c
+++ b/plugins/color/gcm-self-test.c
@@ -26,19 +26,6 @@
 #include <gtk/gtk.h>
 
 #include "gcm-edid.h"
-#include "gcm-dmi.h"
-
-static void
-gcm_test_dmi_func (void)
-{
-        GcmDmi *dmi;
-
-        dmi = gcm_dmi_new ();
-        g_assert (dmi != NULL);
-        g_assert (gcm_dmi_get_name (dmi) != NULL);
-        g_assert (gcm_dmi_get_vendor (dmi) != NULL);
-        g_object_unref (dmi);
-}
 
 static void
 gcm_test_edid_func (void)
@@ -103,7 +90,6 @@ main (int argc, char **argv)
         gtk_init (&argc, &argv);
         g_test_init (&argc, &argv, NULL);
 
-        g_test_add_func ("/color/dmi", gcm_test_dmi_func);
         g_test_add_func ("/color/edid", gcm_test_edid_func);
 
         return g_test_run ();
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index ad02420..fb81ee9 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -36,7 +36,6 @@
 #include "gnome-settings-profile.h"
 #include "gnome-settings-session.h"
 #include "gsd-color-manager.h"
-#include "gcm-dmi.h"
 #include "gcm-edid.h"
 
 #define GSD_COLOR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_COLOR_MANAGER, 
GsdColorManagerPrivate))
@@ -51,7 +50,6 @@ struct GsdColorManagerPrivate
         CdClient        *client;
         GSettings       *settings;
         CdIccStore      *icc_store;
-        GcmDmi          *dmi;
         GnomeRRScreen   *x11_screen;
         GHashTable      *edid_cache;
         GdkWindow       *gdk_window;
@@ -310,7 +308,7 @@ gcm_apply_create_icc_profile_for_edid (GsdColorManager *manager,
         /* set model and title */
         data = gcm_edid_get_monitor_name (edid);
         if (data == NULL)
-                data = gcm_dmi_get_name (priv->dmi);
+                data = cd_client_get_system_model (priv->client);
         if (data == NULL)
                 data = "Unknown monitor";
         cd_icc_set_model (icc, NULL, data);
@@ -319,7 +317,7 @@ gcm_apply_create_icc_profile_for_edid (GsdColorManager *manager,
         /* get manufacturer */
         data = gcm_edid_get_vendor_name (edid);
         if (data == NULL)
-                data = gcm_dmi_get_vendor (priv->dmi);
+                data = cd_client_get_system_vendor (priv->client);
         if (data == NULL)
                 data = "Unknown vendor";
         cd_icc_set_manufacturer (icc, NULL, data);
@@ -999,8 +997,8 @@ gcm_session_add_x11_output (GsdColorManager *manager, GnomeRROutput *output)
         /* prefer DMI data for the internal output */
         ret = gnome_rr_output_is_builtin_display (output);
         if (ret) {
-                model = gcm_dmi_get_name (priv->dmi);
-                vendor = gcm_dmi_get_vendor (priv->dmi);
+                model = cd_client_get_system_model (priv->client);
+                vendor = cd_client_get_system_vendor (priv->client);
         }
 
         /* use EDID data if we have it */
@@ -1354,7 +1352,6 @@ gsd_color_manager_stop (GsdColorManager *manager)
         g_clear_object (&manager->priv->settings);
         g_clear_object (&manager->priv->client);
         g_clear_object (&manager->priv->icc_store);
-        g_clear_object (&manager->priv->dmi);
         g_clear_object (&manager->priv->session);
         g_clear_pointer (&manager->priv->edid_cache, g_hash_table_destroy);
         g_clear_pointer (&manager->priv->device_assign_hash, g_hash_table_destroy);
@@ -1862,9 +1859,6 @@ gsd_color_manager_init (GsdColorManager *manager)
                                                           g_free,
                                                           NULL);
 
-        /* use DMI data for internal panels */
-        priv->dmi = gcm_dmi_new ();
-
         priv->settings = g_settings_new ("org.gnome.settings-daemon.plugins.color");
         priv->client = cd_client_new ();
         g_signal_connect (priv->client, "device-added",
@@ -1902,7 +1896,6 @@ gsd_color_manager_finalize (GObject *object)
         g_clear_object (&manager->priv->settings);
         g_clear_object (&manager->priv->client);
         g_clear_object (&manager->priv->icc_store);
-        g_clear_object (&manager->priv->dmi);
         g_clear_object (&manager->priv->session);
         g_clear_pointer (&manager->priv->edid_cache, g_hash_table_destroy);
         g_clear_pointer (&manager->priv->device_assign_hash, g_hash_table_destroy);


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