comparison libpurple/protocols/silc10/buddy.c @ 21560:665e04562de0

This merge has the effect of reverting the hinting code from trunk.
author Richard Laager <rlaager@wiktel.com>
date Sat, 17 Nov 2007 00:12:30 +0000
parents eb624956319a fcb848b2d669
children d74ff4f23171
comparison
equal deleted inserted replaced
21544:9b4d1af17ced 21560:665e04562de0
307 a->client_id = *client_entry->id; 307 a->client_id = *client_entry->id;
308 if (hostname) 308 if (hostname)
309 a->hostname = strdup(hostname); 309 a->hostname = strdup(hostname);
310 a->port = port; 310 a->port = port;
311 311
312 purple_request_action_with_hint(client->application, _("Key Agreement Request"), tmp, 312 purple_request_action(client->application, _("Key Agreement Request"), tmp,
313 hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname, 313 hostname ? tmp2 : NULL, 1, gc->account, client_entry->nickname,
314 NULL, PURPLE_REQUEST_UI_HINT_BLIST, a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb), 314 NULL, a, 2, _("Yes"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb),
315 _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb)); 315 _("No"), G_CALLBACK(silcpurple_buddy_keyagr_request_cb));
316 } 316 }
317 317
318 static void 318 static void
319 silcpurple_buddy_keyagr(PurpleBlistNode *node, gpointer data) 319 silcpurple_buddy_keyagr(PurpleBlistNode *node, gpointer data)
460 if (!p) 460 if (!p)
461 return; 461 return;
462 p->client = sg->client; 462 p->client = sg->client;
463 p->conn = sg->conn; 463 p->conn = sg->conn;
464 p->client_id = *clients[0]->id; 464 p->client_id = *clients[0]->id;
465 purple_request_input_with_hint(gc, _("IM With Password"), NULL, 465 purple_request_input(gc, _("IM With Password"), NULL,
466 _("Set IM Password"), NULL, FALSE, TRUE, NULL, 466 _("Set IM Password"), NULL, FALSE, TRUE, NULL,
467 _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb), 467 _("OK"), G_CALLBACK(silcpurple_buddy_privkey_cb),
468 _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb), 468 _("Cancel"), G_CALLBACK(silcpurple_buddy_privkey_cb),
469 gc->account, NULL, NULL, PURPLE_REQUEST_UI_HINT_BLIST, p); 469 gc->account, NULL, NULL, p);
470 470
471 silc_free(clients); 471 silc_free(clients);
472 silc_free(nickname); 472 silc_free(nickname);
473 } 473 }
474 474
1065 silc_free(r); 1065 silc_free(r);
1066 return; 1066 return;
1067 } 1067 }
1068 1068
1069 /* Open file selector to select the public key. */ 1069 /* Open file selector to select the public key. */
1070 purple_request_file_with_hint(r->client->application, _("Open..."), NULL, FALSE, 1070 purple_request_file(r->client->application, _("Open..."), NULL, FALSE,
1071 G_CALLBACK(silcpurple_add_buddy_ask_import), 1071 G_CALLBACK(silcpurple_add_buddy_ask_import),
1072 G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel), 1072 G_CALLBACK(silcpurple_add_buddy_ask_pk_cancel),
1073 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, PURPLE_REQUEST_UI_HINT_BLIST, r); 1073 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r);
1074 1074
1075 } 1075 }
1076 1076
1077 static void 1077 static void
1078 silcpurple_add_buddy_ask_pk(SilcPurpleBuddyRes r) 1078 silcpurple_add_buddy_ask_pk(SilcPurpleBuddyRes r)
1079 { 1079 {
1080 char tmp[512]; 1080 char tmp[512];
1081 g_snprintf(tmp, sizeof(tmp), _("The %s buddy is not present in the network"), 1081 g_snprintf(tmp, sizeof(tmp), _("The %s buddy is not present in the network"),
1082 r->b->name); 1082 r->b->name);
1083 purple_request_action_with_hint(r->client->application, _("Add Buddy"), tmp, 1083 purple_request_action(r->client->application, _("Add Buddy"), tmp,
1084 _("To add the buddy you must import his/her public key. " 1084 _("To add the buddy you must import his/her public key. "
1085 "Press Import to import a public key."), 0, 1085 "Press Import to import a public key."), 0,
1086 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, PURPLE_REQUEST_UI_HINT_BLIST, r, 2, 1086 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r, 2,
1087 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb), 1087 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb),
1088 _("_Import..."), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb)); 1088 _("_Import..."), G_CALLBACK(silcpurple_add_buddy_ask_pk_cb));
1089 } 1089 }
1090 1090
1091 static void 1091 static void
1178 fingerprint ? tmp2 : ""); 1178 fingerprint ? tmp2 : "");
1179 purple_request_field_list_add(f, tmp, clients[i]); 1179 purple_request_field_list_add(f, tmp, clients[i]);
1180 silc_free(fingerprint); 1180 silc_free(fingerprint);
1181 } 1181 }
1182 1182
1183 purple_request_fields_with_hint(r->client->application, _("Add Buddy"), 1183 purple_request_fields(r->client->application, _("Add Buddy"),
1184 _("Select correct user"), 1184 _("Select correct user"),
1185 r->pubkey_search 1185 r->pubkey_search
1186 ? _("More than one user was found with the same public key. Select " 1186 ? _("More than one user was found with the same public key. Select "
1187 "the correct user from the list to add to the buddy list.") 1187 "the correct user from the list to add to the buddy list.")
1188 : _("More than one user was found with the same name. Select " 1188 : _("More than one user was found with the same name. Select "
1189 "the correct user from the list to add to the buddy list."), 1189 "the correct user from the list to add to the buddy list."),
1190 fields, 1190 fields,
1191 _("OK"), G_CALLBACK(silcpurple_add_buddy_select_cb), 1191 _("OK"), G_CALLBACK(silcpurple_add_buddy_select_cb),
1192 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel), 1192 _("Cancel"), G_CALLBACK(silcpurple_add_buddy_select_cancel),
1193 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, PURPLE_REQUEST_UI_HINT_BLIST, r); 1193 purple_buddy_get_account(r->b), purple_buddy_get_name(r->b), NULL, r);
1194 } 1194 }
1195 1195
1196 static void 1196 static void
1197 silcpurple_add_buddy_resolved(SilcClient client, 1197 silcpurple_add_buddy_resolved(SilcClient client,
1198 SilcClientConnection conn, 1198 SilcClientConnection conn,