Commit Graph

120 Commits

Author SHA1 Message Date
Ryan Lortie
f0c2ff39fc GtkApplcationWindow: plug two obvious leaks 2011-12-19 12:51:10 -05:00
Colin Walters
c7e7237559 GtkApplicationWindow: Consistently unparent menubar
We create it floating, and don't hold an extra ref, so we should
just unparent it.
2011-12-19 12:51:10 -05:00
Ryan Lortie
c299963428 GtkApplicationWindow: clean up menubar logic 2011-12-19 12:51:10 -05:00
Ryan Lortie
612e24dfc6 introduce GtkModelMenuItem
This GtkMenuItem subclass (and GActionObserver implementation) contains
all the knowledge necessary for converting a GMenuModel item description
into a GtkMenuItem.

Remove much of the code that used to do this from
gtkapplicationwindow.c.
2011-12-19 12:51:09 -05:00
Matthias Clasen
45e9d09eab Only add separators when a section actually ends 2011-12-19 12:51:09 -05:00
Colin Walters
2c6b7eff17 GtkApplicationWindow: Further sanitize handling of merging app menu and menubar
The _set_show_app_menu should really be _set_show_menubar().

Also, correctly display just the window menu in the window when run
under GNOME 3.
2011-12-19 12:51:09 -05:00
Colin Walters
65a2962733 GtkApplication: Merge app menu and menubar
Change bloatpad to have both an app menu and a menubar.
2011-12-19 12:51:09 -05:00
Matthias Clasen
aae52d4580 GtkApplicationWindow: Make mnemonics work for stateful actions 2011-12-19 12:51:09 -05:00
Colin Walters
3a088d9ac2 GtkApplicationWindow: Don't unref a NULL object 2011-12-19 12:51:09 -05:00
Ryan Lortie
b42308f8e3 Adapt to changes in GLib API
g_application_get_menu() -> get_app_menu().
2011-12-19 12:51:09 -05:00
Matthias Clasen
0683f086bb Whitespace fixes 2011-12-19 12:51:09 -05:00
Matthias Clasen
f10f3bc7e4 GtkApplicationWindow: more docs 2011-12-19 12:51:09 -05:00
Matthias Clasen
65f5a65336 GtkApplicationWindow: mark a string for translation 2011-12-19 12:51:08 -05:00
Matthias Clasen
792c719478 Some coding style fixes 2011-12-19 12:51:08 -05:00
Matthias Clasen
a6794133aa Some initial docs 2011-12-19 12:51:08 -05:00
Colin Walters
1eee7fb103 GtkApplicationWindow: Use dispose for GObjects
This ensures we break cyclic references.
2011-12-19 12:51:08 -05:00
Colin Walters
9e9e1a9fbf gtkapplicationwindow: Pick up gtk-shell-shows-app-menu XSetting
Calling gtk_application_window_set_show_app_menu() is now an override
for that setting.  If you don't call it, we pick up the default.
2011-12-19 12:51:08 -05:00
Ryan Lortie
1a97f4b9ef GtkApplicationWindow: wire up action activations
Wire the 'activate_action' and 'change_action_state' vfuncs through to
the GSimpleActionGroup.
2011-12-19 12:51:08 -05:00
Ryan Lortie
7e34342899 GtkApplicationWindow: implement GActionMap 2011-12-19 12:51:08 -05:00
Ryan Lortie
a93b9dd1cb add GtkApplicationWindow
This is a GtkWindow subclass that "application windows" will use.  Each
is associated with a GtkApplication, has the ability to show menus and
will have its own associated set of actions.
2011-12-19 12:51:08 -05:00