comparison finch/gntblist.c @ 21099:51cf02dbdb0e

disapproval of revision 'c484d979c4fda4433a9633ff8b69bd8a395c9479'
author Richard Laager <rlaager@wiktel.com>
date Fri, 16 Nov 2007 23:30:03 +0000
parents cab348e39751
children fcb848b2d669
comparison
equal deleted inserted replaced
21095:cab348e39751 21099:51cf02dbdb0e
336 purple_request_field_account_set_show_all(field, FALSE); 336 purple_request_field_account_set_show_all(field, FALSE);
337 if (account) 337 if (account)
338 purple_request_field_account_set_value(field, account); 338 purple_request_field_account_set_value(field, account);
339 purple_request_field_group_add_field(group, field); 339 purple_request_field_group_add_field(group, field);
340 340
341 purple_request_fields_with_hint(NULL, _("Add Buddy"), NULL, _("Please enter buddy information."), 341 purple_request_fields(NULL, _("Add Buddy"), NULL, _("Please enter buddy information."),
342 fields, 342 fields,
343 _("Add"), G_CALLBACK(add_buddy_cb), 343 _("Add"), G_CALLBACK(add_buddy_cb),
344 _("Cancel"), NULL, 344 _("Cancel"), NULL,
345 account, NULL, NULL, 345 account, NULL, NULL,
346 "blist", NULL); 346 NULL);
347 } 347 }
348 348
349 static void 349 static void
350 add_chat_cb(void *data, PurpleRequestFields *allfields) 350 add_chat_cb(void *data, PurpleRequestFields *allfields)
351 { 351 {
414 purple_request_field_group_add_field(group, field); 414 purple_request_field_group_add_field(group, field);
415 415
416 field = purple_request_field_bool_new("autojoin", _("Auto-join"), FALSE); 416 field = purple_request_field_bool_new("autojoin", _("Auto-join"), FALSE);
417 purple_request_field_group_add_field(group, field); 417 purple_request_field_group_add_field(group, field);
418 418
419 purple_request_fields_with_hint(NULL, _("Add Chat"), NULL, 419 purple_request_fields(NULL, _("Add Chat"), NULL,
420 _("You can edit more information from the context menu later."), 420 _("You can edit more information from the context menu later."),
421 fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL, 421 fields, _("Add"), G_CALLBACK(add_chat_cb), _("Cancel"), NULL,
422 NULL, NULL, NULL, 422 NULL, NULL, NULL,
423 "blist", NULL); 423 NULL);
424 } 424 }
425 425
426 static void 426 static void
427 add_group_cb(gpointer null, const char *group) 427 add_group_cb(gpointer null, const char *group)
428 { 428 {
449 } 449 }
450 450
451 static void 451 static void
452 finch_request_add_group() 452 finch_request_add_group()
453 { 453 {
454 purple_request_input_with_hint(NULL, _("Add Group"), NULL, _("Enter the name of the group"), 454 purple_request_input(NULL, _("Add Group"), NULL, _("Enter the name of the group"),
455 NULL, FALSE, FALSE, NULL, 455 NULL, FALSE, FALSE, NULL,
456 _("Add"), G_CALLBACK(add_group_cb), _("Cancel"), NULL, 456 _("Add"), G_CALLBACK(add_group_cb), _("Cancel"), NULL,
457 NULL, NULL, NULL, 457 NULL, NULL, NULL,
458 "blist", NULL); 458 NULL);
459 } 459 }
460 460
461 static PurpleBlistUiOps blist_ui_ops = 461 static PurpleBlistUiOps blist_ui_ops =
462 { 462 {
463 new_list, 463 new_list,
797 g_free(pce); 797 g_free(pce);
798 } 798 }
799 799
800 g_list_free(parts); 800 g_list_free(parts);
801 801
802 purple_request_fields_with_hint(NULL, _("Edit Chat"), NULL, _("Please Update the necessary fields."), 802 purple_request_fields(NULL, _("Edit Chat"), NULL, _("Please Update the necessary fields."),
803 fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL, 803 fields, _("Edit"), G_CALLBACK(chat_components_edit_ok), _("Cancel"), NULL,
804 NULL, NULL, NULL, 804 NULL, NULL, NULL,
805 "blist", chat); 805 chat);
806 } 806 }
807 807
808 static void 808 static void
809 autojoin_toggled(GntMenuItem *item, gpointer data) 809 autojoin_toggled(GntMenuItem *item, gpointer data)
810 { 810 {
998 g_return_if_reached(); 998 g_return_if_reached();
999 999
1000 prompt = g_strdup_printf(_("Please enter the new name for %s"), name); 1000 prompt = g_strdup_printf(_("Please enter the new name for %s"), name);
1001 1001
1002 text = PURPLE_BLIST_NODE_IS_GROUP(node) ? _("Rename") : _("Set Alias"); 1002 text = PURPLE_BLIST_NODE_IS_GROUP(node) ? _("Rename") : _("Set Alias");
1003 purple_request_input_with_hint(node, text, prompt, _("Enter empty string to reset the name."), 1003 purple_request_input(node, text, prompt, _("Enter empty string to reset the name."),
1004 name, FALSE, FALSE, NULL, text, G_CALLBACK(rename_blist_node), 1004 name, FALSE, FALSE, NULL, text, G_CALLBACK(rename_blist_node),
1005 _("Cancel"), NULL, 1005 _("Cancel"), NULL,
1006 NULL, NULL, NULL, 1006 NULL, NULL, NULL,
1007 "blist", node); 1007 node);
1008 1008
1009 g_free(prompt); 1009 g_free(prompt);
1010 } 1010 }
1011 1011
1012 /* Xeroxed from gtkdialogs.c:purple_gtkdialogs_remove_group_cb*/ 1012 /* Xeroxed from gtkdialogs.c:purple_gtkdialogs_remove_group_cb*/
1090 return; 1090 return;
1091 1091
1092 primary = g_strdup_printf(_("Are you sure you want to remove %s?"), name); 1092 primary = g_strdup_printf(_("Are you sure you want to remove %s?"), name);
1093 1093
1094 /* XXX: anything to do with the returned ui-handle? */ 1094 /* XXX: anything to do with the returned ui-handle? */
1095 purple_request_action_with_hint(node, _("Confirm Remove"), 1095 purple_request_action(node, _("Confirm Remove"),
1096 primary, sec, 1096 primary, sec,
1097 1, 1097 1,
1098 account, name, NULL, 1098 account, name, NULL,
1099 "blist", node, 2, 1099 node, 2,
1100 _("Remove"), finch_blist_remove_node, 1100 _("Remove"), finch_blist_remove_node,
1101 _("Cancel"), NULL); 1101 _("Cancel"), NULL);
1102 g_free(primary); 1102 g_free(primary);
1103 } 1103 }
1104 1104
2213 (purple_connections_get_all() != NULL && 2213 (purple_connections_get_all() != NULL &&
2214 purple_connections_get_all()->next != NULL)); 2214 purple_connections_get_all()->next != NULL));
2215 purple_request_field_set_required(field, TRUE); 2215 purple_request_field_set_required(field, TRUE);
2216 purple_request_field_group_add_field(group, field); 2216 purple_request_field_group_add_field(group, field);
2217 2217
2218 purple_request_fields_with_hint(purple_get_blist(), _("New Instant Message"), 2218 purple_request_fields(purple_get_blist(), _("New Instant Message"),
2219 NULL, 2219 NULL,
2220 _("Please enter the screen name or alias of the person " 2220 _("Please enter the screen name or alias of the person "
2221 "you would like to IM."), 2221 "you would like to IM."),
2222 fields, 2222 fields,
2223 _("OK"), G_CALLBACK(send_im_select_cb), 2223 _("OK"), G_CALLBACK(send_im_select_cb),
2224 _("Cancel"), NULL, 2224 _("Cancel"), NULL,
2225 NULL, NULL, NULL, 2225 NULL, NULL, NULL,
2226 "blist", NULL); 2226 NULL);
2227 } 2227 }
2228 2228
2229 static void 2229 static void
2230 join_chat_select_cb(gpointer data, PurpleRequestFields *fields) 2230 join_chat_select_cb(gpointer data, PurpleRequestFields *fields)
2231 { 2231 {
2277 (purple_connections_get_all() != NULL && 2277 (purple_connections_get_all() != NULL &&
2278 purple_connections_get_all()->next != NULL)); 2278 purple_connections_get_all()->next != NULL));
2279 purple_request_field_set_required(field, TRUE); 2279 purple_request_field_set_required(field, TRUE);
2280 purple_request_field_group_add_field(group, field); 2280 purple_request_field_group_add_field(group, field);
2281 2281
2282 purple_request_fields_with_hint(purple_get_blist(), _("Join a Chat"), 2282 purple_request_fields(purple_get_blist(), _("Join a Chat"),
2283 NULL, 2283 NULL,
2284 _("Please enter the name of the chat you want to join."), 2284 _("Please enter the name of the chat you want to join."),
2285 fields, 2285 fields,
2286 _("Join"), G_CALLBACK(join_chat_select_cb), 2286 _("Join"), G_CALLBACK(join_chat_select_cb),
2287 _("Cancel"), NULL, 2287 _("Cancel"), NULL,
2288 NULL, NULL, NULL, 2288 NULL, NULL, NULL,
2289 "blist", NULL); 2289 NULL);
2290 } 2290 }
2291 2291
2292 static void 2292 static void
2293 menu_add_buddy_cb(GntMenuItem *item, gpointer null) 2293 menu_add_buddy_cb(GntMenuItem *item, gpointer null)
2294 { 2294 {