aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-nm-glib.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-19 23:02:36 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-19 23:02:36 +0800
commit879d84ab6eda1254ecfa7b9eef230850d6088576 (patch)
tree5bb313946c3c57bd5ad8ac5c6f07685548854493 /shell/e-shell-nm-glib.c
parent0ef31a8a847a143130b38061cd1f42fb0f2984f4 (diff)
downloadgsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar.gz
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar.bz2
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar.lz
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar.xz
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.tar.zst
gsoc2013-evolution-879d84ab6eda1254ecfa7b9eef230850d6088576.zip
Coding style cleanups.
svn path=/trunk/; revision=36025
Diffstat (limited to 'shell/e-shell-nm-glib.c')
-rw-r--r--shell/e-shell-nm-glib.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/shell/e-shell-nm-glib.c b/shell/e-shell-nm-glib.c
index 0af9e5d811..1325572f0f 100644
--- a/shell/e-shell-nm-glib.c
+++ b/shell/e-shell-nm-glib.c
@@ -33,9 +33,10 @@
static libnm_glib_ctx *nm_ctx = NULL;
static guint id = 0;
-static void e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_data)
+static void
+e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_data)
{
- libnm_glib_state state;
+ libnm_glib_state state;
EShellLineStatus line_status;
EShellWindow *window = E_SHELL_WINDOW (user_data);
EShell *shell = e_shell_window_peek_shell (window);
@@ -47,26 +48,26 @@ static void e_shell_glib_network_monitor (libnm_glib_ctx *ctx, gpointer user_dat
line_status = e_shell_get_line_status (shell);
if (line_status == E_SHELL_LINE_STATUS_ONLINE && state == LIBNM_NO_NETWORK_CONNECTION) {
- shell_state = GNOME_Evolution_FORCED_OFFLINE;
- e_shell_go_offline (shell, window, shell_state);
+ shell_state = GNOME_Evolution_FORCED_OFFLINE;
+ e_shell_go_offline (shell, window, shell_state);
} else if (line_status == E_SHELL_LINE_STATUS_FORCED_OFFLINE && state == LIBNM_ACTIVE_NETWORK_CONNECTION) {
- shell_state = GNOME_Evolution_USER_ONLINE;
- e_shell_go_online (shell, window, shell_state);
+ shell_state = GNOME_Evolution_USER_ONLINE;
+ e_shell_go_online (shell, window, shell_state);
}
}
-int e_shell_nm_glib_initialise (EShellWindow *window);
+gboolean e_shell_nm_glib_initialise (EShellWindow *window);
void e_shell_nm_glib_dispose (EShellWindow *window);
-int e_shell_nm_glib_initialise (EShellWindow *window)
+gboolean
+e_shell_nm_glib_initialise (EShellWindow *window)
{
- if (!nm_ctx)
- {
+ if (!nm_ctx) {
nm_ctx = libnm_glib_init ();
if (!nm_ctx) {
- fprintf (stderr, "Could not initialize libnm.\n");
- return FALSE;
- }
+ fprintf (stderr, "Could not initialize libnm.\n");
+ return FALSE;
+ }
}
id = libnm_glib_register_callback (nm_ctx, e_shell_glib_network_monitor, window, NULL);
@@ -74,7 +75,8 @@ int e_shell_nm_glib_initialise (EShellWindow *window)
return TRUE;
}
-void e_shell_nm_glib_dispose (EShellWindow *window)
+void
+e_shell_nm_glib_dispose (EShellWindow *window)
{
if (id != 0 && nm_ctx != NULL) {
libnm_glib_unregister_callback (nm_ctx, id);
@@ -83,4 +85,3 @@ void e_shell_nm_glib_dispose (EShellWindow *window)
id = 0;
}
}
-