After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 618910 - port to gdbus
port to gdbus
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks: 622871
 
 
Reported: 2010-05-17 18:21 UTC by Christian Persch
Modified: 2010-06-27 10:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Port to GDBus (27.84 KB, patch)
2010-05-17 18:23 UTC, Christian Persch
committed Details | Review

Description Christian Persch 2010-05-17 18:21:54 UTC
ssia. Untested patch attached.
Comment 1 Christian Persch 2010-05-17 18:23:27 UTC
Created attachment 161246 [details] [review]
Port to GDBus

Bug #618910.
Comment 2 Cosimo Cecchi 2010-05-30 17:48:52 UTC
Christian, thanks for the patch.
I pushed it to master, with some fixes and cleanups on top of it.

Closing as FIXED.
Comment 3 Christian Persch 2010-05-30 18:27:28 UTC
+ 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.
Comment 4 Cosimo Cecchi 2010-05-30 19:17:23 UTC
Nice catch, I missed that G_VARIANT_TYPE() macro.
I pushed a patch to master that does what you suggested, thanks.