Commit Graph

14 Commits

Author SHA1 Message Date
Ryan Lortie
7c98844760 various: add missing cases of #include "config.h" 2012-12-06 13:30:31 -05:00
Ryan Lortie
f20ae7fcfd g_dbus_connection_export_menu_model(): fix a crash
Add some extra protection when 'preparing' a group that doesn't yet
contain any menus.  This can happen if you subscribe to a group that
doesn't yet exist.

It was possible to crash any application using
g_dbus_connection_export_menu_model() by requesting a non-existent
subscription group over the bus.

In practice this only happened in races -- where the proxy sees a group
that exists and queries it, but by the time it does, it's already gone.

https://bugzilla.gnome.org/show_bug.cgi?id=687089
2012-10-29 16:18:10 +01:00
Ryan Lortie
212ffcc574 GMenuExporter: allow NULL bus on _name_vanished
GBusNameVanishedCallback is called with a NULL GDBusConnection in the
case that the connection has vanished.  We were doing an assert to
verify that it was the same as we had exported the menu on and that
assert was failing.

https://bugzilla.gnome.org/show_bug.cgi?id=685995
2012-10-16 12:31:23 -04:00
Matthias Clasen
68706bfa2b Add references to the dbus interface docs on the wiki
And strip out the (now) redundant copy of that information
from the sources.
2011-12-20 12:15:05 -05:00
Matthias Clasen
c14a3b3e9c GMenu: purge references to GMenuProxy from the docs 2011-12-13 23:06:16 -05:00
Matthias Clasen
f109415d95 Add since tags 2011-12-10 20:47:22 -05:00
Ryan Lortie
21aca44ee1 GMenuModel exporter: remove workaround
With Bug 665733 fixed, we can remove the workaround (which was causing
thread safety problems).
2011-12-08 18:05:15 -05:00
Ryan Lortie
4f2c207745 menu/action exporter docs fixup 2011-12-08 18:05:14 -05:00
Ryan Lortie
cfbc1b5a4b Menu model exporter: clean up the API
Give it the same treatment as the exporter for GActionGroup just got.

There is a wart here: the exporter attempt to re-enter GDBusConnection
when it is freed in order to cancel outstanding name watches.
GDBusConnection holds its own lock while calling the destroy notify, so
the attempt at reentrancy results in a deadlock.

We have a workaround to deal with that for now...
2011-12-08 18:05:14 -05:00
Ryan Lortie
02b001f8f6 gmenu exporter: put submenus in separate groups
Keep sections in the same subscription group as the parent (since they
will be needed immediately) but put submenus in a separate group.
2011-12-08 18:05:13 -05:00
Matthias Clasen
d6f2281329 Shorten a variable name 2011-12-08 18:05:13 -05:00
Matthias Clasen
60ab57c4b0 Describe the org.gtk.Menus interface
Even though we consider the interface to be an implementation
detail, we should have internal documentation of the interface.
2011-12-08 18:05:12 -05:00
Matthias Clasen
db34b1aebe Rename exporter APIs
There are no public 'exporter' objects, so don't allude to them
in the function names. At the same time, we want to make it clear
that these functions are D-Bus specific.

The new APIs are
g_action_group_dbus_export_start
g_action_group_dbus_export_query
g_action_group_dbus_export_stop
g_menu_model_dbus_export_start
g_menu_model_dbus_export_query
g_menu_model_dbus_export_stop
2011-12-08 18:05:12 -05:00
Matthias Clasen
66e089f086 Add GMenuModel D-Bus exporter 2011-12-08 18:05:12 -05:00