From 0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 19 Feb 2009 05:52:33 +0000 Subject: Rename EShell:online-mode to EShell:online and update docs. Use EBindings instead of a notify callback to keep other widgets and actions synchronized with EShell:online. Cleaner and less error prone. svn path=/branches/kill-bonobo/; revision=37293 --- shell/e-shell-window.c | 35 +---------------------------------- 1 file changed, 1 insertion(+), 34 deletions(-) (limited to 'shell/e-shell-window.c') diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 6adfe6e9b7..d6d49cfe3c 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -105,32 +105,6 @@ shell_window_new_view (EShellWindow *shell_window, return shell_view; } -static void -shell_window_online_mode_notify_cb (EShell *shell, - GParamSpec *pspec, - EShellWindow *shell_window) -{ - GtkAction *action; - EOnlineButton *online_button; - gboolean online_mode; - - online_mode = e_shell_get_online_mode (shell); - - action = ACTION (SEND_RECEIVE); - gtk_action_set_sensitive (action, online_mode); - - action = ACTION (WORK_OFFLINE); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, online_mode); - - action = ACTION (WORK_ONLINE); - gtk_action_set_sensitive (action, TRUE); - gtk_action_set_visible (action, !online_mode); - - online_button = E_ONLINE_BUTTON (shell_window->priv->online_button); - e_online_button_set_online (online_button, online_mode); -} - static void shell_window_update_close_action_cb (EShellWindow *shell_window) { @@ -172,13 +146,6 @@ shell_window_set_shell (EShellWindow *shell_window, array = shell_window->priv->signal_handler_ids; - handler_id = g_signal_connect ( - shell, "notify::online-mode", - G_CALLBACK (shell_window_online_mode_notify_cb), - shell_window); - - g_array_append_val (array, handler_id); - handler_id = g_signal_connect_swapped ( shell, "window-created", G_CALLBACK (shell_window_update_close_action_cb), @@ -193,7 +160,7 @@ shell_window_set_shell (EShellWindow *shell_window, g_array_append_val (array, handler_id); - g_object_notify (G_OBJECT (shell), "online-mode"); + g_object_notify (G_OBJECT (shell), "online"); } static void -- cgit v1.2.3