From 279a347abf62de56d6965f7fd7410367417b4d7b Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Sun, 24 Feb 2013 13:02:25 +0100 Subject: [PATCH] examples: remove GLIB_CHECK_VERSION checks from GDBus examples --- examples/C/glib/monitor-nm-running-GDBus.c | 6 ------ examples/C/glib/monitor-nm-state-GDBus.c | 6 ------ 2 files changed, 12 deletions(-) diff --git a/examples/C/glib/monitor-nm-running-GDBus.c b/examples/C/glib/monitor-nm-running-GDBus.c index 42f9b75824..5cc7232449 100644 --- a/examples/C/glib/monitor-nm-running-GDBus.c +++ b/examples/C/glib/monitor-nm-running-GDBus.c @@ -31,7 +31,6 @@ #include -#if GLIB_CHECK_VERSION(2,26,0) static void on_name_appeared (GDBusConnection *connection, const gchar *name, @@ -49,13 +48,11 @@ on_name_vanished (GDBusConnection *connection, { g_print ("Name '%s' does not exist on the system bus => NM is not running\n", name); } -#endif int main (int argc, char *argv[]) { -#if GLIB_CHECK_VERSION(2,26,0) guint watcher_id; GMainLoop *loop; GBusNameWatcherFlags flags; @@ -83,9 +80,6 @@ main (int argc, char *argv[]) /* Stop watching the name */ g_bus_unwatch_name (watcher_id); -#else - g_print ("Sorry, you need at least GLib 2.26 for GDBus.\n"); -#endif return 0; } diff --git a/examples/C/glib/monitor-nm-state-GDBus.c b/examples/C/glib/monitor-nm-state-GDBus.c index 22ff65b77a..a3c5d8e131 100644 --- a/examples/C/glib/monitor-nm-state-GDBus.c +++ b/examples/C/glib/monitor-nm-state-GDBus.c @@ -34,7 +34,6 @@ #include #include -#if GLIB_CHECK_VERSION(2,26,0) static const char * nm_state_to_string (NMState state) { @@ -82,13 +81,11 @@ on_signal (GDBusProxy *proxy, g_print ("NetworkManager state is: (%d) %s\n", new_state, nm_state_to_string ((NMState) new_state)); } } -#endif int main (int argc, char *argv[]) { -#if GLIB_CHECK_VERSION(2,26,0) GMainLoop *loop; GError *error = NULL; GDBusProxyFlags flags; @@ -129,9 +126,6 @@ main (int argc, char *argv[]) g_main_loop_run (loop); g_object_unref (proxy); -#else - g_print ("Sorry, you need at least GLib 2.26 for GDBus.\n"); -#endif return 0; } -- GitLab