aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorShreyas Srinivasan <sshreyas@novell.com>2006-02-05 12:42:45 +0800
committerShreyas Srinivasan <shres@src.gnome.org>2006-02-05 12:42:45 +0800
commit026358880f1ef99df8b99c4b9430031d66d3648e (patch)
treedf055cc9667f7c4c22b353cff25dec23a678f994 /shell
parent17db214c431ffe74c1efe64671e34892ce833356 (diff)
downloadgsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar.gz
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar.bz2
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar.lz
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar.xz
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.tar.zst
gsoc2013-evolution-026358880f1ef99df8b99c4b9430031d66d3648e.zip
init the nm-dbus connection once.
2006-02-05 Shreyas Srinivasan <sshreyas@novell.com> * e-shell-nm-glib.c: init the nm-dbus connection once. svn path=/trunk/; revision=31406
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog4
-rw-r--r--shell/e-shell-nm-glib.c14
2 files changed, 12 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 52805c3a7d..7748c54833 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-05 Shreyas Srinivasan <sshreyas@novell.com>
+
+ * e-shell-nm-glib.c: init the nm-dbus connection once.
+
2006-01-29 Kjartan Maraas <kmaraas@gnome.org>
* e-corba-config-page.c: (e_corba_config_page_class_init):
diff --git a/shell/e-shell-nm-glib.c b/shell/e-shell-nm-glib.c
index 8ebb0b7eff..9c6a8fd67d 100644
--- a/shell/e-shell-nm-glib.c
+++ b/shell/e-shell-nm-glib.c
@@ -30,6 +30,7 @@
#include <NetworkManager/libnm_glib.h>
#include <e-shell-window.h>
+static libnm_glib_ctx *nm_ctx = NULL;
static void e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_data)
{
@@ -59,17 +60,18 @@ static void e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_dat
int e_shell_nm_glib_initialise (EShellWindow *window )
{
- libnm_glib_ctx *ctx;
guint id;
- ctx = libnm_glib_init ();
- if (!ctx)
+ if (!nm_ctx)
{
- fprintf (stderr, "Could not initialize libnm.\n");
- return FALSE;
+ nm_ctx = libnm_glib_init ();
+ if (!nm_ctx) {
+ fprintf (stderr, "Could not initialize libnm.\n");
+ return FALSE;
+ }
}
- id = libnm_glib_register_callback (ctx, e_shell_glib_network_monitor, window, NULL);
+ id = libnm_glib_register_callback (nm_ctx, e_shell_glib_network_monitor, window, NULL);
return TRUE;
}