[network-manager-applet/danw/deps: 3/11] build: compile NMShellWatcher unconditionally



commit 289e4e5c4609c5db1d4be7b37cee4acccf208030
Author: Dan Winship <danw gnome org>
Date:   Sun Feb 24 15:12:36 2013 +0100

    build: compile NMShellWatcher unconditionally
    
    We always have GDBus now.

 src/applet.c        |    7 +------
 src/applet.h        |    2 --
 src/shell-watcher.c |    4 ----
 src/shell-watcher.h |    4 ----
 4 files changed, 1 insertions(+), 16 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 080c5a7..ce5b457 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3338,7 +3338,6 @@ applet_embedded_cb (GObject *object, GParamSpec *pspec, gpointer user_data)
                   embedded ? "embedded in" : "removed from");
 }
 
-#if GLIB_CHECK_VERSION(2,26,0)
 static gboolean
 delayed_start_agent (gpointer user_data)
 {
@@ -3392,7 +3391,6 @@ shell_version_changed_cb (NMShellWatcher *watcher, GParamSpec *pspec, gpointer u
                applet_agent_handle_vpn_only (applet->agent, FALSE);
        }
 }
-#endif
 
 static gboolean
 dbus_setup (NMApplet *applet, GError **error)
@@ -3533,14 +3531,12 @@ constructor (GType type,
                          G_CALLBACK (applet_embedded_cb), NULL);
        applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
 
-#if GLIB_CHECK_VERSION(2,26,0)
        /* Watch GNOME Shell so we can unregister our applet agent if it appears */
        applet->shell_watcher = nm_shell_watcher_new ();
        g_signal_connect (applet->shell_watcher,
                          "notify::shell-version",
                          G_CALLBACK (shell_version_changed_cb),
                          applet);
-#endif
 
        return G_OBJECT (applet);
 
@@ -3612,10 +3608,9 @@ static void finalize (GObject *object)
        if (applet->session_bus)
                dbus_g_connection_unref (applet->session_bus);
 
-#if GLIB_CHECK_VERSION(2,26,0)
        if (applet->shell_watcher)
                g_object_unref (applet->shell_watcher);
-#endif
+
        if (applet->agent_start_id)
                g_source_remove (applet->agent_start_id);
 
diff --git a/src/applet.h b/src/applet.h
index 0a429a8..6765d23 100644
--- a/src/applet.h
+++ b/src/applet.h
@@ -88,9 +88,7 @@ typedef struct
        DBusGConnection *bus;
        DBusGConnection *session_bus;
 
-#if GLIB_CHECK_VERSION(2,26,0)
        NMShellWatcher *shell_watcher;
-#endif
        guint agent_start_id;
 
        NMClient *nm_client;
diff --git a/src/shell-watcher.c b/src/shell-watcher.c
index 1fb1649..0628aaa 100644
--- a/src/shell-watcher.c
+++ b/src/shell-watcher.c
@@ -26,8 +26,6 @@
 
 #include "shell-watcher.h"
 
-#if GLIB_CHECK_VERSION(2,26,0)
-
 G_DEFINE_TYPE (NMShellWatcher, nm_shell_watcher, G_TYPE_OBJECT)
 
 struct NMShellWatcherPrivate {
@@ -238,5 +236,3 @@ nm_shell_watcher_version_at_least (NMShellWatcher *watcher, guint major, guint m
 
        return watcher->priv->shell_version >= version;
 }
-
-#endif /* GLIB_CHECK_VERSION(2,26,0) */
diff --git a/src/shell-watcher.h b/src/shell-watcher.h
index 7942893..a6065f8 100644
--- a/src/shell-watcher.h
+++ b/src/shell-watcher.h
@@ -27,8 +27,6 @@
 
 #include <gio/gio.h>
 
-#if GLIB_CHECK_VERSION(2,26,0)
-
 #define NM_TYPE_SHELL_WATCHER                  (nm_shell_watcher_get_type())
 #define NM_SHELL_WATCHER(object)               (G_TYPE_CHECK_INSTANCE_CAST((object), NM_TYPE_SHELL_WATCHER, 
NMShellWatcher))
 #define NM_SHELL_WATCHER_CLASS(klass)          (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SHELL_WATCHER, 
NMShellWatcherClass))
@@ -55,6 +53,4 @@ NMShellWatcher *nm_shell_watcher_new (void);
 gboolean nm_shell_watcher_version_at_least (NMShellWatcher *watcher,
                                             guint major, guint minor);
 
-#endif /* GLIB_CHECK_VERSION(2,26,0) */
-
 #endif


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