aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-11-19 09:39:19 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-11-19 09:39:19 +0800
commitb06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab (patch)
tree854d94e177216f4f6f2b2e9f2c150b7ec5d32e3d /shell/e-shell-view.c
parentc3471bfaaad0a94b6f05b678c1eacbc55e72e2dc (diff)
downloadgsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.gz
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.tar.zst
gsoc2013-evolution-b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab.zip
Progress update:
- Tighter integration of GalViewInstance and EShellView. - EBinding. Stolen from ExoBinding. Lets you bind GObject properties together to automatically keep their values in sync. This is a godsend. Added to e-util, but might even deserve a place in libedataserver. - EShellSettings. This is the concept I blogged about. Already started ripping apart em-mailer-prefs.c. Others to follow. Any place where we're monitoring GConf keys is a target. - Incremental progress on the calender and mailer. Got EMFolderView somewhat working, but I think I'll be killing off EMFolderBrowser. svn path=/branches/kill-bonobo/; revision=36795
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index 3ab67b6ab0..9c5ff2b8bb 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -111,6 +111,17 @@ shell_view_init_view_collection (EShellViewClass *shell_view_class)
}
static void
+shell_view_update_view_id (EShellView *shell_view,
+ GalViewInstance *view_instance)
+{
+ gchar *view_id;
+
+ view_id = gal_view_instance_get_current_view_id (view_instance);
+ e_shell_view_set_view_id (shell_view, view_id);
+ g_free (view_id);
+}
+
+static void
shell_view_emit_toggled (EShellView *shell_view)
{
g_signal_emit (shell_view, signals[TOGGLED], 0);
@@ -967,3 +978,35 @@ e_shell_view_show_popup_menu (EShellView *shell_view,
GTK_MENU (menu), NULL, NULL, NULL, NULL,
0, gtk_get_current_event_time ());
}
+
+/**
+ * e_shell_view_new_view_instance:
+ * @shell_view: an #EShellView
+ * @instance_id: a name for the #GalViewInstance
+ *
+ * Creates a new #GalViewInstance and configures it to keep
+ * @shell_view<!-- -->'s #EShellView:view-id property up-to-date.
+ *
+ * Returns: a new #GalViewInstance
+ **/
+GalViewInstance *
+e_shell_view_new_view_instance (EShellView *shell_view,
+ const gchar *instance_id)
+{
+ EShellViewClass *shell_view_class;
+ GalViewCollection *view_collection;
+ GalViewInstance *view_instance;
+
+ g_return_val_if_fail (E_IS_SHELL_VIEW (shell_view), NULL);
+
+ shell_view_class = E_SHELL_VIEW_GET_CLASS (shell_view);
+
+ view_collection = shell_view_class->view_collection;
+ view_instance = gal_view_instance_new (view_collection, instance_id);
+
+ g_signal_connect_swapped (
+ view_instance, "changed",
+ G_CALLBACK (shell_view_update_view_id), shell_view);
+
+ return view_instance;
+}