[gnome-settings-daemon] color: Using pnp.ids parsing from gnome-desktop



commit b5f37b9832e93ce90e4c3e11f44232f12b1bac48
Author: Bastien Nocera <hadess hadess net>
Date:   Sat Sep 17 23:26:09 2011 +0100

    color: Using pnp.ids parsing from gnome-desktop
    
    https://bugzilla.gnome.org/show_bug.cgi?id=659352

 acinclude.m4              |   11 -----------
 configure.ac              |   13 ++++++-------
 plugins/color/Makefile.am |   12 ++++--------
 plugins/color/gcm-dmi.c   |    1 -
 plugins/color/gcm-edid.c  |   10 +++++-----
 5 files changed, 15 insertions(+), 32 deletions(-)
---
diff --git a/acinclude.m4 b/acinclude.m4
index ec8da1f..d834aa4 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -135,14 +135,3 @@ AC_DEFUN([AS_AC_EXPAND],
   exec_prefix=$exec_prefix_save
 ])
 
-AC_DEFUN([AC_PATH_PNPIDS], [
-        AC_ARG_WITH(pnpids,
-                   AS_HELP_STRING([--with-pnpids=PATH],[Path to the pnp.ids file @<:@auto@:>@]),
-                   [ac_with_pnpids=$withval],
-                   [ac_with_pnpids="/usr/share/hwdata/pnp.ids"])
-        AC_CHECK_FILE($ac_with_pnpids,has_pnpids=yes)
-        if test "x$has_pnpids" != "xyes"; then
-		AC_MSG_ERROR([*** Unable to find pnp.ids, use --with-pnpids to specify the path.])
-        fi
-        AC_DEFINE_UNQUOTED(PNPIDS_FILE, ["$ac_with_pnpids"], [Define the pnp.ids file path])
-])
diff --git a/configure.ac b/configure.ac
index 7c30605..3c940d7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,6 @@ AC_STDC_HEADERS
 AC_PROG_CXX
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
-AC_PATH_PNPIDS
 
 AC_HEADER_STDC
 
@@ -106,11 +105,6 @@ dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(GNOME_DESKTOP, gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION)
 
 dnl ---------------------------------------------------------------------------
-dnl - Check for colord
-dnl ---------------------------------------------------------------------------
-PKG_CHECK_MODULES(COLORD, colord >= 0.1.12 libcanberra-gtk3)
-
-dnl ---------------------------------------------------------------------------
 dnl - Check for LCMS2
 dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(LCMS, lcms2 >= 2.2, have_new_lcms=yes, have_new_lcms=no)
@@ -206,6 +200,12 @@ dnl ---------------------------------------------------------------------------
 PKG_CHECK_MODULES(MEDIA_KEYS, [gio-unix-2.0 upower-glib >= $UPOWER_GLIB_REQUIRED_VERSION libpulse >= $PA_REQUIRED_VERSION libpulse-mainloop-glib >= $PA_REQUIRED_VERSION libcanberra-gtk3])
 
 dnl ---------------------------------------------------------------------------
+dnl - color
+dnl ---------------------------------------------------------------------------
+
+PKG_CHECK_MODULES(COLOR, [colord >= 0.1.9 gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION libcanberra-gtk3])
+
+dnl ---------------------------------------------------------------------------
 dnl - GConf<->GSettings bridge
 dnl ---------------------------------------------------------------------------
 
@@ -574,5 +574,4 @@ ${NSS_DATABASE:+\
         System nssdb:             ${NSS_DATABASE}
 }\
         Profiling support:        ${enable_profiling}
-        pnp.ids filename:         ${ac_with_pnpids}
 "
diff --git a/plugins/color/Makefile.am b/plugins/color/Makefile.am
index 9627b16..3c97877 100644
--- a/plugins/color/Makefile.am
+++ b/plugins/color/Makefile.am
@@ -10,8 +10,6 @@ libcolor_la_SOURCES = 			\
 	gcm-dmi.h			\
 	gcm-edid.c			\
 	gcm-edid.h			\
-	gcm-tables.c			\
-	gcm-tables.h			\
 	gsd-color-manager.c		\
 	gsd-color-manager.h		\
 	gsd-color-plugin.c		\
@@ -25,9 +23,8 @@ libcolor_la_CPPFLAGS = \
 
 libcolor_la_CFLAGS = \
 	$(PLUGIN_CFLAGS)		\
-	$(COLORD_CFLAGS)		\
+	$(COLOR_CFLAGS)		\
 	$(LCMS_CFLAGS)			\
-	$(GNOME_DESKTOP_CFLAGS)		\
 	$(SETTINGS_PLUGIN_CFLAGS)	\
 	$(LIBNOTIFY_CFLAGS)		\
 	$(AM_CFLAGS)
@@ -36,8 +33,7 @@ libcolor_la_LDFLAGS = 			\
 	$(GSD_PLUGIN_LDFLAGS)
 
 libcolor_la_LIBADD  = 			\
-	$(COLORD_LIBS)			\
-	$(GNOME_DESKTOP_LIBS)		\
+	$(COLOR_LIBS)			\
 	$(LCMS_LIBS)			\
 	$(SETTINGS_PLUGIN_LIBS)		\
 	$(LIBNOTIFY_LIBS)
@@ -51,7 +47,7 @@ gcm_self_test_CPPFLAGS = \
 
 gcm_self_test_CFLAGS =			\
 	$(SETTINGS_PLUGIN_CFLAGS)	\
-	$(COLORD_CFLAGS)		\
+	$(COLOR_CFLAGS)			\
 	$(PLUGIN_CFLAGS)		\
 	$(AM_CFLAGS)
 
@@ -65,7 +61,7 @@ gcm_self_test_SOURCES =			\
 	gcm-self-test.c
 
 gcm_self_test_LDADD =			\
-	$(COLORD_LIBS)			\
+	$(COLOR_LIBS)			\
 	$(LCMS_LIBS)			\
 	$(SETTINGS_PLUGIN_LIBS)
 
diff --git a/plugins/color/gcm-dmi.c b/plugins/color/gcm-dmi.c
index f4be19a..7e615ab 100644
--- a/plugins/color/gcm-dmi.c
+++ b/plugins/color/gcm-dmi.c
@@ -28,7 +28,6 @@
 #include <stdlib.h>
 
 #include "gcm-dmi.h"
-#include "gcm-tables.h"
 
 static void     gcm_dmi_finalize        (GObject     *object);
 
diff --git a/plugins/color/gcm-edid.c b/plugins/color/gcm-edid.c
index 55cb0cc..c2d79a3 100644
--- a/plugins/color/gcm-edid.c
+++ b/plugins/color/gcm-edid.c
@@ -27,9 +27,9 @@
 #include <string.h>
 #include <gio/gio.h>
 #include <stdlib.h>
+#include <libgnome-desktop/gnome-pnp-ids.h>
 
 #include "gcm-edid.h"
-#include "gcm-tables.h"
 
 static void     gcm_edid_finalize       (GObject     *object);
 
@@ -50,7 +50,7 @@ struct _GcmEdidPrivate
         CdColorYxy                      *green;
         CdColorYxy                      *blue;
         CdColorYxy                      *white;
-        GcmTables                       *tables;
+        GnomePnpIds                     *pnp_ids;
 };
 
 G_DEFINE_TYPE (GcmEdid, gcm_edid, G_TYPE_OBJECT)
@@ -92,7 +92,7 @@ gcm_edid_get_vendor_name (GcmEdid *edid)
         g_return_val_if_fail (GCM_IS_EDID (edid), NULL);
 
         if (priv->vendor_name == NULL)
-                priv->vendor_name = gcm_tables_get_pnp_id (priv->tables, priv->pnp_id, NULL);
+                priv->vendor_name = gnome_pnp_ids_get_pnp_id (priv->pnp_ids, priv->pnp_id, NULL);
         return priv->vendor_name;
 }
 
@@ -418,7 +418,7 @@ static void
 gcm_edid_init (GcmEdid *edid)
 {
         edid->priv = GCM_EDID_GET_PRIVATE (edid);
-        edid->priv->tables = gcm_tables_new ();
+        edid->priv->pnp_ids = gnome_pnp_ids_new ();
         edid->priv->pnp_id = g_new0 (gchar, 4);
         edid->priv->red = cd_color_yxy_new ();
         edid->priv->green = cd_color_yxy_new ();
@@ -442,7 +442,7 @@ gcm_edid_finalize (GObject *object)
         cd_color_yxy_free (priv->red);
         cd_color_yxy_free (priv->green);
         cd_color_yxy_free (priv->blue);
-        g_object_unref (priv->tables);
+        g_object_unref (priv->pnp_ids);
 
         G_OBJECT_CLASS (gcm_edid_parent_class)->finalize (object);
 }



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