GDBusActionGroup: Allow NULL bus name for peer-to-peer connection

https://bugzilla.gnome.org/show_bug.cgi?id=720380
This commit is contained in:
Daiki Ueno 2013-12-16 11:42:13 +09:00 committed by Philip Withnall
parent e8a09b3f85
commit d37af2bd04

View File

@ -475,7 +475,8 @@ g_dbus_action_group_iface_init (GActionGroupInterface *iface)
/**
* g_dbus_action_group_get:
* @connection: A #GDBusConnection
* @bus_name: the bus name which exports the action group
* @bus_name: (nullable): the bus name which exports the action
* group or %NULL if @connection is not a message bus connection
* @object_path: the object path at which the action group is exported
*
* Obtains a #GDBusActionGroup for the action group which is exported at
@ -503,6 +504,8 @@ g_dbus_action_group_get (GDBusConnection *connection,
{
GDBusActionGroup *group;
g_return_val_if_fail (bus_name != NULL || g_dbus_connection_get_unique_name (connection) == NULL, NULL);
group = g_object_new (G_TYPE_DBUS_ACTION_GROUP, NULL);
group->connection = g_object_ref (connection);
group->bus_name = g_strdup (bus_name);