soc.2010.detachablepurple: 59aeba84: Removed the useless extra RunRequest dbu...
gillux at soc.pidgin.im
gillux at soc.pidgin.im
Sat Jul 31 01:35:54 EDT 2010
----------------------------------------------------------------------
Revision: 59aeba84859d27af961323b710a030e381e99988
Parent: 306c434a1e46776fe2ad5d33b97cb8a38db27ef5
Author: gillux at soc.pidgin.im
Date: 07/31/10 00:40:42
Branch: im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/59aeba84859d27af961323b710a030e381e99988
Changelog:
Removed the useless extra RunRequest dbus calls the clients were running upon
the receiption of a RequestClosed dbus signal.
Changes against parent 306c434a1e46776fe2ad5d33b97cb8a38db27ef5
patched libpurple/account-dbus.c
-------------- next part --------------
============================================================
--- libpurple/account-dbus.c 65c88b7a3c875a03bc6152e432e45d863c9bdca1
+++ libpurple/account-dbus.c bc7b85acf521d00ee4b2906b689aeb9887aa5881
@@ -64,6 +64,24 @@ request_remote_client_deny_cb(void *user
}
/**
+ * A wrapper for purple_account_request_close() used in request_authorize_cb().
+ * We need to run this function not in remote mode, otherwise it also runs
+ * the dbus method RunRequest(request_id, 0) to inform the daemon we closed
+ * this request. It's a non-sense since this we are calling
+ * purple_account_request_close() because we received a RequestClosed dbus
+ * signal, which means the request is already handled.
+ */
+static void
+purple_account_local_request_close(void *ui_handle)
+{
+ PurpleRunningMode mode;
+ mode = purple_core_get_running_mode();
+ purple_core_set_running_mode(PURPLE_RUN_MIRROR_MODE);
+ purple_account_request_close(ui_handle);
+ purple_core_set_running_mode(mode);
+}
+
+/**
* Callback, called when we receive a dbus "RequestAuthorize" signal.
*/
static void
@@ -95,8 +113,8 @@ request_authorize_cb(DBusGProxy *proxy,
* (with the RequestClosed dbus signal), then it will be
* automatically and properly closed */
close_req = g_cclosure_new(
- G_CALLBACK(purple_account_request_close),
- h, NULL);
+ G_CALLBACK(purple_account_local_request_close),
+ h, NULL);
g_closure_set_marshal(close_req, purple_nullmarshaller);
purple_callback_register_req_id(request_id, close_req, h);
}
More information about the Commits
mailing list