comparison libpurple/protocols/silc/buddy.c @ 21099:51cf02dbdb0e

disapproval of revision 'c484d979c4fda4433a9633ff8b69bd8a395c9479'
author Richard Laager <rlaager@wiktel.com>
date Fri, 16 Nov 2007 23:30:03 +0000
parents cab348e39751
children fcb848b2d669
comparison
equal deleted inserted replaced
21095:cab348e39751 21099:51cf02dbdb0e
310 a->client_id = client_entry->id; 310 a->client_id = client_entry->id;
311 if (hostname) 311 if (hostname)
312 a->hostname = strdup(hostname); 312 a->hostname = strdup(hostname);
313 a->port = port; 313 a->port = port;
314 314
315 purple_request_action_with_hint(client->application, _("Key Agreement Request"), tmp, 315 purple_request_action(client->application, _("Key Agreement Request"), tmp,
316 hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname, 316 hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname,
317 NULL, "blist", a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb), 317 NULL, a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb),
318 _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb)); 318 _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb));
319 } 319 }
320 320
321 static void 321 static void
322 silcpurple_buddy_keyagr(PurpleBlistNode *node, gpointer data) 322 silcpurple_buddy_keyagr(PurpleBlistNode *node, gpointer data)
447 if (!p) 447 if (!p)
448 return; 448 return;
449 p->client = sg->client; 449 p->client = sg->client;
450 p->conn = sg->conn; 450 p->conn = sg->conn;
451 p->client_id = client_entry->id; 451 p->client_id = client_entry->id;
452 purple_request_input_with_hint(gc, _("IM With Password"), NULL, 452 purple_request_input(gc, _("IM With Password"), NULL,
453 _("Set IM Password"), NULL, FALSE, TRUE, NULL, 453 _("Set IM Password"), NULL, FALSE, TRUE, NULL,
454 _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb), 454 _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb),
455 _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb), 455 _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb),
456 gc->account, NULL, NULL, "blist", p); 456 gc->account, NULL, NULL, p);
457 457
458 silc_client_list_free(sg->client, sg->conn, clients); 458 silc_client_list_free(sg->client, sg->conn, clients);
459 } 459 }
460 460
461 static void 461 static void
1054 silc_free(r); 1054 silc_free(r);
1055 return; 1055 return;
1056 } 1056 }
1057 1057
1058 /* Open file selector to select the public key. */ 1058 /* Open file selector to select the public key. */
1059 purple_request_file_with_hint(r->client->application, _("Open..."), NULL, FALSE, 1059 purple_request_file(r->client->application, _("Open..."), NULL, FALSE,
1060 G_CALLBACK(silcpurple_add_buddy_ask_import), 1060 G_CALLBACK(silcpurple_add_buddy_ask_import),
1061 G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel), 1061 G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel),
1062 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, "blist", r); 1062 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r);
1063 1063
1064 } 1064 }
1065 1065
1066 static void 1066 static void
1067 silcpurple_add_buddy_ask_pk(SilcPurpleBuddyRes r) 1067 silcpurple_add_buddy_ask_pk(SilcPurpleBuddyRes r)
1068 { 1068 {
1069 char tmp[512]; 1069 char tmp[512];
1070 g_snprintf(tmp, sizeof(tmp), _("The %s buddy is not present in the network"), 1070 g_snprintf(tmp, sizeof(tmp), _("The %s buddy is not present in the network"),
1071 r->b->name); 1071 r->b->name);
1072 purple_request_action_with_hint(r->client->application, _("Add Buddy"), tmp, 1072 purple_request_action(r->client->application, _("Add Buddy"), tmp,
1073 _("To add the buddy you must import his/her public key. " 1073 _("To add the buddy you must import his/her public key. "
1074 "Press Import to import a public key."), 0, 1074 "Press Import to import a public key."), 0,
1075 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, "blist", r, 2, 1075 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r, 2,
1076 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb), 1076 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb),
1077 _("_Import..."), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb)); 1077 _("_Import..."), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb));
1078 } 1078 }
1079 1079
1080 static SilcBool 1080 static SilcBool
1177 fingerprint ? tmp2 : ""); 1177 fingerprint ? tmp2 : "");
1178 purple_request_field_list_add(f, tmp, client_entry); 1178 purple_request_field_list_add(f, tmp, client_entry);
1179 silc_free(fingerprint); 1179 silc_free(fingerprint);
1180 } 1180 }
1181 1181
1182 purple_request_fields_with_hint(r->client->application, _("Add Buddy"), 1182 purple_request_fields(r->client->application, _("Add Buddy"),
1183 _("Select correct user"), 1183 _("Select correct user"),
1184 r->pubkey_search 1184 r->pubkey_search
1185 ? _("More than one user was found with the same public key. Select " 1185 ? _("More than one user was found with the same public key. Select "
1186 "the correct user from the list to add to the buddy list.") 1186 "the correct user from the list to add to the buddy list.")
1187 : _("More than one user was found with the same name. Select " 1187 : _("More than one user was found with the same name. Select "
1188 "the correct user from the list to add to the buddy list."), 1188 "the correct user from the list to add to the buddy list."),
1189 fields, 1189 fields,
1190 _("OK"), G_CALLBACK(silcpurple_add_buddy_select_cb), 1190 _("OK"), G_CALLBACK(silcpurple_add_buddy_select_cb),
1191 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel), 1191 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel),
1192 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, "blist", r); 1192 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r);
1193 } 1193 }
1194 1194
1195 static void 1195 static void
1196 silcpurple_add_buddy_resolved(SilcClient client, 1196 silcpurple_add_buddy_resolved(SilcClient client,
1197 SilcClientConnection conn, 1197 SilcClientConnection conn,