GNOME Bugzilla – Bug 659091
gtknotebook shows wrong page when not all pages are filled
Last modified: 2018-03-26 15:20:56 UTC
I was creating a simple project with not much more than a menu and a notebook, and filled in only one page of the (default) 3 pages the notebook has. When running the program, the third page is show (which was still empty), instead of the first page (that page was selected when the project was saved). This is of course an abnormal situation... John
Just to be clear, _only_ the third page is shown (no other tabs are visible). Which is empty, of course. John
This is tricky to fix. Note that, you _must_ put widgets into the GtkNotebook pages for the notebook to make any sense to GTK+ when GtkBuilder parses the notebook, the empty pages are just discarded. Perhaps the best thing to do from Glade would be to issue a warning at save time, telling the user that the notebook doesnt make sense (if it contains empty pages). A warning like: "The file you are saving contains a notebook with empty pages, this will not produce any sensible results when loaded with GtkBuilder" Of course, we need to support the empty pages from Glade itself, since there is always a time, while editing a notebook from Glade, that an empty page will exist.
>A warning like: > "The file you are saving contains a notebook with > empty pages, this will not produce any sensible results > when loaded with GtkBuilder" Yes, that does seem like a good idea. I'm not sure everyone is knowledgeable that empty pages could cause problems (I wasn't). Thanks, John
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/92.