aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shell-view.c
diff options
context:
space:
mode:
authorMichael Meeks <michael@ximian.com>2002-01-15 00:19:08 +0800
committerMichael Meeks <michael@src.gnome.org>2002-01-15 00:19:08 +0800
commit885d0b6bd7eb813ec273592ee627ff0f1bd4f065 (patch)
treef214a67561e4338d26419c7f337379d388ce1514 /shell/e-shell-view.c
parentdd4ca39ec6a8479e4c8a34e029e480433544f42e (diff)
downloadgsoc2013-evolution-885d0b6bd7eb813ec273592ee627ff0f1bd4f065.tar.gz
gsoc2013-evolution-885d0b6bd7eb813ec273592ee627ff0f1bd4f065.tar.zst
gsoc2013-evolution-885d0b6bd7eb813ec273592ee627ff0f1bd4f065.zip
re-order activate / de-activate to minimise flicker switching between
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. svn path=/trunk/; revision=15316
Diffstat (limited to 'shell/e-shell-view.c')
-rw-r--r--shell/e-shell-view.c19
1 files changed, 10 insertions, 9 deletions
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