Mercurial > pidgin.yaz
comparison src/dialogs.c @ 8911:35b68d76cb4c
[gaim-migrate @ 9681]
you can now view logs of offline people without showing offline buddies (coreDumped)
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Sun, 09 May 2004 20:00:01 +0000 |
| parents | 56339eb6dab1 |
| children | 7cbdbed9d329 |
comparison
equal
deleted
inserted
replaced
| 8910:26c9b8761707 | 8911:35b68d76cb4c |
|---|---|
| 35 #include "gtkconv.h" | 35 #include "gtkconv.h" |
| 36 #include "gtkimhtml.h" | 36 #include "gtkimhtml.h" |
| 37 #include "gtkimhtmltoolbar.h" | 37 #include "gtkimhtmltoolbar.h" |
| 38 #include "gtkprefs.h" | 38 #include "gtkprefs.h" |
| 39 #include "gtkutils.h" | 39 #include "gtkutils.h" |
| 40 #include "gtklog.h" | |
| 40 #include "stock.h" | 41 #include "stock.h" |
| 41 | 42 |
| 42 #include "ui.h" | 43 #include "ui.h" |
| 43 | 44 |
| 44 /* XXX */ | 45 /* XXX */ |
| 527 _("OK"), G_CALLBACK(get_info_cb), | 528 _("OK"), G_CALLBACK(get_info_cb), |
| 528 _("Cancel"), NULL, | 529 _("Cancel"), NULL, |
| 529 NULL); | 530 NULL); |
| 530 } | 531 } |
| 531 | 532 |
| 533 static void | |
| 534 get_log_cb(gpointer data, GaimRequestFields *fields) | |
| 535 { | |
| 536 char *username; | |
| 537 GaimAccount *account; | |
| 538 | |
| 539 account = gaim_request_fields_get_account(fields, "account"); | |
| 540 | |
| 541 username = g_strdup(gaim_normalize(account, | |
| 542 gaim_request_fields_get_string(fields, "screenname"))); | |
| 543 | |
| 544 if( username != NULL && *username != '\0' && account != NULL ) | |
| 545 gaim_gtk_log_show( username, account ); | |
| 546 | |
| 547 g_free(username); | |
| 548 } | |
| 549 | |
| 550 void | |
| 551 show_log_dialog(void) | |
| 552 { | |
| 553 GaimRequestFields *fields; | |
| 554 GaimRequestFieldGroup *group; | |
| 555 GaimRequestField *field; | |
| 556 | |
| 557 fields = gaim_request_fields_new(); | |
| 558 | |
| 559 group = gaim_request_field_group_new(NULL); | |
| 560 gaim_request_fields_add_group(fields, group); | |
| 561 | |
| 562 field = gaim_request_field_string_new("screenname", _("_Screen name"), | |
| 563 NULL, FALSE); | |
| 564 gaim_request_field_set_type_hint(field, "screenname"); | |
| 565 gaim_request_field_set_required(field, TRUE); | |
| 566 gaim_request_field_group_add_field(group, field); | |
| 567 | |
| 568 field = gaim_request_field_account_new("account", _("_Account"), NULL); | |
| 569 gaim_request_field_set_visible(field, | |
| 570 (gaim_connections_get_all() != NULL && | |
| 571 gaim_connections_get_all()->next != NULL)); | |
| 572 gaim_request_field_set_required(field, TRUE); | |
| 573 gaim_request_field_group_add_field(group, field); | |
| 574 | |
| 575 gaim_request_fields(gaim_get_blist(), _("Get User Log"), | |
| 576 NULL, | |
| 577 _("Please enter the screen name of the person whose " | |
| 578 "log you would like to view."), | |
| 579 fields, | |
| 580 _("OK"), G_CALLBACK(get_log_cb), | |
| 581 _("Cancel"), NULL, | |
| 582 NULL); | |
| 583 } | |
| 584 | |
| 532 /*------------------------------------------------------*/ | 585 /*------------------------------------------------------*/ |
| 533 /* Color Selection Dialog */ | 586 /* Color Selection Dialog */ |
| 534 /*------------------------------------------------------*/ | 587 /*------------------------------------------------------*/ |
| 535 | 588 |
| 536 GtkWidget *fgcseld = NULL; | 589 GtkWidget *fgcseld = NULL; |
