GNOME Bugzilla – Bug 693113
add a mode-changed signal
Last modified: 2015-03-03 13:39:10 UTC
We recently added add_mode api to have the "notebook-like" design, but the api is not very friendly: you have to get the returned radio button and connect to its toggled signal. A global "page-changed" signal would be better.
even better: a current-mode property I can bind() to the notebook page property Now that I think of it, we could have an associate_notebook() methods that takes the modes from a the (hidden) notenook labels and does the property binding for you
(In reply to comment #1) > even better: a current-mode property I can bind() to the notebook page property I really like this. I don't think it should be an int though, but just a string - it makes the code cleaner. > Now that I think of it, we could have an associate_notebook() methods that > takes the modes from a the (hidden) notenook labels and does the property > binding for you Not a huge fan, a couple of reasons: - it would make it difficult to use anything else than an int for the signal as above - it implies an implicit mapping between the buttons and the presence/order of pages in the notebook, which is something that might instead vary according to how the app implements it - we eventually want to move away from using tabless notebooks for scene switching (see e.g. the scene manager section of [1]) - in the easiest case writing a bind function from string to page number is quite trivial anyway [1] https://live.gnome.org/DeveloperExperience/Hackfest2013/Toolkit
Paolo, are you still interested in this? GtkHeaderBar has replaced GdMainToolbar these days, so we should probably move this to gtk+ or close as WONTFIX.
Let's close