Mercurial > pidgin.yaz
changeset 16445:a5176db228b7
Update SILC to match resent request API changes
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 26 Apr 2007 13:10:57 +0000 |
parents | eb36a10796d7 |
children | 0c69d89842c6 e331baecd661 |
files | libpurple/protocols/silc/buddy.c libpurple/protocols/silc/chat.c libpurple/protocols/silc/ops.c libpurple/protocols/silc/pk.c libpurple/protocols/silc/silc.c libpurple/protocols/silc/util.c libpurple/protocols/silc/wb.c |
diffstat | 7 files changed, 43 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/silc/buddy.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/buddy.c Thu Apr 26 13:10:57 2007 +0000 @@ -289,6 +289,7 @@ { char tmp[128], tmp2[128]; SilcPurpleKeyAgrAsk a; + PurpleConnection *gc = client->application; g_snprintf(tmp, sizeof(tmp), _("Key agreement request received from %s. Would you like to " @@ -309,8 +310,8 @@ a->port = port; purple_request_action(client->application, _("Key Agreement Request"), tmp, - hostname ? tmp2 : NULL, 1, a, 2, - _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb), + hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname, + NULL, a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb), _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb)); } @@ -432,7 +433,7 @@ static void silcpurple_buddy_privkey(PurpleConnection *gc, const char *name) { - SilcPurple sg = gc->proto_data; + SilcPurple sg = gc->proto_data; char *nickname; SilcPurplePrivkey p; SilcClientEntry *clients; @@ -461,11 +462,11 @@ p->client = sg->client; p->conn = sg->conn; p->client_id = *clients[0]->id; - purple_request_input(gc, _("IM With Password"), NULL, - _("Set IM Password"), NULL, FALSE, TRUE, NULL, - _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb), - _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb), - p); + purple_request_input(gc, _("IM With Password"), NULL, + _("Set IM Password"), NULL, FALSE, TRUE, NULL, + _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb), + _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb), + gc->account, NULL, NULL, p); silc_free(clients); silc_free(nickname); @@ -1063,7 +1064,9 @@ /* Open file selector to select the public key. */ purple_request_file(r->client->application, _("Open..."), NULL, FALSE, G_CALLBACK(silcpurple_add_buddy_ask_import), - G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel), r); + G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel), + purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r); + } static void @@ -1074,7 +1077,8 @@ r->b->name); purple_request_action(r->client->application, _("Add Buddy"), tmp, _("To add the buddy you must import his/her public key. " - "Press Import to import a public key."), 0, r, 2, + "Press Import to import a public key."), 0, + purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r, 2, _("Cancel"), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb), _("_Import..."), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb)); } @@ -1180,7 +1184,8 @@ "the correct user from the list to add to the buddy list."), fields, _("OK"), G_CALLBACK(silcpurple_add_buddy_select_cb), - _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel), r); + _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel), + purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r); } static void
--- a/libpurple/protocols/silc/chat.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/chat.c Thu Apr 26 13:10:57 2007 +0000 @@ -290,7 +290,8 @@ /* Add new public key */ purple_request_file(sg->gc, _("Open Public Key..."), NULL, FALSE, G_CALLBACK(silcpurple_chat_chpk_add), - G_CALLBACK(silcpurple_chat_chpk_cancel), sgc); + G_CALLBACK(silcpurple_chat_chpk_cancel), + purple_connection_get_account(sg->gc), NULL, NULL, sgc); return; } @@ -421,7 +422,8 @@ purple_request_fields(sg->gc, _("Channel Authentication"), _("Channel Authentication"), t, fields, _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb), - _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), sgc); + _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), + purple_connection_get_account(sg->gc), NULL, NULL, sgc); return; } sgc->pubkeys = silc_buffer_copy(channel_pubkeys); @@ -459,7 +461,8 @@ purple_request_fields(sg->gc, _("Channel Authentication"), _("Channel Authentication"), t, fields, _("Add / Remove"), G_CALLBACK(silcpurple_chat_chpk_cb), - _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), sgc); + _("OK"), G_CALLBACK(silcpurple_chat_chauth_ok), + purple_connection_get_account(sg->gc), NULL, NULL, sgc); silc_argument_payload_free(chpks); } @@ -594,7 +597,8 @@ p->channel); purple_request_fields(gc, _("Add Channel Private Group"), NULL, tmp, fields, _("Add"), G_CALLBACK(silcpurple_chat_prv_add), - _("Cancel"), G_CALLBACK(silcpurple_chat_prv_cancel), p); + _("Cancel"), G_CALLBACK(silcpurple_chat_prv_cancel), + purple_connection_get_account(gc), NULL, NULL, p); } @@ -723,7 +727,8 @@ _("Set user limit on channel. Set to zero to reset user limit."), tmp, FALSE, FALSE, NULL, _("OK"), G_CALLBACK(silcpurple_chat_ulimit_cb), - _("Cancel"), G_CALLBACK(silcpurple_chat_ulimit_cb), s); + _("Cancel"), G_CALLBACK(silcpurple_chat_ulimit_cb), + purple_connection_get_account(gc), NULL, NULL, s); } static void
--- a/libpurple/protocols/silc/ops.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/ops.c Thu Apr 26 13:10:57 2007 +0000 @@ -1295,7 +1295,7 @@ _("User Information"), buf, 1, client_entry, 2, _("OK"), G_CALLBACK(silcpurple_whois_more), - _("_More..."), G_CALLBACK(silcpurple_whois_more)); + _("_More..."), G_CALLBACK(silcpurple_whois_more), gc->account, NULL, NULL); else #endif purple_notify_userinfo(gc, client_entry->nickname, user_info, NULL, NULL); @@ -1900,17 +1900,18 @@ silc_ask_passphrase(SilcClient client, SilcClientConnection conn, SilcAskPassphrase completion, void *context) { + PurpleConnection *gc = client->application; SilcPurpleAskPassphrase internal = silc_calloc(1, sizeof(*internal)); if (!internal) return; internal->completion = completion; internal->context = context; - purple_request_input(client->application, _("Passphrase"), NULL, + purple_request_input(gc, _("Passphrase"), NULL, _("Passphrase required"), NULL, FALSE, TRUE, NULL, _("OK"), G_CALLBACK(silc_ask_passphrase_cb), _("Cancel"), G_CALLBACK(silc_ask_passphrase_cb), - internal); + purple_connection_get_account(gc), NULL, NULL, internal); }
--- a/libpurple/protocols/silc/pk.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/pk.c Thu Apr 26 13:10:57 2007 +0000 @@ -96,6 +96,7 @@ const char *babbleprint, PublicKeyVerify verify) { + PurpleConnection *gc = verify->client->application; char tmp[256], tmp2[256]; if (verify->changed) { @@ -112,8 +113,9 @@ _("Fingerprint and babbleprint for the %s key are:\n\n" "%s\n%s\n"), entity, fingerprint, babbleprint); - purple_request_action(verify->client->application, _("Verify Public Key"), tmp, tmp2, - PURPLE_DEFAULT_ACTION_NONE, verify, 3, + purple_request_action(gc, _("Verify Public Key"), tmp, tmp2, + PURPLE_DEFAULT_ACTION_NONE, + purple_connection_get_account(gc), entity, NULL, verify, 3, _("Yes"), G_CALLBACK(silcpurple_verify_cb), _("No"), G_CALLBACK(silcpurple_verify_cb), _("_View..."), G_CALLBACK(silcpurple_verify_details));
--- a/libpurple/protocols/silc/silc.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/silc.c Thu Apr 26 13:10:57 2007 +0000 @@ -741,7 +741,8 @@ "you would like other users to see about yourself."), fields, _("OK"), G_CALLBACK(silcpurple_attrs_cb), - _("Cancel"), G_CALLBACK(silcpurple_attrs_cancel), gc); + _("Cancel"), G_CALLBACK(silcpurple_attrs_cancel), + gc->account, NULL, NULL, gc); } static void @@ -946,7 +947,8 @@ purple_request_fields(gc, _("Create New SILC Key Pair"), _("Create New SILC Key Pair"), NULL, fields, _("Generate Key Pair"), G_CALLBACK(silcpurple_create_keypair_cb), - _("Cancel"), G_CALLBACK(silcpurple_create_keypair_cancel), gc); + _("Cancel"), G_CALLBACK(silcpurple_create_keypair_cancel), + gc->account, NULL, NULL, gc); g_strfreev(u); silc_free(hostname);
--- a/libpurple/protocols/silc/util.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/util.c Thu Apr 26 13:10:57 2007 +0000 @@ -373,8 +373,8 @@ purple_request_action(sg->gc, _("Public Key Information"), _("Public Key Information"), - buf, 0, context, 1, - _("Close"), callback); + buf, 0, purple_connection_get_account(sg->gc), + NULL, NULL, context, 1, _("Close"), callback); g_free(buf); silc_free(fingerprint);
--- a/libpurple/protocols/silc/wb.c Thu Apr 26 12:26:33 2007 +0000 +++ b/libpurple/protocols/silc/wb.c Thu Apr 26 13:10:57 2007 +0000 @@ -263,7 +263,7 @@ SilcPurple sg; gc = client->application; - sg = gc->proto_data; + sg = gc->proto_data; /* Open whiteboard automatically if requested */ if (purple_account_get_bool(sg->account, "open-wb", FALSE)) { @@ -299,7 +299,8 @@ req->channel = channel; req->sg = sg; - purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1, req, 2, + purple_request_action(gc, _("Whiteboard"), tmp, NULL, 1, + sg->account, sender->nickname, NULL, req, 2, _("Yes"), G_CALLBACK(silcpurple_wb_request_cb), _("No"), G_CALLBACK(silcpurple_wb_request_cb)); }