[gedit] bottom-panel: follow stack child change
- From: Sebastien Lafargue <slafargue src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] bottom-panel: follow stack child change
- Date: Fri, 27 Feb 2015 13:29:12 +0000 (UTC)
commit fd03615010162cb7bba218bb2cc9cd63225059f6
Author: Sebastien Lafargue <slafargue gnome org>
Date: Thu Feb 26 23:00:11 2015 +0100
bottom-panel: follow stack child change
When switching stack child it must be reflected in the notebook
https://bugzilla.gnome.org/show_bug.cgi?id=745253
gedit/gedit-notebook-stack-switcher.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-notebook-stack-switcher.c b/gedit/gedit-notebook-stack-switcher.c
index 8f02439..0575ed1 100644
--- a/gedit/gedit-notebook-stack-switcher.c
+++ b/gedit/gedit-notebook-stack-switcher.c
@@ -141,11 +141,22 @@ on_child_changed (GtkWidget *widget,
GParamSpec *pspec,
GeditNotebookStackSwitcher *switcher)
{
+ GtkNotebook *notebook;
GtkWidget *child;
GtkWidget *nb_child;
+ gint nb_page;
+
+ notebook = GTK_NOTEBOOK (switcher->priv->notebook);
child = gtk_stack_get_visible_child (GTK_STACK (widget));
nb_child = find_notebook_child (switcher, child);
+
+ nb_page = gtk_notebook_page_num (notebook, nb_child);
+
+ g_signal_handlers_block_by_func (widget, on_child_prop_changed, switcher);
+ gtk_notebook_set_current_page (notebook, nb_page);
+ g_signal_handlers_unblock_by_func (widget, on_child_prop_changed, switcher);
+
sync_label (switcher, child, nb_child);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]