soc.2010.detachablepurple: 306c434a: Added closing of a pending request by a ...

gillux at soc.pidgin.im gillux at soc.pidgin.im
Sat Jul 31 01:35:51 EDT 2010


----------------------------------------------------------------------
Revision: 306c434a1e46776fe2ad5d33b97cb8a38db27ef5
Parent:   ab50e1b4f036e18affccfeec5cde5cb4f6e4e106
Author:   gillux at soc.pidgin.im
Date:     07/31/10 00:23:25
Branch:   im.pidgin.soc.2010.detachablepurple
URL: http://d.pidgin.im/viewmtn/revision/info/306c434a1e46776fe2ad5d33b97cb8a38db27ef5

Changelog: 

Added closing of a pending request by a client. Now, when a client decide to
close a request, its choice is sent to the daemon, which already inform all
the others clients to close their request using the RequestClosed dbus signal.

Changes against parent ab50e1b4f036e18affccfeec5cde5cb4f6e4e106

  patched  libpurple/account.c

-------------- next part --------------
============================================================
--- libpurple/account.c	357fbcee971f56ccc955a3abbd91d09e9ff5a7d6
+++ libpurple/account.c	fae566dd29fff5173f3d31b178c4609797b95e01
@@ -29,6 +29,7 @@
 #include "accountlist.h"
 #include "core.h"
 #include "dbus-maybe.h"
+#include "dbus-callback.h"
 #include "debug.h"
 #include "marshallers.h"
 #include "network.h"
@@ -1071,12 +1072,22 @@ purple_account_request_close_info(Purple
 purple_account_request_close_info(PurpleAccountRequestInfo *info)
 {
 	PurpleAccountUiOps *ops;
+	guint request_id;
 
 	ops = purple_accounts_get_ui_ops();
 
 	if (ops != NULL && ops->close_account_request != NULL)
 		ops->close_account_request(info->ui_handle);
 
+	/* In remote mode, inform the daemon we closed the request */
+	if (purple_core_is_remote_mode()) {
+		request_id = purple_callback_get_req_id(info->ui_handle);
+		if (request_id)
+			purple_callback_run_request_RPC(request_id, 0);
+		else
+			purple_debug_error("dbus", "Couldn't inform the daemon about the closing of an account request from which the request id is unknown\n");
+	}
+
 	purple_account_request_info_unref(info);
 }
 


More information about the Commits mailing list