GtkApplicationWindow and its menubar
- From: Pierre Wieser <pwieser trychlos org>
- To: gtk-app-devel-list <gtk-app-devel-list gnome org>
- Subject: GtkApplicationWindow and its menubar
- Date: Sun, 11 May 2014 18:29:27 +0200 (CEST)
Hi all,
I am starting with a small app which will handle documents.
I want this app has two different menubars :
- a first one when there is no document
- another one when the document is opened.
I have tried to use gtk_application_set_menubar with two
different GMenuModel, but no luck: the GtkApplicationWindow
menubar never changes.
After having searched in the sources, I found that the GtkWidget
menubar is automatically rebuilt from a GMenu menubar_section.
But the menubar_section itself is initially built in real_realize,
thenonly rebuilt when some gtk-shell settings changes
(notify::gtk-shell-shows-menubar exactly, but this not relevant here).
So it appears to me that it is just impossible to replace the menubar.
Am I right ? Is it the expected behavior ?
As a side effect, I do not understand the rationale behind
gtk_application_set_menubar: why are we allowed to change the GMenuModel
if the visible GtkWidget is not updated ?
Thanks for some explanations..
Regards
Pierre
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]