Matthias Clasen
316e0ea542
Fix a typo
2011-12-19 12:51:12 -05:00
Matthias Clasen
5562d0a57a
Forgotten file
2011-12-19 12:51:12 -05:00
Matthias Clasen
080007d7cb
Show off some menus
2011-12-19 12:51:12 -05:00
Matthias Clasen
06a75b7e1f
Some more menu-related docs
2011-12-19 12:51:12 -05:00
Matthias Clasen
aeb550ffd7
Plugman: Find the plugins menu in a better way
...
Now that GtkBuilder finds named submenus, there's no need for
the clumsy menumodel navigation anymore.
2011-12-19 12:51:12 -05:00
Matthias Clasen
a991bb9927
GtkBuilder: pick up named submenus
...
When parsing GMenu xml, use the facility for pick up named submenus.
Note that <section id='foo'>...</section> is _not_ a named submenu.
It is a named item with an unnamed submenu :-(
2011-12-19 12:51:12 -05:00
William Hua
c1f9ccce5b
Handle menu changes.
2011-12-19 12:51:12 -05:00
William Hua
4846f3619a
Add accelerators to bloatpad.
2011-12-19 12:51:12 -05:00
William Hua
1a02fc036d
Refactor GMenuModel rendering for Mac OS.
2011-12-19 12:51:12 -05:00
William Hua
ec72f8fd81
gtkquartz-menu: fix some leaks
2011-12-19 12:51:12 -05:00
William Hua
460ac291b2
begin adding menu accelerators
...
Show accelerators in menus.
2011-12-19 12:51:12 -05:00
Matthias Clasen
3103ae2685
Two small fixes
...
Don't leak a session bus reference, and don't assume a display
is X11 just because we've built the X11 backend.
2011-12-19 12:51:12 -05:00
Matthias Clasen
d91c9f9859
Fix up includes
2011-12-19 12:51:12 -05:00
Ryan Lortie
9e3c4c6b03
bloatpad: add 'New Window' menu item
2011-12-19 12:51:11 -05:00
William Hua
8bc7513a7b
begin GtkApplication menu support for Mac OS
2011-12-19 12:51:11 -05:00
Matthias Clasen
8a21201e2c
Another plugin, for good measure
2011-12-19 12:51:11 -05:00
Matthias Clasen
c30e2b88c3
Something for the eye
2011-12-19 12:51:11 -05:00
Matthias Clasen
744f87fc12
Add an action too
2011-12-19 12:51:11 -05:00
Matthias Clasen
cc14811ec0
wip example for plugin/gmenu interaction
2011-12-19 12:51:11 -05:00
Matthias Clasen
4877799145
Update testgmenu to latest api changes
2011-12-19 12:51:11 -05:00
Ryan Lortie
21f4562d10
GtkApplicationWindow: share one GActionMuxer
...
Use the same GActionMuxer for menubars and accels instead of recreating
a new one each time.
2011-12-19 12:51:11 -05:00
Matthias Clasen
f485dd3f08
Documentation additions
2011-12-19 12:51:11 -05:00
Matthias Clasen
0baa663182
GtkApplicationWindow: Always install accelerators
...
We want accelerators to work, even if the menus are not shown
locally, so we can't rely on the GtkMenu code to set them up
for us. Currently, this code only installs accelerators when the
window is realized.
2011-12-19 12:51:11 -05:00
Matthias Clasen
073a924481
Bloatpad: Add an accelerator in the menu
2011-12-19 12:51:11 -05:00
Matthias Clasen
f7244431a9
GtkApplication: Extract accelerators from menus
...
This allows to specify accelerators in a convenient way, by
adding accel="..." attributes to the menu items in the
XML for the menu.
Currently, the accelerators are extracted only once, when the
menu property is changed on the application.
2011-12-19 12:51:11 -05:00
Matthias Clasen
2398d7e900
Introduce gtkaccelmapprivate.h
...
Move internal accel map API there and update all users.
Also, add an internal function to create an accel path for
an action and parameter, and use it in gtkapplication.c and
gtkmodelmenuitem.c instead of duplicating that code.
2011-12-19 12:51:11 -05:00
Matthias Clasen
f05cfd55f0
Bloatpad: Add an accelerator
2011-12-19 12:51:11 -05:00
Matthias Clasen
153cc818db
GtkApplication: Add API to install accelerators for actions
2011-12-19 12:51:11 -05:00
Matthias Clasen
1c6d0c3e27
GtkApplicationWindow: Set the accel group on constructed windows
...
This will make the menuitems pick up matching accel map entries
automatically. Currently, nothing creates such accel map entries,
though.
2011-12-19 12:51:11 -05:00
Matthias Clasen
9d62d24d65
GtkApplicationWindow: Add a GtkAccelGroup
...
This will be used in the following patches.
2011-12-19 12:51:11 -05:00
Matthias Clasen
d5d896f812
Fix a gtk-doc warning
2011-12-19 12:51:11 -05:00
Ryan Lortie
90fcf994d5
GtkApplication: export windows on the bus
...
And advertise their location on the bus using X11 properties.
2011-12-19 12:51:11 -05:00
Ryan Lortie
03db3e1ca1
(trivially) implement 'shutdown' in GtkApplication
2011-12-19 12:51:11 -05:00
Matthias Clasen
aa1faa7c70
Add an example
2011-12-19 12:51:10 -05:00
Matthias Clasen
898bc98d3b
Update GtkApplicationWindow docs
2011-12-19 12:51:10 -05:00
Matthias Clasen
3205a40b84
Whitespace fix
2011-12-19 12:51:10 -05:00
Matthias Clasen
f119c834c1
Make accelmap initialization more forgiving
2011-12-19 12:51:10 -05:00
Matthias Clasen
7ef340fb87
Clean up includes
2011-12-19 12:51:10 -05:00
Ryan Lortie
43bf430f21
bloatpad: add proper sections to the menus
2011-12-19 12:51:10 -05:00
Ryan Lortie
cd7ce867a7
Split off GMenuModel -> GtkMenuBar code
...
Put this in a separate file and substantially refactor it.
Move handling of submenu creation into gtkmodelmenuitem where it
belongs.
Improve our handling of when to show separators or not.
2011-12-19 12:51:10 -05:00
Ryan Lortie
afb0c098cb
Watch "shell shows menu" settings for changes
...
Correctly monitor the GtkSettings for changes to the
"gtk-shell-shows-app-menu" and "gtk-shell-shows-menubar" properties.
2011-12-19 12:51:10 -05:00
Ryan Lortie
88f16b13f3
GtkSettings: quartz: shell always shows menus
2011-12-19 12:51:10 -05:00
Matthias Clasen
f7ce4d7740
Whitespace fixes
2011-12-19 12:51:10 -05:00
Matthias Clasen
b7de477611
Never add separators to menubars
2011-12-19 12:51:10 -05:00
Ryan Lortie
2f78238872
gmenu testcase: update to glib API changes
2011-12-19 12:51:10 -05:00
Ryan Lortie
2ce6a27fa3
bloatpad: move action/menu setup to ::startup
...
No need to waste time doing this in init() if we are not going to become
the primary instance.
2011-12-19 12:51:10 -05:00
Ryan Lortie
59092e1c00
bloatpad: port to GActionMap for application
...
g_application_set_action_group() is now deprecated.
2011-12-19 12:51:10 -05:00
Ryan Lortie
2e64177e3f
GtkModelMenuItem: don't leak a GVariant
2011-12-19 12:51:10 -05:00
Ryan Lortie
9cc98f9d9b
bloatpad: use GtkBuilder for constructing menus
...
This is closer to what a real application would want to do.
2011-12-19 12:51:10 -05:00
Ryan Lortie
f83530ae3a
GtkModelMenuItem: omit indicator if not required
...
GtkModelMenuItem, being based on GtkCheckMenuItem, was always reserving
space for a check/radio indicator. This ends up looking pretty strange
in a GtkMenuBar.
Don't reserve space for the indicator unless it's appropriate.
2011-12-19 12:51:10 -05:00