evolution r36025 - trunk/shell



Author: mbarnes
Date: Tue Aug 19 15:02:36 2008
New Revision: 36025
URL: http://svn.gnome.org/viewvc/evolution?rev=36025&view=rev

Log:
Coding style cleanups.


Modified:
   trunk/shell/e-shell-nm-glib.c
   trunk/shell/e-shell-nm.c
   trunk/shell/e-shell-window.c

Modified: trunk/shell/e-shell-nm-glib.c
==============================================================================
--- trunk/shell/e-shell-nm-glib.c	(original)
+++ trunk/shell/e-shell-nm-glib.c	Tue Aug 19 15:02:36 2008
@@ -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 @@
 	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 @@
 	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 @@
 		id = 0;
 	}
 }
-

Modified: trunk/shell/e-shell-nm.c
==============================================================================
--- trunk/shell/e-shell-nm.c	(original)
+++ trunk/shell/e-shell-nm.c	Tue Aug 19 15:02:36 2008
@@ -40,12 +40,10 @@
 	E_SHELL_LINE_UP
 } ShellLineStatus;
 
-
 static gboolean init_dbus (EShellWindow *window);
 
 static DBusConnection *dbus_connection = NULL;
 
-
 static gboolean
 reinit_dbus (gpointer user_data)
 {
@@ -59,7 +57,7 @@
 
 static DBusHandlerResult
 e_shell_network_monitor (DBusConnection *connection G_GNUC_UNUSED,
-			 DBusMessage *message, void *user_data)
+                         DBusMessage *message, void *user_data)
 {
 	DBusError error;
 	const char *object;
@@ -69,11 +67,11 @@
 	GNOME_Evolution_ShellState shell_state;
 	EShellLineStatus line_status;
 
- 	if (!user_data || !E_IS_SHELL_WINDOW (user_data))
- 		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+	if (!user_data || !E_IS_SHELL_WINDOW (user_data))
+		return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
  
- 	window = E_SHELL_WINDOW (user_data);
- 	shell = e_shell_window_peek_shell (window);
+	window = E_SHELL_WINDOW (user_data);
+	shell = e_shell_window_peek_shell (window);
 
 	dbus_error_init (&error);
 	object = dbus_message_get_path (message);
@@ -102,11 +100,11 @@
 	line_status = e_shell_get_line_status (shell);
 
 	if (line_status == E_SHELL_LINE_STATUS_ONLINE && status == E_SHELL_LINE_DOWN) {
-		  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 && status == E_SHELL_LINE_UP) {
-		  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);
 	}
 
 	return DBUS_HANDLER_RESULT_HANDLED;
@@ -145,7 +143,7 @@
 
 	return TRUE;
 
- exception:
+exception:
 
 	dbus_connection_unref (dbus_connection);
 	dbus_connection = NULL;
@@ -153,16 +151,17 @@
 	return FALSE;
 }
 
-int e_shell_dbus_initialise (EShellWindow *window)
+gboolean
+e_shell_dbus_initialise (EShellWindow *window)
 {
 	g_type_init ();
 
 	return init_dbus (window);
 }
 
-void e_shell_dbus_dispose (EShellWindow *window)
+void
+e_shell_dbus_dispose (EShellWindow *window)
 {
 	//FIXME
 	return;
 }
-

Modified: trunk/shell/e-shell-window.c
==============================================================================
--- trunk/shell/e-shell-window.c	(original)
+++ trunk/shell/e-shell-window.c	Tue Aug 19 15:02:36 2008
@@ -54,10 +54,10 @@
 #include <string.h>
 
 #ifdef NM_SUPPORT_GLIB
-void e_shell_nm_glib_initialise (EShellWindow *window);
+gboolean e_shell_nm_glib_initialise (EShellWindow *window);
 void e_shell_nm_glib_dispose (EShellWindow *window);
 #elif NM_SUPPORT
-void e_shell_dbus_initialise (EShellWindow *window);
+gboolean e_shell_dbus_initialise (EShellWindow *window);
 void e_shell_dbus_dispose (EShellWindow *window);
 #endif
 



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