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-private.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'shell/e-shell-window-private.c') diff --git a/shell/e-shell-window-private.c b/shell/e-shell-window-private.c index bfaa87396b..38d3926d67 100644 --- a/shell/e-shell-window-private.c +++ b/shell/e-shell-window-private.c @@ -336,6 +336,7 @@ e_shell_window_private_constructed (EShellWindow *shell_window) EShell *shell; GConfBridge *bridge; GtkActionGroup *action_group; + GtkAction *action; GObject *object; const gchar *key; @@ -369,6 +370,30 @@ e_shell_window_private_constructed (EShellWindow *shell_window) G_OBJECT (shell_settings), "disable-save-to-disk", G_OBJECT (action_group), "sensitive"); + /* Bind GObject properties to GObject properties. */ + + action = ACTION (SEND_RECEIVE); + + e_binding_new ( + G_OBJECT (shell), "online", + G_OBJECT (action), "sensitive"); + + action = ACTION (WORK_OFFLINE); + + e_binding_new ( + G_OBJECT (shell), "online", + G_OBJECT (action), "visible"); + + action = ACTION (WORK_ONLINE); + + e_binding_new_with_negation ( + G_OBJECT (shell), "online", + G_OBJECT (action), "visible"); + + e_binding_new ( + G_OBJECT (shell), "online", + G_OBJECT (shell_window->priv->online_button), "online"); + /* Bind GObject properties to GConf keys. */ bridge = gconf_bridge_get (); -- cgit