• Daniel Boles's avatar
    Notebook: Ensure menu_label updates with tab_label · 4e884b60
    Daniel Boles authored
    This was noticed in Firefox and demonstrated using a GtkBuilder ui file.
    buildable_add_child() calls set_tab_label(), but the latter did nothing
    to update the menu_label corresponding to that tab with the new text.
    Using Builder to populate the tab child, only tabs other than last got
    the right non-default labels, and even that was mostly coincidental, as
    adding the main child called update_labels() via real_insert_page(), so
    it took effect when the 2nd last main child is added, updating the rest
    but leaving the last with the default label, not that given in Builder.
    
    Fix by factoring out the code from child_reordered() to a new helper
    menu_item_recreate() and calling that in set_tab_label(), so that
    whenever the tab_label is updated, so is its corresponding menu_label.
    
    This fixes the reported case and presumably others that we could write.
    
    fixes #1397
    4e884b60
Name
Last commit
Last update
.gitlab/issue_templates Loading commit data...
.gitlab-ci Loading commit data...
build-aux Loading commit data...
demos Loading commit data...
docs Loading commit data...
examples Loading commit data...
gdk Loading commit data...
gsk Loading commit data...
gtk Loading commit data...
modules Loading commit data...
po Loading commit data...
po-properties Loading commit data...
subprojects Loading commit data...
tests Loading commit data...
testsuite Loading commit data...
.gitlab-ci.yml Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING Loading commit data...
NEWS Loading commit data...
NEWS.pre-1.0 Loading commit data...
NEWS.pre-2.0 Loading commit data...
NEWS.pre-3.0 Loading commit data...
README.commits.md Loading commit data...
README.md Loading commit data...
config.h.meson Loading commit data...
gtk+-4.0.pc.in Loading commit data...
gtk+-unix-print-4.0.pc.in Loading commit data...
gtk.doap Loading commit data...
make-pot Loading commit data...
meson.build Loading commit data...
meson_options.txt Loading commit data...