aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-view.c19
2 files changed, 16 insertions, 9 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 08b9a4984f..2ffb1e7476 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2001-12-14 Michael Meeks <michael@ximian.com>
+
+ * e-shell-view.c (set_current_notebook_page): re-order
+ activate / de-activate to minimise flicker switching between
+ identical components.
+
2002-01-11 Damon Chaplin <damon@ximian.com>
* e-shell-startup-wizard.c (finish_func): handle translated timezone
diff --git a/shell/e-shell-view.c b/shell/e-shell-view.c
index b0960a972a..9a9b09bd9c 100644
--- a/shell/e-shell-view.c
+++ b/shell/e-shell-view.c
@@ -1666,7 +1666,8 @@ set_current_notebook_page (EShellView *shell_view,
EShellViewPrivate *priv;
GtkNotebook *notebook;
GtkWidget *current;
- BonoboControlFrame *control_frame;
+ BonoboControlFrame *old_control_frame = NULL;
+ BonoboControlFrame *new_control_frame;
int current_page;
priv = shell_view->priv;
@@ -1678,10 +1679,8 @@ set_current_notebook_page (EShellView *shell_view,
if (current_page != -1 && current_page != 0) {
current = gtk_notebook_get_nth_page (notebook, current_page);
- control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current));
-
- bonobo_control_frame_set_autoactivate (control_frame, FALSE);
- bonobo_control_frame_control_deactivate (control_frame);
+ old_control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current));
+ bonobo_control_frame_set_autoactivate (old_control_frame, FALSE);
}
e_shell_folder_title_bar_set_folder_bar_label (E_SHELL_FOLDER_TITLE_BAR (priv->folder_title_bar), "");
@@ -1691,10 +1690,12 @@ set_current_notebook_page (EShellView *shell_view,
return;
current = gtk_notebook_get_nth_page (notebook, page_num);
- control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current));
-
- bonobo_control_frame_set_autoactivate (control_frame, FALSE);
- bonobo_control_frame_control_activate (control_frame);
+ new_control_frame = bonobo_widget_get_control_frame (BONOBO_WIDGET (current));
+ bonobo_control_frame_set_autoactivate (new_control_frame, FALSE);
+
+ bonobo_control_frame_control_activate (new_control_frame);
+ if (old_control_frame)
+ bonobo_control_frame_control_deactivate (old_control_frame);
}
static void