From b06cdfab92313ca7b1ce9a88ccb0ffba33cb17ab Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 19 Nov 2008 01:39:19 +0000 Subject: 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 --- mail/e-mail-shell-view-private.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'mail/e-mail-shell-view-private.c') diff --git a/mail/e-mail-shell-view-private.c b/mail/e-mail-shell-view-private.c index 9287ed777e..21521fd0f9 100644 --- a/mail/e-mail-shell-view-private.c +++ b/mail/e-mail-shell-view-private.c @@ -23,6 +23,32 @@ #include +static void +mail_shell_view_folder_tree_selected_cb (EMailShellView *mail_shell_view, + const gchar *full_name, + const gchar *uri, + guint32 flags, + EMFolderTree *folder_tree) +{ + EMailShellContent *mail_shell_content; + EMFolderView *folder_view; + + mail_shell_content = mail_shell_view->priv->mail_shell_content; + folder_view = e_mail_shell_content_get_folder_view (mail_shell_content); + + if ((flags & CAMEL_FOLDER_NOSELECT) || full_name == NULL) + em_folder_view_set_folder (folder_view, NULL, NULL); + else { + EMFolderTreeModel *model; + + model = em_folder_tree_get_model (folder_tree); + em_folder_tree_model_set_selected (model, uri); + em_folder_tree_model_save_state (model); + + em_folder_view_set_folder_uri (folder_view, uri); + } +} + static void mail_shell_view_folder_tree_popup_event_cb (EShellView *shell_view, GdkEventButton *event) @@ -120,6 +146,11 @@ e_mail_shell_view_private_constructed (EMailShellView *mail_shell_view) mail_shell_sidebar = E_MAIL_SHELL_SIDEBAR (shell_sidebar); folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); + g_signal_connect_swapped ( + folder_tree, "folder-selected", + G_CALLBACK (mail_shell_view_folder_tree_selected_cb), + mail_shell_view); + g_signal_connect_swapped ( folder_tree, "popup-event", G_CALLBACK (mail_shell_view_folder_tree_popup_event_cb), -- cgit v1.2.3