From b269eb087462cbe1c44756835cd62d63458551d3 Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Wed, 26 Jan 2000 04:29:01 +0000 Subject: [PATCH] Don't show the tab_label unless it itself is visible. Wed Jan 26 23:12:28 2000 Owen Taylor * gtk/gtknotebook.c (gtk_notebook_map): Don't show the tab_label unless it itself is visible. gtk/gtknotebook.c (gtk_notebook_size_request): Do a better job of making sure that the visibility of the tab label corresponds to whether it should be mapped or not. --- ChangeLog | 10 ++++++++++ ChangeLog.pre-2-0 | 10 ++++++++++ ChangeLog.pre-2-10 | 10 ++++++++++ ChangeLog.pre-2-2 | 10 ++++++++++ ChangeLog.pre-2-4 | 10 ++++++++++ ChangeLog.pre-2-6 | 10 ++++++++++ ChangeLog.pre-2-8 | 10 ++++++++++ gtk/gtknotebook.c | 13 +++++++++++-- 8 files changed, 81 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 669bfbd98a..d9e4674197 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +Wed Jan 26 23:12:28 2000 Owen Taylor + + * gtk/gtknotebook.c (gtk_notebook_map): Don't + show the tab_label unless it itself is visible. + + gtk/gtknotebook.c (gtk_notebook_size_request): + Do a better job of making sure that the visibility + of the tab label corresponds to whether it should + be mapped or not. + Wed Jan 26 21:17:03 2000 Owen Taylor * gtk/gtkoptionmenu.c (gtk_option_menu_position): diff --git a/gtk/gtknotebook.c b/gtk/gtknotebook.c index 2a3b0ff2ac..84b5fa6890 100644 --- a/gtk/gtknotebook.c +++ b/gtk/gtknotebook.c @@ -514,8 +514,8 @@ gtk_notebook_map (GtkWidget *widget) page = children->data; children = children->next; - if (page->tab_label && - GTK_WIDGET_VISIBLE (page->child) && + if (page->tab_label && + GTK_WIDGET_VISIBLE (page->tab_label) && !GTK_WIDGET_MAPPED (page->tab_label)) gtk_widget_map (page->tab_label); } @@ -803,6 +803,15 @@ gtk_notebook_size_request (GtkWidget *widget, } } } + else + { + for (children = notebook->children; children; + children = children->next) + { + if (GTK_WIDGET_VISIBLE (page->tab_label)) + gtk_widget_hide (page->tab_label); + } + } } widget->requisition.width += GTK_CONTAINER (widget)->border_width * 2;