diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-19 13:52:33 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-19 13:52:33 +0800 |
commit | 0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8 (patch) | |
tree | 2878cd13bd0cbdb1aa575dc9a351517591f002f9 /shell/e-shell-window-private.c | |
parent | fd564be3203400024147469faaa7de0884861566 (diff) | |
download | gsoc2013-evolution-0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8.tar.gz gsoc2013-evolution-0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8.tar.zst gsoc2013-evolution-0110c94c6abdbb25b4fea6a21f20f00b82a0fdd8.zip |
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
Diffstat (limited to 'shell/e-shell-window-private.c')
-rw-r--r-- | shell/e-shell-window-private.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 (); |