aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-window.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-10-14 11:40:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-14 19:12:52 +0800
commit1e663aa13266cad55e5019c03e768a38955166eb (patch)
tree6d7a3e20d3a24f004d0db4ab1c06d8a768b2f112 /shell/e-shell-window.c
parent3f58ba3d833953c29bb6aa5e1834e2f367f15202 (diff)
downloadgsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.gz
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.bz2
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.lz
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.xz
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.tar.zst
gsoc2013-evolution-1e663aa13266cad55e5019c03e768a38955166eb.zip
Replace EBinding with GBinding.
GObject now does property bindings itself. Requires GLib >= 2.26.
Diffstat (limited to 'shell/e-shell-window.c')
-rw-r--r--shell/e-shell-window.c38
1 files changed, 24 insertions, 14 deletions
diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c
index e8be087560..7704fb5e71 100644
--- a/shell/e-shell-window.c
+++ b/shell/e-shell-window.c
@@ -359,8 +359,12 @@ shell_window_construct_menubar (EShellWindow *shell_window)
gtk_container_add ((GtkContainer *)parent, child);
shell_window->priv->menubar_box = child;
- e_mutual_binding_new (main_menu, "visible",
- child, "visible");
+ g_object_bind_property (
+ main_menu, "visible",
+ child, "visible",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
main_menu = child;
}
@@ -392,9 +396,10 @@ shell_window_construct_toolbar (EShellWindow *shell_window)
box = gtk_hbox_new (FALSE, 0);
gtk_widget_show (box);
- e_binding_new (
+ g_object_bind_property (
shell_window, "toolbar-visible",
- box, "visible");
+ box, "visible",
+ G_BINDING_SYNC_CREATE);
toolbar = e_shell_window_get_managed_widget (
shell_window, "/main-toolbar");
@@ -460,13 +465,15 @@ shell_window_construct_sidebar (EShellWindow *shell_window)
switcher = e_shell_switcher_new ();
shell_window->priv->switcher = g_object_ref_sink (switcher);
- e_binding_new (
+ g_object_bind_property (
shell_window, "sidebar-visible",
- switcher, "visible");
+ switcher, "visible",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell_window, "switcher-visible",
- switcher, "toolbar-visible");
+ switcher, "toolbar-visible",
+ G_BINDING_SYNC_CREATE);
notebook = gtk_notebook_new ();
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
@@ -515,9 +522,10 @@ shell_window_construct_taskbar (EShellWindow *shell_window)
status_area = gtk_hbox_new (FALSE, 3);
gtk_container_set_border_width (GTK_CONTAINER (status_area), 3);
- e_binding_new (
+ g_object_bind_property (
shell_window, "taskbar-visible",
- status_area, "visible");
+ status_area, "visible",
+ G_BINDING_SYNC_CREATE);
/* Make the status area as large as the task bar. */
gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, NULL, &height);
@@ -528,13 +536,15 @@ shell_window_construct_taskbar (EShellWindow *shell_window)
GTK_BOX (status_area), online_button, FALSE, TRUE, 0);
gtk_widget_show (online_button);
- e_binding_new (
+ g_object_bind_property (
shell, "online",
- online_button, "online");
+ online_button, "online",
+ G_BINDING_SYNC_CREATE);
- e_binding_new (
+ g_object_bind_property (
shell, "network-available",
- online_button, "sensitive");
+ online_button, "sensitive",
+ G_BINDING_SYNC_CREATE);
g_signal_connect (
online_button, "clicked",