| 176 g, 3, |
176 g, 3, |
| 177 _("Cancel"), NULL, |
177 _("Cancel"), NULL, |
| 178 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
178 _("Add"), G_CALLBACK(qq_add_buddy_with_gc_and_uid), |
| 179 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
179 _("Search"), G_CALLBACK(_qq_search_before_add_with_gc_and_uid)); |
| 180 } else { |
180 } else { |
| 181 message = g_strdup_printf(_("%s has added you [%s] to his or her buddy list"), from, to); |
181 message = g_strdup_printf(_("%s added you [%s] to buddy list"), from, to); |
| 182 _qq_sys_msg_log_write(gc, message, from); |
182 _qq_sys_msg_log_write(gc, message, from); |
| 183 purple_notify_info(gc, NULL, message, NULL); |
183 purple_notify_info(gc, _("QQ Budy"), _("Successed:"), message); |
| 184 } |
184 } |
| 185 |
185 |
| 186 g_free(name); |
186 g_free(name); |
| 187 g_free(message); |
187 g_free(message); |
| 188 } |
188 } |
| 196 |
196 |
| 197 message = g_strdup_printf(_("Requestion rejected by %s"), from); |
197 message = g_strdup_printf(_("Requestion rejected by %s"), from); |
| 198 reason = g_strdup_printf(_("Message: %s"), msg_utf8); |
198 reason = g_strdup_printf(_("Message: %s"), msg_utf8); |
| 199 _qq_sys_msg_log_write(gc, message, from); |
199 _qq_sys_msg_log_write(gc, message, from); |
| 200 |
200 |
| 201 purple_notify_info(gc, NULL, message, reason); |
201 purple_notify_info(gc, _("QQ Buddy"), message, reason); |
| 202 g_free(message); |
202 g_free(message); |
| 203 g_free(reason); |
203 g_free(reason); |
| 204 } |
204 } |
| 205 |
205 |
| 206 /* the buddy approves your request of adding him/her as your friend */ |
206 /* the buddy approves your request of adding him/her as your friend */ |
| 214 qd = (qq_data *) gc->proto_data; |
214 qd = (qq_data *) gc->proto_data; |
| 215 qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE); |
215 qq_add_buddy_by_recv_packet(gc, strtol(from, NULL, 10), TRUE, TRUE); |
| 216 |
216 |
| 217 message = g_strdup_printf(_("Requestion approved by %s"), from); |
217 message = g_strdup_printf(_("Requestion approved by %s"), from); |
| 218 _qq_sys_msg_log_write(gc, message, from); |
218 _qq_sys_msg_log_write(gc, message, from); |
| 219 purple_notify_info(gc, NULL, message, NULL); |
219 purple_notify_info(gc, _("QQ Buddy"), _("Notice:"), message); |
| 220 |
220 |
| 221 g_free(message); |
221 g_free(message); |
| 222 } |
222 } |
| 223 |
223 |
| 224 /* someone wants to add you to his buddy list */ |
224 /* someone wants to add you to his buddy list */ |
| 282 qq_data *qd = (qq_data *) gc->proto_data; |
282 qq_data *qd = (qq_data *) gc->proto_data; |
| 283 gchar *title, *content; |
283 gchar *title, *content; |
| 284 |
284 |
| 285 g_return_if_fail(from != NULL && to != NULL); |
285 g_return_if_fail(from != NULL && to != NULL); |
| 286 |
286 |
| 287 title = g_strdup_printf(_("QQ Server Notice from %s:"), from); |
287 title = g_strdup_printf(_("From %s:"), from); |
| 288 content = g_strdup_printf(_("%s"), msg_utf8); |
288 content = g_strdup_printf(_("%s"), msg_utf8); |
| 289 |
289 |
| 290 if (qd->is_show_notice) { |
290 if (qd->is_show_notice) { |
| 291 purple_notify_info(gc, NULL, title, content); |
291 purple_notify_info(gc, _("QQ Server Notice"), title, content); |
| 292 } else { |
292 } else { |
| 293 purple_debug_info("QQ", "Server notice from %s:\n%s", from, msg_utf8); |
293 purple_debug_info("QQ", "QQ Server notice from %s:\n%s", from, msg_utf8); |
| 294 } |
294 } |
| 295 g_free(title); |
295 g_free(title); |
| 296 g_free(content); |
296 g_free(content); |
| 297 } |
297 } |
| 298 |
298 |