| 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 PURPLE_REQUEST_UI_HINT_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 PURPLE_REQUEST_UI_HINT_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 PURPLE_REQUEST_UI_HINT_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 PURPLE_REQUEST_UI_HINT_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 PURPLE_REQUEST_UI_HINT_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 PURPLE_REQUEST_UI_HINT_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 |
| 2215 (purple_connections_get_all() != NULL && |
2215 (purple_connections_get_all() != NULL && |
| 2216 purple_connections_get_all()->next != NULL)); |
2216 purple_connections_get_all()->next != NULL)); |
| 2217 purple_request_field_set_required(field, TRUE); |
2217 purple_request_field_set_required(field, TRUE); |
| 2218 purple_request_field_group_add_field(group, field); |
2218 purple_request_field_group_add_field(group, field); |
| 2219 |
2219 |
| 2220 purple_request_fields_with_hint(purple_get_blist(), _("New Instant Message"), |
2220 purple_request_fields(purple_get_blist(), _("New Instant Message"), |
| 2221 NULL, |
2221 NULL, |
| 2222 _("Please enter the screen name or alias of the person " |
2222 _("Please enter the screen name or alias of the person " |
| 2223 "you would like to IM."), |
2223 "you would like to IM."), |
| 2224 fields, |
2224 fields, |
| 2225 _("OK"), G_CALLBACK(send_im_select_cb), |
2225 _("OK"), G_CALLBACK(send_im_select_cb), |
| 2226 _("Cancel"), NULL, |
2226 _("Cancel"), NULL, |
| 2227 NULL, NULL, NULL, |
2227 NULL, NULL, NULL, |
| 2228 PURPLE_REQUEST_UI_HINT_BLIST, NULL); |
2228 NULL); |
| 2229 } |
2229 } |
| 2230 |
2230 |
| 2231 static void |
2231 static void |
| 2232 join_chat_select_cb(gpointer data, PurpleRequestFields *fields) |
2232 join_chat_select_cb(gpointer data, PurpleRequestFields *fields) |
| 2233 { |
2233 { |
| 2279 (purple_connections_get_all() != NULL && |
2279 (purple_connections_get_all() != NULL && |
| 2280 purple_connections_get_all()->next != NULL)); |
2280 purple_connections_get_all()->next != NULL)); |
| 2281 purple_request_field_set_required(field, TRUE); |
2281 purple_request_field_set_required(field, TRUE); |
| 2282 purple_request_field_group_add_field(group, field); |
2282 purple_request_field_group_add_field(group, field); |
| 2283 |
2283 |
| 2284 purple_request_fields_with_hint(purple_get_blist(), _("Join a Chat"), |
2284 purple_request_fields(purple_get_blist(), _("Join a Chat"), |
| 2285 NULL, |
2285 NULL, |
| 2286 _("Please enter the name of the chat you want to join."), |
2286 _("Please enter the name of the chat you want to join."), |
| 2287 fields, |
2287 fields, |
| 2288 _("Join"), G_CALLBACK(join_chat_select_cb), |
2288 _("Join"), G_CALLBACK(join_chat_select_cb), |
| 2289 _("Cancel"), NULL, |
2289 _("Cancel"), NULL, |
| 2290 NULL, NULL, NULL, |
2290 NULL, NULL, NULL, |
| 2291 PURPLE_REQUEST_UI_HINT_BLIST, NULL); |
2291 NULL); |
| 2292 } |
2292 } |
| 2293 |
2293 |
| 2294 static void |
2294 static void |
| 2295 menu_add_buddy_cb(GntMenuItem *item, gpointer null) |
2295 menu_add_buddy_cb(GntMenuItem *item, gpointer null) |
| 2296 { |
2296 { |