Matthias Clasen
792c719478
Some coding style fixes
2011-12-19 12:51:08 -05:00
Matthias Clasen
d9c3714fcb
GtkApplication: doc improvement
2011-12-19 12:51:08 -05:00
Matthias Clasen
a6794133aa
Some initial docs
2011-12-19 12:51:08 -05:00
Matthias Clasen
32508ee825
Drop an unused variable
2011-12-19 12:51:08 -05:00
Matthias Clasen
8ae7921708
Don't call g_object_unref on a variant
...
Tsk, tsk...
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
Colin Walters
a003eef9d4
gdk: Fix prototype for gdk_x11_window_set_utf8_property
2011-12-19 12:51:08 -05:00
Ryan Lortie
618bca1333
bloatpad: use GtkApplicationMenuButton
2011-12-19 12:51:08 -05:00
Ryan Lortie
ddfbe19b23
add GtkApplicationMenuButton
2011-12-19 12:51:08 -05:00
Ryan Lortie
3076ba9c62
bloatpad: add 'win.fullscreen' action
2011-12-19 12:51:08 -05:00
Ryan Lortie
906475860f
bloatpad: make "about" a window action
...
By making "about" a per-window action, we can pop the about dialog up on
top of the correct window instead of trying to guess from the
application list of windows.
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
af0c1e66ab
gtk.symbols fixes
2011-12-19 12:51:08 -05:00
Ryan Lortie
7e34342899
GtkApplicationWindow: implement GActionMap
2011-12-19 12:51:08 -05:00
Ryan Lortie
ebd7450f02
port bloatpad to the new APIs
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
Ryan Lortie
e7ad2f97c8
add GActionMuxer and observer interfaces
...
These were destined for GLib, but they don't really make sense as a
public API. Instead, we'll copy/paste them around between the various
codebases that need to render menus.
2011-12-19 12:51:08 -05:00
Ryan Lortie
f826dd5481
GtkSettings: add shell-shows-app-menu property
...
This is a boolean property that will be set to TRUE if the current
desktop environment is capable of displaying the application menu as
part of the desktop shell.
If it is FALSE then the application will need to display the menu for
itself.
2011-12-19 12:51:08 -05:00
Matthias Clasen
7ee18bd74a
Make it build against the current wip/menus-rebase3 branch
2011-12-19 12:51:07 -05:00
Colin Walters
0455a9596f
testgmenu: #ifdef out non-compiling code for now
2011-12-19 12:51:07 -05:00
Matthias Clasen
6b7be4a3a2
Add a very bad fallback check
...
...maybe committing this inspires some better solution.
2011-12-19 12:51:07 -05:00
Colin Walters
9c52a73c21
window: Set a _DBUS_APPLICATION_ID X11 window property
...
This will allow gnome-shell to reference it.
2011-12-19 12:51:07 -05:00
Colin Walters
ff38dda9a8
x11: Add gdk_x11_window_set_utf8_property
...
A convenience function to manipulate UTF-8 X11 properties; no point
in wrapping each one in individual setters.
2011-12-19 12:51:07 -05:00
Matthias Clasen
5705a330c2
GtkApplication: Insert separators after sections
...
The previous code was only inserting a separator when a new
section was starting right away, which may not always be the
case.
2011-12-19 12:45:51 -05:00
Matthias Clasen
9131849eec
testgmenu: Insert separators after sections
...
The previous code was only inserting a separator when a new
section was starting right away.
2011-12-19 12:45:51 -05:00
Matthias Clasen
5aee67793f
GtkApplication: Initial attempt at section headings
...
This should be redone to show the label together with the
separator line, somehow. For now, just put the label below
the separator, as a separate item.
2011-12-19 12:45:51 -05:00
Matthias Clasen
7de8660187
testgmenu: Initial attempt at section headings
...
This should be redone to show the label together with the
separator line, somehow. For now, just put the label below
the separator, as a separate item.
2011-12-19 12:45:51 -05:00
Matthias Clasen
92af3d04b8
GtkApplication: use activate for actions here, too
2011-12-19 12:45:51 -05:00
Matthias Clasen
bf03adcdeb
testgmenu: Use activate with parameter for radio actions
...
This is how stateful actions are supposed to be activated, using
change_state for this was not right at all.
2011-12-19 12:45:51 -05:00
Matthias Clasen
15afbf846d
testgmenu: Use activate for toggle actions
...
This is how stateful actions are supposed to be activated, using
change_state for this was not right at all.
2011-12-19 12:45:51 -05:00
Colin Walters
e0c235255b
testgmenu: Quit on delete-event
2011-12-19 12:45:51 -05:00
Matthias Clasen
95d9a5e368
Adapt to api changes in GMenuModel
2011-12-19 12:45:51 -05:00
Matthias Clasen
5d0020cbd3
Adapt to object path conventions
...
Seems common to expect 'path == bus name with slashes'.
2011-12-19 12:45:51 -05:00
Matthias Clasen
8ee68a7bf1
bloatpad: Add an example app menu
...
The bloatpad example shows simple GtkApplication usage,
so it makes sense to test app menu api here as well.
2011-12-19 12:45:51 -05:00
Matthias Clasen
cc24dbe9c7
GtkApplication: add a way to get the appmenu
...
This function either returns a GtkMenu or NULL.
Still to do: detect if the app menu is externally handled.
2011-12-19 12:45:51 -05:00
Matthias Clasen
601b3fca60
Drop an unused variable
2011-12-19 12:45:51 -05:00
Matthias Clasen
3b2f77e2c6
Remove an unneeded include
2011-12-19 12:45:51 -05:00
Matthias Clasen
1996a5edff
testgmenu: Demonstrate how translatable labels work
2011-12-19 12:45:51 -05:00
Matthias Clasen
f13083bf0d
Pass domain to the menu parser
...
This is necessary to make translations in markup work.
2011-12-19 12:45:51 -05:00
Matthias Clasen
b36198dbc2
More dynamic changes
2011-12-19 12:45:51 -05:00
Matthias Clasen
1aec8e22b6
Cleanups
...
Separate the menu generation code and all callbacks in a
MenuHolder struct.
2011-12-19 12:45:50 -05:00
Matthias Clasen
1ddaf01aed
Quick-and-dirty GtkBuilder integration
...
This makes GtkBuilder accept a GMenuMarkup tree at the toplevel
(ie with <menu id='foo'> being a child of <interface>) and the resulting
GMenu object can be obtained via gtk_builder_get_object (builder, "foo").
2011-12-19 12:45:50 -05:00
Matthias Clasen
fd9df1864b
Brute-force dynamic change propagation
...
We need to make sure that we connect to ::items-changed on every
single model, as they appear and disappear. Ugly business.
2011-12-19 12:45:50 -05:00
Matthias Clasen
519c75a606
First attempt at handling dynamic changes
...
We need to connect to items-changed on _every_ menu
model, which is somewhat icky. For some reason, this
works fine with a local model, but not with D-Bus in
between. Debugging needed.
2011-12-19 12:45:50 -05:00
Matthias Clasen
c62ed7e3a3
Add code for dynamic changes
...
Add and remove items and actions - we don't update
the menus properly yet.
2011-12-19 12:45:50 -05:00
Matthias Clasen
bfa53a9df5
Add some todos
2011-12-19 12:45:50 -05:00
Matthias Clasen
8841c04e22
Some GMenu test code
...
This is some test code for constructing GtkMenus from GMenus.
2011-12-19 12:45:50 -05:00
Daniel Mustieles
0192955bd8
Updated Spanish translation
2011-12-19 17:14:35 +01:00
Benjamin Otte
902c5c6979
a11y: emit entry signals immediately
...
We want to emit signals when stuff happens, not sometime later. That way
we can also catch the correct text that was deleted.
https://bugzilla.gnome.org/show_bug.cgi?id=659445
2011-12-19 16:17:14 +01:00