gnome-power-manager r3174 - in trunk: . src



Author: rhughes
Date: Fri Jan 23 11:57:13 2009
New Revision: 3174
URL: http://svn.gnome.org/viewvc/gnome-power-manager?rev=3174&view=rev

Log:
2009-01-23  Richard Hughes  <richard hughsie com>

* configure.ac:
* src/Makefile.am:
* src/egg-unique.c: (egg_unique_assign):
Now libnotify is a blessed external dependency, remove the compat code.


Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/src/Makefile.am
   trunk/src/egg-unique.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Fri Jan 23 11:57:13 2009
@@ -166,6 +166,10 @@
 AC_SUBST(LIBNOTIFY_CFLAGS)
 AC_SUBST(LIBNOTIFY_LIBS)
 
+PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
+AC_SUBST(UNIQUE_CFLAGS)
+AC_SUBST(UNIQUE_LIBS)
+
 AC_PATH_PROG(GCONFTOOL, gconftool-2)
 AM_GCONF_SOURCE_2
 
@@ -396,21 +400,6 @@
 AC_SUBST(DBUS_SERVICES_DIR)
 
 dnl ---------------------------------------------------------------------------
-dnl - Is unique available?
-dnl ---------------------------------------------------------------------------
-if $PKG_CONFIG --atleast-version $UNIQUE_REQUIRED unique-1.0; then
-   have_unique=yes
-   PKG_CHECK_MODULES(UNIQUE, unique-1.0 >= $UNIQUE_REQUIRED)
-   AC_SUBST(UNIQUE_CFLAGS)
-   AC_SUBST(UNIQUE_LIBS)
-   AC_DEFINE(HAVE_UNIQUE, 1, [Building with unique support]) 
-else
-   have_unique=no
-   AC_DEFINE(HAVE_UNIQUE, 0, [Not building with unique support]) 
-fi
-AM_CONDITIONAL([HAVE_UNIQUE], [test $have_unique = yes])
-
-dnl ---------------------------------------------------------------------------
 dnl - Some utility functions to make checking for X things easier.
 dnl ---------------------------------------------------------------------------
 
@@ -687,7 +676,6 @@
         datadir:                   ${datadir}
         compiler:                  ${CC}
         cflags:                    ${CFLAGS}
-        unique support:            ${have_unique}
         Building extra applets:    ${enable_applets}
         DPMS support:              ${have_dpms}
         DeviceKit-power support:   ${have_dk_power}

Modified: trunk/src/Makefile.am
==============================================================================
--- trunk/src/Makefile.am	(original)
+++ trunk/src/Makefile.am	Fri Jan 23 11:57:13 2009
@@ -19,7 +19,6 @@
 	$(XRANDR_CFLAGS)				\
 	$(LIBNOTIFY_CFLAGS)				\
 	$(CANBERRA_CFLAGS)				\
-	$(UNIQUE_CFLAGS)				\
 	$(GSTREAMER_CFLAGS)				\
 	$(POLKIT_CFLAGS)				\
 	$(POLKIT_GNOME_CFLAGS)				\
@@ -89,19 +88,13 @@
 	$(GLIB_LIBS)					\
 	$(DEVKIT_POWER_LIBS)				\
 	$(GNOME_LIBS)					\
+	$(UNIQUE_LIBS)					\
 	$(DBUS_LIBS)					\
 	$(NULL)
 
-if HAVE_UNIQUE
-gnome_power_statistics_LDADD +=				\
-	$(UNIQUE_LIBS)
-	$(NULL)
-endif
-
 gnome_power_statistics_CFLAGS =				\
 	$(WARNINGFLAGS)					\
 	$(NULL)
-
 endif
 
 gnome_power_preferences_SOURCES =			\
@@ -136,6 +129,7 @@
 	$(GNOME_LIBS)					\
 	$(HAL_LIBS)					\
 	$(DBUS_LIBS)					\
+	$(UNIQUE_LIBS)					\
 	$(POLKIT_GNOME_LIBS)				\
 	$(GPM_EXTRA_LIBS)				\
 	$(LOCAL_LIBHAL_LIBS)				\
@@ -145,11 +139,6 @@
 	$(WARNINGFLAGS)					\
 	$(NULL)
 
-if HAVE_UNIQUE
-gnome_power_preferences_LDADD +=			\
-	$(UNIQUE_LIBS)
-endif
-
 gnome_power_manager_SOURCES =				\
 	egg-debug.h					\
 	egg-debug.c					\

Modified: trunk/src/egg-unique.c
==============================================================================
--- trunk/src/egg-unique.c	(original)
+++ trunk/src/egg-unique.c	Fri Jan 23 11:57:13 2009
@@ -23,10 +23,7 @@
 
 #include <string.h>
 #include <glib.h>
-
-#if HAVE_UNIQUE
 #include <unique/unique.h>
-#endif
 
 #include "egg-unique.h"
 #include "egg-debug.h"
@@ -37,11 +34,7 @@
 
 struct EggUniquePrivate
 {
-#if HAVE_UNIQUE
 	UniqueApp		*uniqueapp;
-#else
-	gpointer		 uniqueapp;
-#endif
 };
 
 enum {
@@ -53,7 +46,6 @@
 
 G_DEFINE_TYPE (EggUnique, egg_unique, G_TYPE_OBJECT)
 
-#if HAVE_UNIQUE
 /**
  * egg_unique_message_cb:
  **/
@@ -95,21 +87,6 @@
 			  G_CALLBACK (egg_unique_message_cb), egg_unique);
 	return TRUE;
 }
-#else
-
-/**
- * egg_unique_assign:
- * @egg_unique: This class instance
- * @service: The service name
- * Return value: always %TRUE
- **/
-gboolean
-egg_unique_assign (EggUnique *egg_unique, const gchar *service)
-{
-	g_return_val_if_fail (EGG_IS_UNIQUE (egg_unique), FALSE);
-	return TRUE;
-}
-#endif
 
 /**
  * egg_unique_class_init:



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