GNOME Bugzilla – Bug 618910
port to gdbus
Last modified: 2010-06-27 10:21:59 UTC
ssia. Untested patch attached.
Created attachment 161246 [details] [review] Port to GDBus Bug #618910.
Christian, thanks for the patch. I pushed it to master, with some fixes and cleanups on top of it. Closing as FIXED.
+ result = g_dbus_connection_call_sync (connection, + GSM_NAME, + GSM_PATH, + GSM_INTERFACE, + "Inhibit", + g_variant_new ("(susu)", + "Nautilus", + (guint) 0, + message, + (guint) (INHIBIT_LOGOUT | INHIBIT_SUSPEND)), + G_VARIANT_TYPE_TUPLE, + G_DBUS_CALL_FLAGS_NO_AUTO_START, + -1, + NULL, + &error); Should use G_VARIANT_TYPE ("(u)") here instead of just TUPLE, since the code below relies on this type. + g_dbus_connection_call (connection, + CK_NAME, + CK_PATH "/Manager", + CK_INTERFACE ".Manager", + "GetCurrentSession", + g_variant_new ("()"), + G_VARIANT_TYPE_TUPLE, + G_DBUS_CALL_FLAGS_NONE, + -1, + NULL, + (GAsyncReadyCallback) ck_get_current_session_cb, + application); Same here: G_VARIANT_TYPE ("(o)") instead of just TUPLE.
Nice catch, I missed that G_VARIANT_TYPE() macro. I pushed a patch to master that does what you suggested, thanks.