comparison src/dialogs.c @ 7843:9408c12b4a61

[gaim-migrate @ 8497] Change the alias buddy, alias chat, and alias contact dialogs. They're supposed to be more HIG-friendly. They're definitely a bit smaller... I guess that's good? I dunno. I think I'm just not used to them being so small. This was from a patch from Nathan Fredrickson. I changed all the request dialogs so they do not require primary text. I'm not really sure if this is good or not. I dunno. Like, add buddy and add chat both have only small text, and they look ok. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 13 Dec 2003 02:29:23 +0000
parents 0fb10479a6a3
children 340df1652af1
comparison
equal deleted inserted replaced
7842:9227553c97dd 7843:9408c12b4a61
1481 } 1481 }
1482 1482
1483 void 1483 void
1484 alias_dialog_blist_chat(GaimChat *chat) 1484 alias_dialog_blist_chat(GaimChat *chat)
1485 { 1485 {
1486 gaim_request_input(NULL, _("Alias Chat"), _("Alias chat"), 1486 gaim_request_input(NULL, _("Alias Chat"), NULL,
1487 _("Please enter an aliased name for this chat."), 1487 _("Enter an alias for this chat."),
1488 chat->alias, FALSE, FALSE, 1488 chat->alias, FALSE, FALSE,
1489 _("OK"), G_CALLBACK(alias_chat_cb), 1489 _("OK"), G_CALLBACK(alias_chat_cb),
1490 _("Cancel"), NULL, chat); 1490 _("Cancel"), NULL, chat);
1491 } 1491 }
1492 1492
1498 } 1498 }
1499 1499
1500 void 1500 void
1501 alias_dialog_contact(GaimContact *contact) 1501 alias_dialog_contact(GaimContact *contact)
1502 { 1502 {
1503 gaim_request_input(NULL, _("Alias Contact"), _("Alias contact"), 1503 gaim_request_input(NULL, _("Alias Contact"), NULL,
1504 _("Please enter an aliased name for this contact."), 1504 _("Enter an alias for this contact."),
1505 contact->alias, FALSE, FALSE, 1505 contact->alias, FALSE, FALSE,
1506 _("OK"), G_CALLBACK(alias_contact_cb), 1506 _("OK"), G_CALLBACK(alias_contact_cb),
1507 _("Cancel"), NULL, contact); 1507 _("Cancel"), NULL, contact);
1508 } 1508 }
1509 1509
1510 static void 1510 static void
1511 alias_buddy_cb(GaimBuddy *buddy, GaimRequestFields *fields) 1511 alias_buddy_cb(GaimBuddy *buddy, const char *alias)
1512 { 1512 {
1513 const char *alias; 1513 gaim_blist_alias_buddy(buddy, (alias != NULL && *alias != '\0') ? alias : NULL);
1514
1515 alias = gaim_request_fields_get_string(fields, "alias");
1516
1517 gaim_blist_alias_buddy(buddy,
1518 (alias != NULL && *alias != '\0') ? alias : NULL);
1519 serv_alias_buddy(buddy); 1514 serv_alias_buddy(buddy);
1520 gaim_blist_save(); 1515 gaim_blist_save();
1521 } 1516 }
1522 1517
1523 void 1518 void
1524 alias_dialog_bud(GaimBuddy *b) 1519 alias_dialog_bud(GaimBuddy *b)
1525 { 1520 {
1526 GaimRequestFields *fields; 1521 char *secondary = g_strdup_printf(_("Enter an alias for %s."), b->name);
1527 GaimRequestFieldGroup *group; 1522
1528 GaimRequestField *field; 1523 gaim_request_input(NULL, _("Alias Buddy"), NULL,
1529 1524 secondary, b->alias, FALSE, FALSE,
1530 fields = gaim_request_fields_new(); 1525 _("OK"), G_CALLBACK(alias_buddy_cb),
1531 1526 _("Cancel"), NULL, b);
1532 group = gaim_request_field_group_new(NULL); 1527
1533 gaim_request_fields_add_group(fields, group); 1528 g_free(secondary);
1534 1529 }
1535 field = gaim_request_field_string_new("screenname", _("_Screenname"),
1536 b->name, FALSE);
1537 gaim_request_field_string_set_editable(field, FALSE);
1538 gaim_request_field_group_add_field(group, field);
1539
1540 field = gaim_request_field_string_new("alias", _("_Alias"),
1541 b->alias, FALSE);
1542 gaim_request_field_group_add_field(group, field);
1543
1544 gaim_request_fields(NULL, _("Alias Buddy"),
1545 _("Alias buddy"),
1546 _("Please enter an aliased name for the person "
1547 "below, or rename this contact in your buddy list."),
1548 fields,
1549 _("OK"), G_CALLBACK(alias_buddy_cb),
1550 _("Cancel"), NULL,
1551 b);
1552 }