Mercurial > pidgin
comparison src/gtkrequest.c @ 14035:8bda65b88e49
[gaim-migrate @ 16638]
A bunch of small changes. Mostly remove "if not null" checks before
calling g_free, g_list_free, g_slist_free and g_strdup. Also use
g_list_foreach() to call g_free to free strings in an array. And
some whitespace changes here and there.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Sat, 05 Aug 2006 08:27:39 +0000 |
| parents | 99040e8c1142 |
| children |
comparison
equal
deleted
inserted
replaced
| 14034:0839a7b71325 | 14035:8bda65b88e49 |
|---|---|
| 362 | 362 |
| 363 g_free(label_text); | 363 g_free(label_text); |
| 364 | 364 |
| 365 /* Entry field. */ | 365 /* Entry field. */ |
| 366 data->u.input.multiline = multiline; | 366 data->u.input.multiline = multiline; |
| 367 data->u.input.hint = (hint == NULL ? NULL : g_strdup(hint)); | 367 data->u.input.hint = g_strdup(hint); |
| 368 | 368 |
| 369 if ((data->u.input.hint != NULL) && (!strcmp(data->u.input.hint, "html"))) { | 369 if ((data->u.input.hint != NULL) && (!strcmp(data->u.input.hint, "html"))) { |
| 370 GtkWidget *frame; | 370 GtkWidget *frame; |
| 371 | 371 |
| 372 /* imhtml */ | 372 /* imhtml */ |
| 1584 GCallback ok_cb, GCallback cancel_cb, | 1584 GCallback ok_cb, GCallback cancel_cb, |
| 1585 void *user_data) | 1585 void *user_data) |
| 1586 { | 1586 { |
| 1587 GaimGtkRequestData *data; | 1587 GaimGtkRequestData *data; |
| 1588 GtkWidget *dirsel; | 1588 GtkWidget *dirsel; |
| 1589 | 1589 |
| 1590 data = g_new0(GaimGtkRequestData, 1); | 1590 data = g_new0(GaimGtkRequestData, 1); |
| 1591 data->type = GAIM_REQUEST_FOLDER; | 1591 data->type = GAIM_REQUEST_FOLDER; |
| 1592 data->user_data = user_data; | 1592 data->user_data = user_data; |
| 1593 data->cb_count = 2; | 1593 data->cb_count = 2; |
| 1594 data->cbs = g_new0(GCallback, 2); | 1594 data->cbs = g_new0(GCallback, 2); |
| 1631 static void | 1631 static void |
| 1632 gaim_gtk_close_request(GaimRequestType type, void *ui_handle) | 1632 gaim_gtk_close_request(GaimRequestType type, void *ui_handle) |
| 1633 { | 1633 { |
| 1634 GaimGtkRequestData *data = (GaimGtkRequestData *)ui_handle; | 1634 GaimGtkRequestData *data = (GaimGtkRequestData *)ui_handle; |
| 1635 | 1635 |
| 1636 if (data->cbs != NULL) | 1636 g_free(data->cbs); |
| 1637 g_free(data->cbs); | |
| 1638 | 1637 |
| 1639 gtk_widget_destroy(data->dialog); | 1638 gtk_widget_destroy(data->dialog); |
| 1640 | 1639 |
| 1641 if (type == GAIM_REQUEST_FIELDS) | 1640 if (type == GAIM_REQUEST_FIELDS) |
| 1642 gaim_request_fields_destroy(data->u.multifield.fields); | 1641 gaim_request_fields_destroy(data->u.multifield.fields); |
