Mercurial > pidgin
comparison libpurple/protocols/oscar/oscar.c @ 21069:fdefa5eb46e2
propagate from branch 'im.pidgin.pidgin' (head 1757e82b3ed17d8ad45db9d2c62f0187a8bee93d)
to branch 'org.maemo.garage.pidgin.pidgin.dialog-transience' (head a7af6ce1e8f29eb0eb1bffc0ebb72813c4c5fdbf)
author | Gabriel Schulhof <nix@go-nix.ca> |
---|---|
date | Sat, 06 Oct 2007 15:55:47 +0000 |
parents | 2bb82b05d30a 285bb637a2b7 |
children | 488796f5ba33 |
comparison
equal
deleted
inserted
replaced
20794:366204358e93 | 21069:fdefa5eb46e2 |
---|---|
1444 gchar *primary; | 1444 gchar *primary; |
1445 | 1445 |
1446 purple_debug_info("oscar", "Got SecurID request\n"); | 1446 purple_debug_info("oscar", "Got SecurID request\n"); |
1447 | 1447 |
1448 primary = g_strdup_printf("Enter the SecurID key for %s.", purple_account_get_username(account)); | 1448 primary = g_strdup_printf("Enter the SecurID key for %s.", purple_account_get_username(account)); |
1449 purple_request_input(gc, NULL, _("Enter SecurID"), primary, | 1449 purple_request_input_with_hint(gc, NULL, _("Enter SecurID"), primary, |
1450 _("Enter the 6 digit number from the digital display."), | 1450 _("Enter the 6 digit number from the digital display."), |
1451 FALSE, FALSE, NULL, | 1451 FALSE, FALSE, NULL, |
1452 _("_OK"), G_CALLBACK(purple_parse_auth_securid_request_yes_cb), | 1452 _("_OK"), G_CALLBACK(purple_parse_auth_securid_request_yes_cb), |
1453 _("_Cancel"), G_CALLBACK(purple_parse_auth_securid_request_no_cb), | 1453 _("_Cancel"), G_CALLBACK(purple_parse_auth_securid_request_no_cb), |
1454 account, NULL, NULL, | 1454 account, NULL, NULL, |
1455 gc); | 1455 "account", gc); |
1456 g_free(primary); | 1456 g_free(primary); |
1457 | 1457 |
1458 return 1; | 1458 return 1; |
1459 } | 1459 } |
1460 | 1460 |
2239 | 2239 |
2240 data = g_new0(struct name_data, 1); | 2240 data = g_new0(struct name_data, 1); |
2241 data->gc = gc; | 2241 data->gc = gc; |
2242 data->name = g_strdup(name); | 2242 data->name = g_strdup(name); |
2243 | 2243 |
2244 purple_request_input(data->gc, NULL, _("Authorization Request Message:"), | 2244 purple_request_input_with_hint(data->gc, NULL, _("Authorization Request Message:"), |
2245 NULL, _("Please authorize me!"), TRUE, FALSE, NULL, | 2245 NULL, _("Please authorize me!"), TRUE, FALSE, NULL, |
2246 _("_OK"), G_CALLBACK(purple_auth_request), | 2246 _("_OK"), G_CALLBACK(purple_auth_request), |
2247 _("_Cancel"), G_CALLBACK(purple_auth_dontrequest), | 2247 _("_Cancel"), G_CALLBACK(purple_auth_dontrequest), |
2248 purple_connection_get_account(gc), name, NULL, | 2248 purple_connection_get_account(gc), name, NULL, |
2249 data); | 2249 "blist", data); |
2250 } | 2250 } |
2251 | 2251 |
2252 | 2252 |
2253 static void | 2253 static void |
2254 purple_auth_sendrequest_menu(PurpleBlistNode *node, gpointer ignored) | 2254 purple_auth_sendrequest_menu(PurpleBlistNode *node, gpointer ignored) |
2288 | 2288 |
2289 static void | 2289 static void |
2290 purple_auth_dontgrant_msgprompt(gpointer cbdata) | 2290 purple_auth_dontgrant_msgprompt(gpointer cbdata) |
2291 { | 2291 { |
2292 struct name_data *data = cbdata; | 2292 struct name_data *data = cbdata; |
2293 purple_request_input(data->gc, NULL, _("Authorization Denied Message:"), | 2293 purple_request_input_with_hint(data->gc, NULL, _("Authorization Denied Message:"), |
2294 NULL, _("No reason given."), TRUE, FALSE, NULL, | 2294 NULL, _("No reason given."), TRUE, FALSE, NULL, |
2295 _("_OK"), G_CALLBACK(purple_auth_dontgrant), | 2295 _("_OK"), G_CALLBACK(purple_auth_dontgrant), |
2296 _("_Cancel"), G_CALLBACK(oscar_free_name_data), | 2296 _("_Cancel"), G_CALLBACK(oscar_free_name_data), |
2297 purple_connection_get_account(data->gc), data->name, NULL, | 2297 purple_connection_get_account(data->gc), data->name, NULL, |
2298 data); | 2298 "blist", data); |
2299 } | 2299 } |
2300 | 2300 |
2301 /* When someone sends you buddies */ | 2301 /* When someone sends you buddies */ |
2302 static void | 2302 static void |
2303 purple_icq_buddyadd(struct name_data *data) | 2303 purple_icq_buddyadd(struct name_data *data) |
2474 gchar *message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]); | 2474 gchar *message = g_strdup_printf(_("ICQ user %u has sent you a buddy: %s (%s)"), args->uin, text[i*2+2], text[i*2+1]); |
2475 data->gc = gc; | 2475 data->gc = gc; |
2476 data->name = g_strdup(text[i*2+1]); | 2476 data->name = g_strdup(text[i*2+1]); |
2477 data->nick = g_strdup(text[i*2+2]); | 2477 data->nick = g_strdup(text[i*2+2]); |
2478 | 2478 |
2479 purple_request_action(gc, NULL, message, | 2479 purple_request_action_with_hint(gc, NULL, message, |
2480 _("Do you want to add this buddy " | 2480 _("Do you want to add this buddy " |
2481 "to your buddy list?"), | 2481 "to your buddy list?"), |
2482 PURPLE_DEFAULT_ACTION_NONE, | 2482 PURPLE_DEFAULT_ACTION_NONE, |
2483 purple_connection_get_account(gc), data->name, NULL, | 2483 purple_connection_get_account(gc), data->name, NULL, |
2484 data, 2, | 2484 "blist", data, 2, |
2485 _("_Add"), G_CALLBACK(purple_icq_buddyadd), | 2485 _("_Add"), G_CALLBACK(purple_icq_buddyadd), |
2486 _("_Decline"), G_CALLBACK(oscar_free_name_data)); | 2486 _("_Decline"), G_CALLBACK(oscar_free_name_data)); |
2487 g_free(message); | 2487 g_free(message); |
2488 } | 2488 } |
2489 g_strfreev(text); | 2489 g_strfreev(text); |
5231 data = g_new(struct name_data, 1); | 5231 data = g_new(struct name_data, 1); |
5232 data->gc = gc; | 5232 data->gc = gc; |
5233 data->name = g_strdup(sn); | 5233 data->name = g_strdup(sn); |
5234 data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL); | 5234 data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL); |
5235 | 5235 |
5236 purple_request_yes_no(gc, NULL, _("Authorization Given"), dialog_msg, | 5236 purple_request_yes_no_with_hint(gc, NULL, _("Authorization Given"), dialog_msg, |
5237 PURPLE_DEFAULT_ACTION_NONE, | 5237 PURPLE_DEFAULT_ACTION_NONE, |
5238 purple_connection_get_account(gc), sn, NULL, | 5238 purple_connection_get_account(gc), sn, NULL, |
5239 data, | 5239 "blist", data, |
5240 G_CALLBACK(purple_icq_buddyadd), | 5240 G_CALLBACK(purple_icq_buddyadd), |
5241 G_CALLBACK(oscar_free_name_data)); | 5241 G_CALLBACK(oscar_free_name_data)); |
5242 g_free(dialog_msg); | 5242 g_free(dialog_msg); |
5243 | 5243 |
5244 return 1; | 5244 return 1; |
5930 data->gc = gc; | 5930 data->gc = gc; |
5931 data->name = g_strdup(purple_buddy_get_name(buddy)); | 5931 data->name = g_strdup(purple_buddy_get_name(buddy)); |
5932 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); | 5932 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); |
5933 | 5933 |
5934 title = g_strdup_printf(_("Buddy Comment for %s"), data->name); | 5934 title = g_strdup_printf(_("Buddy Comment for %s"), data->name); |
5935 purple_request_input(gc, title, _("Buddy Comment:"), NULL, | 5935 purple_request_input_with_hint(gc, title, _("Buddy Comment:"), NULL, |
5936 comment_utf8, TRUE, FALSE, NULL, | 5936 comment_utf8, TRUE, FALSE, NULL, |
5937 _("_OK"), G_CALLBACK(oscar_ssi_editcomment), | 5937 _("_OK"), G_CALLBACK(oscar_ssi_editcomment), |
5938 _("_Cancel"), G_CALLBACK(oscar_free_name_data), | 5938 _("_Cancel"), G_CALLBACK(oscar_free_name_data), |
5939 purple_connection_get_account(gc), data->name, NULL, | 5939 purple_connection_get_account(gc), data->name, NULL, |
5940 data); | 5940 "buddy", data); |
5941 g_free(title); | 5941 g_free(title); |
5942 | 5942 |
5943 g_free(comment); | 5943 g_free(comment); |
5944 g_free(comment_utf8); | 5944 g_free(comment_utf8); |
5945 } | 5945 } |
5980 data->who = g_strdup(buddy->name); | 5980 data->who = g_strdup(buddy->name); |
5981 data->od = gc->proto_data; | 5981 data->od = gc->proto_data; |
5982 buf = g_strdup_printf(_("You have selected to open a Direct IM connection with %s."), | 5982 buf = g_strdup_printf(_("You have selected to open a Direct IM connection with %s."), |
5983 buddy->name); | 5983 buddy->name); |
5984 | 5984 |
5985 purple_request_action(gc, NULL, buf, | 5985 purple_request_action_with_hint(gc, NULL, buf, |
5986 _("Because this reveals your IP address, it " | 5986 _("Because this reveals your IP address, it " |
5987 "may be considered a security risk. Do you " | 5987 "may be considered a security risk. Do you " |
5988 "wish to continue?"), | 5988 "wish to continue?"), |
5989 0, | 5989 0, |
5990 purple_connection_get_account(gc), data->who, NULL, | 5990 purple_connection_get_account(gc), data->who, NULL, |
5991 data, 2, | 5991 "buddy", data, 2, |
5992 _("C_onnect"), G_CALLBACK(oscar_ask_directim_yes_cb), | 5992 _("C_onnect"), G_CALLBACK(oscar_ask_directim_yes_cb), |
5993 _("_Cancel"), G_CALLBACK(oscar_ask_directim_no_cb)); | 5993 _("_Cancel"), G_CALLBACK(oscar_ask_directim_no_cb)); |
5994 g_free(buf); | 5994 g_free(buf); |
5995 } | 5995 } |
5996 | 5996 |
6138 f = purple_request_field_bool_new("web_aware", _("Web aware (enabling this will cause you to receive SPAM!)"), web_aware); | 6138 f = purple_request_field_bool_new("web_aware", _("Web aware (enabling this will cause you to receive SPAM!)"), web_aware); |
6139 purple_request_field_group_add_field(g, f); | 6139 purple_request_field_group_add_field(g, f); |
6140 | 6140 |
6141 purple_request_fields_add_group(fields, g); | 6141 purple_request_fields_add_group(fields, g); |
6142 | 6142 |
6143 purple_request_fields(gc, _("ICQ Privacy Options"), _("ICQ Privacy Options"), | 6143 purple_request_fields_with_hint(gc, _("ICQ Privacy Options"), _("ICQ Privacy Options"), |
6144 NULL, fields, | 6144 NULL, fields, |
6145 _("OK"), G_CALLBACK(oscar_icq_privacy_opts), | 6145 _("OK"), G_CALLBACK(oscar_icq_privacy_opts), |
6146 _("Cancel"), NULL, | 6146 _("Cancel"), NULL, |
6147 purple_connection_get_account(gc), NULL, NULL, | 6147 purple_connection_get_account(gc), NULL, NULL, |
6148 gc); | 6148 "account", gc); |
6149 } | 6149 } |
6150 | 6150 |
6151 static void oscar_format_screenname(PurpleConnection *gc, const char *nick) { | 6151 static void oscar_format_screenname(PurpleConnection *gc, const char *nick) { |
6152 OscarData *od = gc->proto_data; | 6152 OscarData *od = gc->proto_data; |
6153 if (!aim_sncmp(purple_account_get_username(purple_connection_get_account(gc)), nick)) { | 6153 if (!aim_sncmp(purple_account_get_username(purple_connection_get_account(gc)), nick)) { |
6211 } | 6211 } |
6212 | 6212 |
6213 static void oscar_show_change_email(PurplePluginAction *action) | 6213 static void oscar_show_change_email(PurplePluginAction *action) |
6214 { | 6214 { |
6215 PurpleConnection *gc = (PurpleConnection *) action->context; | 6215 PurpleConnection *gc = (PurpleConnection *) action->context; |
6216 purple_request_input(gc, NULL, _("Change Address To:"), NULL, NULL, | 6216 purple_request_input_with_hint(gc, NULL, _("Change Address To:"), NULL, NULL, |
6217 FALSE, FALSE, NULL, | 6217 FALSE, FALSE, NULL, |
6218 _("_OK"), G_CALLBACK(oscar_change_email), | 6218 _("_OK"), G_CALLBACK(oscar_change_email), |
6219 _("_Cancel"), NULL, | 6219 _("_Cancel"), NULL, |
6220 purple_connection_get_account(gc), NULL, NULL, | 6220 purple_connection_get_account(gc), NULL, NULL, |
6221 gc); | 6221 "account", gc); |
6222 } | 6222 } |
6223 | 6223 |
6224 static void oscar_show_awaitingauth(PurplePluginAction *action) | 6224 static void oscar_show_awaitingauth(PurplePluginAction *action) |
6225 { | 6225 { |
6226 PurpleConnection *gc = (PurpleConnection *) action->context; | 6226 PurpleConnection *gc = (PurpleConnection *) action->context; |
6278 } | 6278 } |
6279 | 6279 |
6280 static void oscar_show_find_email(PurplePluginAction *action) | 6280 static void oscar_show_find_email(PurplePluginAction *action) |
6281 { | 6281 { |
6282 PurpleConnection *gc = (PurpleConnection *) action->context; | 6282 PurpleConnection *gc = (PurpleConnection *) action->context; |
6283 purple_request_input(gc, _("Find Buddy by E-Mail"), | 6283 purple_request_input_with_hint(gc, _("Find Buddy by E-Mail"), |
6284 _("Search for a buddy by e-mail address"), | 6284 _("Search for a buddy by e-mail address"), |
6285 _("Type the e-mail address of the buddy you are " | 6285 _("Type the e-mail address of the buddy you are " |
6286 "searching for."), | 6286 "searching for."), |
6287 NULL, FALSE, FALSE, NULL, | 6287 NULL, FALSE, FALSE, NULL, |
6288 _("_Search"), G_CALLBACK(search_by_email_cb), | 6288 _("_Search"), G_CALLBACK(search_by_email_cb), |
6289 _("_Cancel"), NULL, | 6289 _("_Cancel"), NULL, |
6290 purple_connection_get_account(gc), NULL, NULL, | 6290 purple_connection_get_account(gc), NULL, NULL, |
6291 gc); | 6291 "buddy", gc); |
6292 } | 6292 } |
6293 | 6293 |
6294 static void oscar_show_set_info(PurplePluginAction *action) | 6294 static void oscar_show_set_info(PurplePluginAction *action) |
6295 { | 6295 { |
6296 PurpleConnection *gc = (PurpleConnection *) action->context; | 6296 PurpleConnection *gc = (PurpleConnection *) action->context; |