[gnome-settings-daemon] power: Make compile-time option more generic



commit 498848c9670c2465259f2c9b0fe50caaca00427a
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jan 29 12:00:59 2013 +0100

    power: Make compile-time option more generic
    
    So that we "mock" other hardware types.

 plugins/power/Makefile.am         |    2 +-
 plugins/power/gpm-common.c        |    4 ++--
 plugins/power/gsd-power-manager.c |    8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/plugins/power/Makefile.am b/plugins/power/Makefile.am
index b98f50f..88e73da 100644
--- a/plugins/power/Makefile.am
+++ b/plugins/power/Makefile.am
@@ -76,7 +76,7 @@ gsd_test_power_SOURCES =				\
 	test-power.c
 
 gsd_test_power_CFLAGS = $(libpower_la_CFLAGS)
-gsd_test_power_CPPFLAGS = $(libpower_la_CPPFLAGS) -DMOCK_EXTERNAL_MONITOR=1
+gsd_test_power_CPPFLAGS = $(libpower_la_CPPFLAGS) -DGSD_MOCK=1
 gsd_test_power_LDADD =					\
 	-lm						\
 	$(top_builddir)/plugins/common/libcommon.la	\
diff --git a/plugins/power/gpm-common.c b/plugins/power/gpm-common.c
index 25e8dcc..5ad12c7 100644
--- a/plugins/power/gpm-common.c
+++ b/plugins/power/gpm-common.c
@@ -1656,7 +1656,7 @@ external_monitor_is_connected (GnomeRRScreen *screen)
         GnomeRROutput **outputs;
         guint i;
 
-#ifdef MOCK_EXTERNAL_MONITOR
+#ifdef GSD_MOCK
 	char *mock_external_monitor_contents;
 
 	if (g_file_get_contents ("GSD_MOCK_EXTERNAL_MONITOR", &mock_external_monitor_contents, NULL, NULL)) {
@@ -1671,7 +1671,7 @@ external_monitor_is_connected (GnomeRRScreen *screen)
 		g_warning ("Unhandled value for GSD_MOCK_EXTERNAL_MONITOR contents: %s", mock_external_monitor_contents);
 		g_free (mock_external_monitor_contents);
 	}
-#endif /* MOCK_EXTERNAL_MONITOR */
+#endif /* GSD_MOCK */
 
         /* see if we have more than one screen plugged in */
         outputs = gnome_rr_screen_list_outputs (screen);
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index d6fa8fe..edb92f3 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -3285,14 +3285,14 @@ on_randr_event (GnomeRRScreen *screen, gpointer user_data)
         setup_inhibit_lid_switch_timer (manager);
 }
 
-#ifdef MOCK_EXTERNAL_MONITOR
+#ifdef GSD_MOCK
 static gboolean
 received_sigusr2 (GsdPowerManager *manager)
 {
         on_randr_event (NULL, manager);
         return TRUE;
 }
-#endif /* MOCK_EXTERNAL_MONITOR */
+#endif /* GSD_MOCK */
 
 static void
 handle_suspend_actions (GsdPowerManager *manager)
@@ -3485,9 +3485,9 @@ gsd_power_manager_start (GsdPowerManager *manager,
         g_signal_connect (manager->priv->rr_screen, "changed", G_CALLBACK (on_randr_event), manager);
         on_randr_event (manager->priv->rr_screen, manager);
 
-#ifdef MOCK_EXTERNAL_MONITOR
+#ifdef GSD_MOCK
         g_unix_signal_add (SIGUSR2, (GSourceFunc) received_sigusr2, manager);
-#endif /* MOCK_EXTERNAL_MONITOR */
+#endif /* GSD_MOCK */
 
         /* check whether a backlight is available */
         manager->priv->backlight_available = backlight_available (manager->priv->rr_screen);



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