show the menu_label unconditionally (even if it is not a default label).

Tue Mar 31 01:17:23 1998  Tim Janik  <timj@gtk.org>

        * gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
                unconditionally (even if it is not a default label).
                        (gtk_notebook_update_labels): if we have a tab_label, then use its label
                                as the default menu_label.
This commit is contained in:
Tim Janik 1998-03-31 00:38:59 +00:00 committed by Tim Janik
parent 4bf5d761bc
commit a20f83d9a9
8 changed files with 56 additions and 2 deletions

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -1,3 +1,10 @@
Tue Mar 31 01:17:23 1998 Tim Janik <timj@gtk.org>
* gtk/gtknotebook.c (gtk_notebook_menu_item_create): show the menu_label
unconditionally (even if it is not a default label).
(gtk_notebook_update_labels): if we have a tab_label, then use its label
as the default menu_label.
Mon Mar 30 16:35:57 1998 Owen Taylor <owt1@cornell.edu>
* gtk/testgtk.c: Improved main loop test. (Quits main

View File

@ -2884,7 +2884,12 @@ gtk_notebook_update_labels (GtkNotebook *notebook,
if (notebook->show_tabs && page->default_tab)
gtk_label_set (GTK_LABEL (page->tab_label), string);
if (notebook->menu && page->default_menu)
gtk_label_set (GTK_LABEL (page->menu_label), string);
{
if (GTK_IS_LABEL (page->tab_label))
gtk_label_set (GTK_LABEL (page->menu_label), GTK_LABEL (page->tab_label)->label);
else
gtk_label_set (GTK_LABEL (page->menu_label), string);
}
page_num++;
}
}
@ -2902,8 +2907,8 @@ gtk_notebook_menu_item_create (GtkNotebook *notebook,
page->menu_label = gtk_label_new (GTK_LABEL (page->tab_label)->label);
else
page->menu_label = gtk_label_new ("");
gtk_widget_show (page->menu_label);
}
gtk_widget_show (page->menu_label);
menu_item = gtk_menu_item_new ();
gtk_container_add (GTK_CONTAINER (menu_item), page->menu_label);
gtk_menu_insert (GTK_MENU (notebook->menu), menu_item, position);