[network-manager-applet] 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] applet: let secret agent stay enabled with --shell-debug
- Date: Wed, 17 Apr 2013 17:35:28 +0000 (UTC)
commit e8fed2bf6bab6f0e14f4ff6a72f000ed8bd78c21
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 | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/applet.c b/src/applet.c
index 83e5e23..3ab1942 100644
--- a/src/applet.c
+++ b/src/applet.c
@@ -3003,7 +3003,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));
@@ -3485,11 +3486,13 @@ constructor (GType type,
applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
/* 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) {
+ applet->shell_watcher = nm_shell_watcher_new ();
+ g_signal_connect (applet->shell_watcher,
+ "notify::shell-version",
+ G_CALLBACK (shell_version_changed_cb),
+ applet);
+ }
return G_OBJECT (applet);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]