| 84 |
84 |
| 85 nombre = uid_to_purple_name(uid); |
85 nombre = uid_to_purple_name(uid); |
| 86 purple_request_action |
86 purple_request_action |
| 87 (gc, NULL, _("Do you want to approve the request?"), "", 2, |
87 (gc, NULL, _("Do you want to approve the request?"), "", 2, |
| 88 purple_connection_get_account(gc), nombre, NULL, |
88 purple_connection_get_account(gc), nombre, NULL, |
| 89 g, 2, |
89 "chat", g, 2, |
| 90 _("Reject"), G_CALLBACK(qq_reject_add_request_with_gc_and_uid), |
90 _("Reject"), G_CALLBACK(qq_reject_add_request_with_gc_and_uid), |
| 91 _("Approve"), G_CALLBACK(qq_approve_add_request_with_gc_and_uid)); |
91 _("Approve"), G_CALLBACK(qq_approve_add_request_with_gc_and_uid)); |
| 92 g_free(nombre); |
92 g_free(nombre); |
| 93 } |
93 } |
| 94 |
94 |
| 107 qq_send_packet_get_info(gc, uid, TRUE); /* we want to see window */ |
107 qq_send_packet_get_info(gc, uid, TRUE); /* we want to see window */ |
| 108 nombre = uid_to_purple_name(uid); |
108 nombre = uid_to_purple_name(uid); |
| 109 purple_request_action |
109 purple_request_action |
| 110 (gc, NULL, _("Do you want to add this buddy?"), "", 2, |
110 (gc, NULL, _("Do you want to add this buddy?"), "", 2, |
| 111 purple_connection_get_account(gc), nombre, NULL, |
111 purple_connection_get_account(gc), nombre, NULL, |
| 112 g, 2, |
112 "buddy", g, 2, |
| 113 _("Cancel"), NULL, |
113 _("Cancel"), NULL, |
| 114 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid)); |
114 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid)); |
| 115 g_free(nombre); |
115 g_free(nombre); |
| 116 } |
116 } |
| 117 |
117 |
| 163 g = g_new0(gc_and_uid, 1); |
163 g = g_new0(gc_and_uid, 1); |
| 164 g->gc = gc; |
164 g->gc = gc; |
| 165 g->uid = uid; /* only need to get value */ |
165 g->uid = uid; /* only need to get value */ |
| 166 message = g_strdup_printf(_("You have been added by %s"), from); |
166 message = g_strdup_printf(_("You have been added by %s"), from); |
| 167 _qq_sys_msg_log_write(gc, message, from); |
167 _qq_sys_msg_log_write(gc, message, from); |
| 168 purple_request_action(gc, NULL, message, |
168 purple_request_action_with_hint(gc, NULL, message, |
| 169 _("Would you like to add him?"), 2, |
169 _("Would you like to add him?"), 2, |
| 170 purple_connection_get_account(gc), name, NULL, |
170 purple_connection_get_account(gc), name, NULL, |
| 171 g, 3, |
171 "buddy", g, 3, |
| 172 _("Cancel"), NULL, |
172 _("Cancel"), NULL, |
| 173 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
173 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
| 174 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
174 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
| 175 } else { |
175 } else { |
| 176 message = g_strdup_printf(_("%s has added you [%s] to his or her buddy list"), from, to); |
176 message = g_strdup_printf(_("%s has added you [%s] to his or her buddy list"), from, to); |
| 240 _qq_sys_msg_log_write(gc, message, from); |
240 _qq_sys_msg_log_write(gc, message, from); |
| 241 |
241 |
| 242 purple_request_action |
242 purple_request_action |
| 243 (gc, NULL, message, reason, 2, |
243 (gc, NULL, message, reason, 2, |
| 244 purple_connection_get_account(gc), name, NULL, |
244 purple_connection_get_account(gc), name, NULL, |
| 245 g, 3, |
245 "buddy", g, 3, |
| 246 _("Reject"), |
246 _("Reject"), |
| 247 G_CALLBACK(qq_reject_add_request_with_gc_and_uid), |
247 G_CALLBACK(qq_reject_add_request_with_gc_and_uid), |
| 248 _("Approve"), |
248 _("Approve"), |
| 249 G_CALLBACK(qq_approve_add_request_with_gc_and_uid), |
249 G_CALLBACK(qq_approve_add_request_with_gc_and_uid), |
| 250 _("Search"), G_CALLBACK(_qq_search_before_auth_with_gc_and_uid)); |
250 _("Search"), G_CALLBACK(_qq_search_before_auth_with_gc_and_uid)); |
| 257 if (b == NULL) { /* the person is not in my list */ |
257 if (b == NULL) { /* the person is not in my list */ |
| 258 g2 = g_new0(gc_and_uid, 1); |
258 g2 = g_new0(gc_and_uid, 1); |
| 259 g2->gc = gc; |
259 g2->gc = gc; |
| 260 g2->uid = strtol(from, NULL, 10); |
260 g2->uid = strtol(from, NULL, 10); |
| 261 message = g_strdup_printf(_("%s is not in your buddy list"), from); |
261 message = g_strdup_printf(_("%s is not in your buddy list"), from); |
| 262 purple_request_action(gc, NULL, message, |
262 purple_request_action_with_hint(gc, NULL, message, |
| 263 _("Would you like to add him?"), 2, |
263 _("Would you like to add him?"), 2, |
| 264 purple_connection_get_account(gc), name, NULL, |
264 purple_connection_get_account(gc), name, NULL, |
| 265 g2, 3, |
265 "blist", g2, 3, |
| 266 _("Cancel"), NULL, |
266 _("Cancel"), NULL, |
| 267 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
267 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
| 268 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
268 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
| 269 g_free(message); |
269 g_free(message); |
| 270 } |
270 } |