[network-manager-applet/nma-0-9-8] applet: let secret agent stay enabled with --shell-debug
- From: Dan Williams <dcbw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-applet/nma-0-9-8] applet: let secret agent stay enabled with --shell-debug
- Date: Fri, 19 Apr 2013 23:30:39 +0000 (UTC)
commit bac3802d1e5950e0200ad157d641460aee02e7ef
Author: Dan Williams <dcbw redhat com>
Date: Wed Apr 17 12:35:10 2013 -0500
applet: let secret agent stay enabled with --shell-debug
src/applet.c | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 86d9c14..5c8d892 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3056,7 +3056,8 @@ applet_agent_registered_cb (AppletAgent *agent,
NMApplet *applet = NM_APPLET (user_data);
/* If the shell is running and the agent just got registered, unregister it */
- if ( (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
+ if ( applet->shell_watcher
+ && (nm_shell_watcher_version_at_least (applet->shell_watcher, 3, 4))
&& nm_secret_agent_get_registered (NM_SECRET_AGENT (agent))) {
g_message ("Stopping registered applet secret agent because GNOME Shell is running");
nm_secret_agent_unregister (NM_SECRET_AGENT (agent));
@@ -3530,12 +3531,14 @@ constructor (GType type,
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);
+ if (!shell_debug) {
+ /* 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]