diff options
| author | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2014-07-06 02:16:10 +0200 |
| commit | 33491bc4279481db8ae47213e34a6d695a0e8830 (patch) | |
| tree | 097d2b0fdff3fae6885381ae5e57a182cd8cbbba /examples/C/glib/monitor-nm-state-GDBus.c | |
| parent | 59c3714a494c3b3765657c0551ad82842d98a7d2 (diff) | |
Imported Upstream version 0.9.10.0 upstream/0.9.10.0
Diffstat (limited to 'examples/C/glib/monitor-nm-state-GDBus.c')
| -rw-r--r-- | examples/C/glib/monitor-nm-state-GDBus.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/examples/C/glib/monitor-nm-state-GDBus.c b/examples/C/glib/monitor-nm-state-GDBus.c index 22ff65b7..f4019725 100644 --- a/examples/C/glib/monitor-nm-state-GDBus.c +++ b/examples/C/glib/monitor-nm-state-GDBus.c @@ -34,7 +34,6 @@ #include <string.h> #include <NetworkManager.h> -#if GLIB_CHECK_VERSION(2,26,0) static const char * nm_state_to_string (NMState state) { @@ -82,20 +81,20 @@ 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; GDBusProxy *proxy; +#if !GLIB_CHECK_VERSION (2, 35, 0) /* Initialize GType system */ g_type_init (); +#endif /* Monitor 'StateChanged' signal on 'org.freedesktop.NetworkManager' interface */ g_print ("Monitor NetworkManager's state\n"); @@ -129,9 +128,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; } |