Patch from Soeren Sandmann to update the states of the tab label child
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com> * gtk/gtknotebook.c: Patch from Soeren Sandmann to update the states of the tab label child widgets to match the state of the tabs. (#93389, Reported by Tommi Komulainen)
This commit is contained in:
@ -1,3 +1,10 @@
|
||||
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c: Patch from Soeren Sandmann
|
||||
to update the states of the tab label child
|
||||
widgets to match the state of the tabs.
|
||||
(#93389, Reported by Tommi Komulainen)
|
||||
|
||||
Thu Jan 30 16:30:54 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
|
||||
|
@ -1,3 +1,10 @@
|
||||
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c: Patch from Soeren Sandmann
|
||||
to update the states of the tab label child
|
||||
widgets to match the state of the tabs.
|
||||
(#93389, Reported by Tommi Komulainen)
|
||||
|
||||
Thu Jan 30 16:30:54 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
|
||||
|
@ -1,3 +1,10 @@
|
||||
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c: Patch from Soeren Sandmann
|
||||
to update the states of the tab label child
|
||||
widgets to match the state of the tabs.
|
||||
(#93389, Reported by Tommi Komulainen)
|
||||
|
||||
Thu Jan 30 16:30:54 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
|
||||
|
@ -1,3 +1,10 @@
|
||||
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c: Patch from Soeren Sandmann
|
||||
to update the states of the tab label child
|
||||
widgets to match the state of the tabs.
|
||||
(#93389, Reported by Tommi Komulainen)
|
||||
|
||||
Thu Jan 30 16:30:54 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
|
||||
|
@ -1,3 +1,10 @@
|
||||
Thu Jan 30 16:54:29 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* gtk/gtknotebook.c: Patch from Soeren Sandmann
|
||||
to update the states of the tab label child
|
||||
widgets to match the state of the tabs.
|
||||
(#93389, Reported by Tommi Komulainen)
|
||||
|
||||
Thu Jan 30 16:30:54 2003 Owen Taylor <otaylor@redhat.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): Remove gtk+.spec.in from
|
||||
|
@ -2361,6 +2361,7 @@ gtk_notebook_remove_tab_label (GtkNotebook *notebook,
|
||||
page->mnemonic_activate_signal = 0;
|
||||
|
||||
gtk_widget_unparent (page->tab_label);
|
||||
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3511,6 +3512,25 @@ gtk_notebook_calc_tabs (GtkNotebook *notebook,
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_notebook_update_tab_states (GtkNotebook *notebook)
|
||||
{
|
||||
GList *list;
|
||||
|
||||
for (list = notebook->children; list != NULL; list = list->next)
|
||||
{
|
||||
GtkNotebookPage *page = list->data;
|
||||
|
||||
if (page->tab_label)
|
||||
{
|
||||
if (page == notebook->cur_page)
|
||||
gtk_widget_set_state (page->tab_label, GTK_STATE_NORMAL);
|
||||
else
|
||||
gtk_widget_set_state (page->tab_label, GTK_STATE_ACTIVE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Private GtkNotebook Page Switch Methods:
|
||||
*
|
||||
* gtk_notebook_real_switch_page
|
||||
@ -3552,6 +3572,7 @@ gtk_notebook_real_switch_page (GtkNotebook *notebook,
|
||||
gtk_widget_grab_focus (GTK_WIDGET (notebook));
|
||||
}
|
||||
|
||||
gtk_notebook_update_tab_states (notebook);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
g_object_notify (G_OBJECT (notebook), "page");
|
||||
}
|
||||
@ -4092,6 +4113,8 @@ gtk_notebook_insert_page_menu (GtkNotebook *notebook,
|
||||
gtk_notebook_switch_focus_tab (notebook, NULL);
|
||||
}
|
||||
|
||||
gtk_notebook_update_tab_states (notebook);
|
||||
|
||||
if (tab_label)
|
||||
page->mnemonic_activate_signal =
|
||||
g_signal_connect (tab_label,
|
||||
@ -4780,6 +4803,8 @@ gtk_notebook_set_tab_label (GtkNotebook *notebook,
|
||||
gtk_widget_show (page->tab_label);
|
||||
gtk_widget_queue_resize (GTK_WIDGET (notebook));
|
||||
}
|
||||
|
||||
gtk_notebook_update_tab_states (notebook);
|
||||
gtk_widget_child_notify (child, "tab_label");
|
||||
}
|
||||
|
||||
@ -4986,6 +5011,7 @@ gtk_notebook_child_reordered (GtkNotebook *notebook,
|
||||
gtk_notebook_menu_item_create (notebook, g_list_find (notebook->children, page));
|
||||
}
|
||||
|
||||
gtk_notebook_update_tab_states (notebook);
|
||||
gtk_notebook_update_labels (notebook);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user