aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-03-30 08:22:56 +0800
committerDan Winship <danw@src.gnome.org>2000-03-30 08:22:56 +0800
commit4435a5db63161145af807bc7e0845a899adeca30 (patch)
tree1049f1719cde0632016610952e20604f178eb909 /shell
parentb36ddcbdd5cd0cc57dd7f15931a699bda6499297 (diff)
downloadgsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar.gz
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar.bz2
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar.lz
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar.xz
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.tar.zst
gsoc2013-evolution-4435a5db63161145af807bc7e0845a899adeca30.zip
Call bonobo_control_frame_activate on the folder_view every time it is
* shell/e-shell-view.c (e_shell_view_set_view): Call bonobo_control_frame_activate on the folder_view every time it is displayed, and bonobo_control_frame_deactivate every time it is hidden. * folder-browser-factory.c (control_activate): build a toolbar. (control_deactivate): and hide it. svn path=/trunk/; revision=2250
Diffstat (limited to 'shell')
-rw-r--r--shell/e-shell-view.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index b4558c023b..2061c9b329 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -173,23 +173,30 @@ get_view (EShellView *eshell_view, EFolder *efolder, Bonobo_UIHandler uih)
void
e_shell_view_set_view (EShellView *eshell_view, EFolder *efolder)
{
- GtkWidget *notebook = eshell_view->priv->notebook;
+ GtkNotebook *notebook = GTK_NOTEBOOK (eshell_view->priv->notebook);
GtkWidget *folder_view = g_hash_table_lookup (
eshell_view->priv->folder_views, efolder);
+ int current_page = gtk_notebook_get_current_page (notebook);
g_assert (eshell_view);
g_assert (efolder);
+ if (current_page != -1) {
+ GtkWidget *current;
+
+ current = gtk_notebook_get_nth_page (notebook, current_page);
+ bonobo_control_frame_control_deactivate (bonobo_widget_get_control_frame (BONOBO_WIDGET (current)));
+ }
+
/* if we found a notebook page in our hash, that represents
this efolder, switch to it */
if (folder_view) {
-
- int notebook_page = gtk_notebook_page_num (
- GTK_NOTEBOOK(notebook),
- folder_view);
+ int notebook_page = gtk_notebook_page_num (notebook,
+ folder_view);
g_assert (notebook_page != -1);
- gtk_notebook_set_page (GTK_NOTEBOOK (notebook), notebook_page);
+ gtk_notebook_set_page (notebook, notebook_page);
+ bonobo_control_frame_control_activate (bonobo_widget_get_control_frame (BONOBO_WIDGET (folder_view)));
}
else {
/* get a new control that represents this efolder,
@@ -197,21 +204,20 @@ e_shell_view_set_view (EShellView *eshell_view, EFolder *efolder)
Bonobo_UIHandler uih =
bonobo_object_corba_objref (
BONOBO_OBJECT (eshell_view->uih));
-
+
GtkWidget *w = get_view (eshell_view, efolder, uih);
int new_page_index;
if (!w) return;
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), w, NULL);
+ gtk_notebook_append_page (notebook, w, NULL);
- new_page_index = gtk_notebook_page_num (
- GTK_NOTEBOOK(notebook),
- folder_view);
+ new_page_index = gtk_notebook_page_num (notebook,
+ folder_view);
g_hash_table_insert (eshell_view->priv->folder_views,
efolder, w);
- gtk_notebook_set_page (GTK_NOTEBOOK (notebook),new_page_index);
+ gtk_notebook_set_page (notebook, new_page_index);
}
}