Mercurial > pidgin.yaz
comparison src/dialogs.c @ 4630:5cdfd20daa07
[gaim-migrate @ 4921]
Faceprint found these leaks. Anyone else want to find any?
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 01 Mar 2003 18:37:48 +0000 |
parents | 9f92925b6507 |
children | 42d53c416bb9 |
comparison
equal
deleted
inserted
replaced
4629:86fd0f6eaa1a | 4630:5cdfd20daa07 |
---|---|
3530 return am; | 3530 return am; |
3531 } | 3531 } |
3532 | 3532 |
3533 int check_away_mess(struct create_away *ca, int type) | 3533 int check_away_mess(struct create_away *ca, int type) |
3534 { | 3534 { |
3535 char *msg; | |
3535 if ((strlen(gtk_entry_get_text(GTK_ENTRY(ca->entry))) == 0) && (type == 1)) { | 3536 if ((strlen(gtk_entry_get_text(GTK_ENTRY(ca->entry))) == 0) && (type == 1)) { |
3536 /* We shouldn't allow a blank title */ | 3537 /* We shouldn't allow a blank title */ |
3537 do_error_dialog(_("You cannot save an away message with a blank title"), | 3538 do_error_dialog(_("You cannot save an away message with a blank title"), |
3538 _("Please give the message a title, or choose \"Make Away\" to use " | 3539 _("Please give the message a title, or choose \"Make Away\" to use " |
3539 "without saving."), GAIM_ERROR); | 3540 "without saving."), GAIM_ERROR); |
3540 return 0; | 3541 return 0; |
3541 } | 3542 } |
3542 | 3543 |
3543 if (!gtk_text_view_get_text(GTK_TEXT_VIEW(ca->text), FALSE) && (type <= 1)) { | 3544 msg = gtk_text_view_get_text(GTK_TEXT_VIEW(ca->text), FALSE); |
3545 | |
3546 if (!msg && (type <= 1)) { | |
3544 /* We shouldn't allow a blank message */ | 3547 /* We shouldn't allow a blank message */ |
3545 do_error_dialog(_("You cannot create an empty away message"), NULL, GAIM_ERROR); | 3548 do_error_dialog(_("You cannot create an empty away message"), NULL, GAIM_ERROR); |
3546 return 0; | 3549 return 0; |
3547 } | 3550 } |
3551 | |
3552 g_free(msg); | |
3548 | 3553 |
3549 return 1; | 3554 return 1; |
3550 } | 3555 } |
3551 | 3556 |
3552 void save_away_mess(GtkWidget *widget, struct create_away *ca) | 3557 void save_away_mess(GtkWidget *widget, struct create_away *ca) |