comparison libpurple/protocols/oscar/oscar.c @ 20598:285bb637a2b7

Updated hinting to be less invasive
author Gabriel Schulhof <nix@go-nix.ca>
date Sat, 22 Sep 2007 16:19:34 +0000
parents 591267f6f1d5
children fdefa5eb46e2
comparison
equal deleted inserted replaced
20597:591267f6f1d5 20598:285bb637a2b7
1442 gchar *primary; 1442 gchar *primary;
1443 1443
1444 purple_debug_info("oscar", "Got SecurID request\n"); 1444 purple_debug_info("oscar", "Got SecurID request\n");
1445 1445
1446 primary = g_strdup_printf("Enter the SecurID key for %s.", purple_account_get_username(account)); 1446 primary = g_strdup_printf("Enter the SecurID key for %s.", purple_account_get_username(account));
1447 purple_request_input(gc, NULL, _("Enter SecurID"), primary, 1447 purple_request_input_with_hint(gc, NULL, _("Enter SecurID"), primary,
1448 _("Enter the 6 digit number from the digital display."), 1448 _("Enter the 6 digit number from the digital display."),
1449 FALSE, FALSE, NULL, 1449 FALSE, FALSE, NULL,
1450 _("_OK"), G_CALLBACK(purple_parse_auth_securid_request_yes_cb), 1450 _("_OK"), G_CALLBACK(purple_parse_auth_securid_request_yes_cb),
1451 _("_Cancel"), G_CALLBACK(purple_parse_auth_securid_request_no_cb), 1451 _("_Cancel"), G_CALLBACK(purple_parse_auth_securid_request_no_cb),
1452 account, NULL, NULL, 1452 account, NULL, NULL,
2218 2218
2219 data = g_new0(struct name_data, 1); 2219 data = g_new0(struct name_data, 1);
2220 data->gc = gc; 2220 data->gc = gc;
2221 data->name = g_strdup(name); 2221 data->name = g_strdup(name);
2222 2222
2223 purple_request_input(data->gc, NULL, _("Authorization Request Message:"), 2223 purple_request_input_with_hint(data->gc, NULL, _("Authorization Request Message:"),
2224 NULL, _("Please authorize me!"), TRUE, FALSE, NULL, 2224 NULL, _("Please authorize me!"), TRUE, FALSE, NULL,
2225 _("_OK"), G_CALLBACK(purple_auth_request), 2225 _("_OK"), G_CALLBACK(purple_auth_request),
2226 _("_Cancel"), G_CALLBACK(purple_auth_dontrequest), 2226 _("_Cancel"), G_CALLBACK(purple_auth_dontrequest),
2227 purple_connection_get_account(gc), name, NULL, 2227 purple_connection_get_account(gc), name, NULL,
2228 "blist", data); 2228 "blist", data);
2267 2267
2268 static void 2268 static void
2269 purple_auth_dontgrant_msgprompt(gpointer cbdata) 2269 purple_auth_dontgrant_msgprompt(gpointer cbdata)
2270 { 2270 {
2271 struct name_data *data = cbdata; 2271 struct name_data *data = cbdata;
2272 purple_request_input(data->gc, NULL, _("Authorization Denied Message:"), 2272 purple_request_input_with_hint(data->gc, NULL, _("Authorization Denied Message:"),
2273 NULL, _("No reason given."), TRUE, FALSE, NULL, 2273 NULL, _("No reason given."), TRUE, FALSE, NULL,
2274 _("_OK"), G_CALLBACK(purple_auth_dontgrant), 2274 _("_OK"), G_CALLBACK(purple_auth_dontgrant),
2275 _("_Cancel"), G_CALLBACK(oscar_free_name_data), 2275 _("_Cancel"), G_CALLBACK(oscar_free_name_data),
2276 purple_connection_get_account(data->gc), data->name, NULL, 2276 purple_connection_get_account(data->gc), data->name, NULL,
2277 "blist", data); 2277 "blist", data);
2453 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]); 2453 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]);
2454 data->gc = gc; 2454 data->gc = gc;
2455 data->name = g_strdup(text[i*2+1]); 2455 data->name = g_strdup(text[i*2+1]);
2456 data->nick = g_strdup(text[i*2+2]); 2456 data->nick = g_strdup(text[i*2+2]);
2457 2457
2458 purple_request_action(gc, NULL, message, 2458 purple_request_action_with_hint(gc, NULL, message,
2459 _("Do you want to add this buddy " 2459 _("Do you want to add this buddy "
2460 "to your buddy list?"), 2460 "to your buddy list?"),
2461 PURPLE_DEFAULT_ACTION_NONE, 2461 PURPLE_DEFAULT_ACTION_NONE,
2462 purple_connection_get_account(gc), data->name, NULL, 2462 purple_connection_get_account(gc), data->name, NULL,
2463 "blist", data, 2, 2463 "blist", data, 2,
5165 data = g_new(struct name_data, 1); 5165 data = g_new(struct name_data, 1);
5166 data->gc = gc; 5166 data->gc = gc;
5167 data->name = g_strdup(sn); 5167 data->name = g_strdup(sn);
5168 data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL); 5168 data->nick = (buddy ? g_strdup(purple_buddy_get_alias_only(buddy)) : NULL);
5169 5169
5170 purple_request_yes_no(gc, NULL, _("Authorization Given"), dialog_msg, 5170 purple_request_yes_no_with_hint(gc, NULL, _("Authorization Given"), dialog_msg,
5171 PURPLE_DEFAULT_ACTION_NONE, 5171 PURPLE_DEFAULT_ACTION_NONE,
5172 purple_connection_get_account(gc), sn, NULL, 5172 purple_connection_get_account(gc), sn, NULL,
5173 "blist", data, 5173 "blist", data,
5174 G_CALLBACK(purple_icq_buddyadd), 5174 G_CALLBACK(purple_icq_buddyadd),
5175 G_CALLBACK(oscar_free_name_data)); 5175 G_CALLBACK(oscar_free_name_data));
5864 data->gc = gc; 5864 data->gc = gc;
5865 data->name = g_strdup(purple_buddy_get_name(buddy)); 5865 data->name = g_strdup(purple_buddy_get_name(buddy));
5866 data->nick = g_strdup(purple_buddy_get_alias_only(buddy)); 5866 data->nick = g_strdup(purple_buddy_get_alias_only(buddy));
5867 5867
5868 title = g_strdup_printf(_("Buddy Comment for %s"), data->name); 5868 title = g_strdup_printf(_("Buddy Comment for %s"), data->name);
5869 purple_request_input(gc, title, _("Buddy Comment:"), NULL, 5869 purple_request_input_with_hint(gc, title, _("Buddy Comment:"), NULL,
5870 comment_utf8, TRUE, FALSE, NULL, 5870 comment_utf8, TRUE, FALSE, NULL,
5871 _("_OK"), G_CALLBACK(oscar_ssi_editcomment), 5871 _("_OK"), G_CALLBACK(oscar_ssi_editcomment),
5872 _("_Cancel"), G_CALLBACK(oscar_free_name_data), 5872 _("_Cancel"), G_CALLBACK(oscar_free_name_data),
5873 purple_connection_get_account(gc), data->name, NULL, 5873 purple_connection_get_account(gc), data->name, NULL,
5874 "buddy", data); 5874 "buddy", data);
5914 data->who = g_strdup(buddy->name); 5914 data->who = g_strdup(buddy->name);
5915 data->od = gc->proto_data; 5915 data->od = gc->proto_data;
5916 buf = g_strdup_printf(_("You have selected to open a Direct IM connection with %s."), 5916 buf = g_strdup_printf(_("You have selected to open a Direct IM connection with %s."),
5917 buddy->name); 5917 buddy->name);
5918 5918
5919 purple_request_action(gc, NULL, buf, 5919 purple_request_action_with_hint(gc, NULL, buf,
5920 _("Because this reveals your IP address, it " 5920 _("Because this reveals your IP address, it "
5921 "may be considered a security risk. Do you " 5921 "may be considered a security risk. Do you "
5922 "wish to continue?"), 5922 "wish to continue?"),
5923 0, 5923 0,
5924 purple_connection_get_account(gc), data->who, NULL, 5924 purple_connection_get_account(gc), data->who, NULL,
6072 f = purple_request_field_bool_new("web_aware", _("Web aware (enabling this will cause you to receive SPAM!)"), web_aware); 6072 f = purple_request_field_bool_new("web_aware", _("Web aware (enabling this will cause you to receive SPAM!)"), web_aware);
6073 purple_request_field_group_add_field(g, f); 6073 purple_request_field_group_add_field(g, f);
6074 6074
6075 purple_request_fields_add_group(fields, g); 6075 purple_request_fields_add_group(fields, g);
6076 6076
6077 purple_request_fields(gc, _("ICQ Privacy Options"), _("ICQ Privacy Options"), 6077 purple_request_fields_with_hint(gc, _("ICQ Privacy Options"), _("ICQ Privacy Options"),
6078 NULL, fields, 6078 NULL, fields,
6079 _("OK"), G_CALLBACK(oscar_icq_privacy_opts), 6079 _("OK"), G_CALLBACK(oscar_icq_privacy_opts),
6080 _("Cancel"), NULL, 6080 _("Cancel"), NULL,
6081 purple_connection_get_account(gc), NULL, NULL, 6081 purple_connection_get_account(gc), NULL, NULL,
6082 "account", gc); 6082 "account", gc);
6145 } 6145 }
6146 6146
6147 static void oscar_show_change_email(PurplePluginAction *action) 6147 static void oscar_show_change_email(PurplePluginAction *action)
6148 { 6148 {
6149 PurpleConnection *gc = (PurpleConnection *) action->context; 6149 PurpleConnection *gc = (PurpleConnection *) action->context;
6150 purple_request_input(gc, NULL, _("Change Address To:"), NULL, NULL, 6150 purple_request_input_with_hint(gc, NULL, _("Change Address To:"), NULL, NULL,
6151 FALSE, FALSE, NULL, 6151 FALSE, FALSE, NULL,
6152 _("_OK"), G_CALLBACK(oscar_change_email), 6152 _("_OK"), G_CALLBACK(oscar_change_email),
6153 _("_Cancel"), NULL, 6153 _("_Cancel"), NULL,
6154 purple_connection_get_account(gc), NULL, NULL, 6154 purple_connection_get_account(gc), NULL, NULL,
6155 "account", gc); 6155 "account", gc);
6212 } 6212 }
6213 6213
6214 static void oscar_show_find_email(PurplePluginAction *action) 6214 static void oscar_show_find_email(PurplePluginAction *action)
6215 { 6215 {
6216 PurpleConnection *gc = (PurpleConnection *) action->context; 6216 PurpleConnection *gc = (PurpleConnection *) action->context;
6217 purple_request_input(gc, _("Find Buddy by E-Mail"), 6217 purple_request_input_with_hint(gc, _("Find Buddy by E-Mail"),
6218 _("Search for a buddy by e-mail address"), 6218 _("Search for a buddy by e-mail address"),
6219 _("Type the e-mail address of the buddy you are " 6219 _("Type the e-mail address of the buddy you are "
6220 "searching for."), 6220 "searching for."),
6221 NULL, FALSE, FALSE, NULL, 6221 NULL, FALSE, FALSE, NULL,
6222 _("_Search"), G_CALLBACK(search_by_email_cb), 6222 _("_Search"), G_CALLBACK(search_by_email_cb),