Mercurial > pidgin
comparison src/dialogs.c @ 25:c56db1b46b0d
[gaim-migrate @ 34]
A crap load more of memleak fixes. There's still several more. I've
mailed Peter Techian about these. Hopefully he'll pick up on them.
Thanks again for the Patch, Pete.
committer: Tailor Script <tailor@pidgin.im>
| author | Rob Flynn <gaim@robflynn.com> |
|---|---|
| date | Fri, 24 Mar 2000 08:55:32 +0000 |
| parents | 7d0ef30fe8c0 |
| children | b9e90a914e20 |
comparison
equal
deleted
inserted
replaced
| 24:7d0ef30fe8c0 | 25:c56db1b46b0d |
|---|---|
| 383 gtk_container_add(GTK_CONTAINER(w->window), vbox); | 383 gtk_container_add(GTK_CONTAINER(w->window), vbox); |
| 384 gtk_widget_realize(w->window); | 384 gtk_widget_realize(w->window); |
| 385 aol_icon(w->window->window); | 385 aol_icon(w->window->window); |
| 386 | 386 |
| 387 gtk_widget_show(w->window); | 387 gtk_widget_show(w->window); |
| 388 g_free(buf); | |
| 388 } | 389 } |
| 389 | 390 |
| 390 | 391 |
| 391 /*------------------------------------------------------------------------*/ | 392 /*------------------------------------------------------------------------*/ |
| 392 /* The dialog for getting an error */ | 393 /* The dialog for getting an error */ |
| 888 char *buf; | 889 char *buf; |
| 889 | 890 |
| 890 junk = gtk_editable_get_chars(GTK_EDITABLE(b->text), 0, -1); | 891 junk = gtk_editable_get_chars(GTK_EDITABLE(b->text), 0, -1); |
| 891 | 892 |
| 892 g_snprintf(current_user->user_info, sizeof(current_user->user_info), "%s", junk); | 893 g_snprintf(current_user->user_info, sizeof(current_user->user_info), "%s", junk); |
| 893 | 894 |
| 894 save_prefs(); | 895 save_prefs(); |
| 895 | 896 |
| 896 buf = g_malloc(strlen(current_user->user_info) * 2); | 897 buf = g_malloc(strlen(current_user->user_info) * 2); |
| 897 g_snprintf(buf, strlen(current_user->user_info) * 2, "%s", current_user->user_info); | 898 g_snprintf(buf, strlen(current_user->user_info) * 2, "%s", current_user->user_info); |
| 898 escape_text(buf); | 899 escape_text(buf); |
| 899 serv_set_info(buf); | 900 serv_set_info(buf); |
| 900 g_free(buf); | 901 g_free(buf); |
| 901 | 902 g_free(junk); |
| 902 destroy_dialog(NULL, b->window); | 903 destroy_dialog(NULL, b->window); |
| 903 g_free(b); | 904 g_free(b); |
| 904 } | 905 } |
| 905 | 906 |
| 906 void do_set_dir(GtkWidget *widget, struct set_dir_dlg *b) | 907 void do_set_dir(GtkWidget *widget, struct set_dir_dlg *b) |
| 1435 gtk_file_selection_set_filename(GTK_FILE_SELECTION(logdialog), buf); | 1436 gtk_file_selection_set_filename(GTK_FILE_SELECTION(logdialog), buf); |
| 1436 gtk_signal_connect(GTK_OBJECT(logdialog), "delete_event", GTK_SIGNAL_FUNC(cancel_log), c); | 1437 gtk_signal_connect(GTK_OBJECT(logdialog), "delete_event", GTK_SIGNAL_FUNC(cancel_log), c); |
| 1437 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_log), bname); | 1438 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->ok_button), "clicked", GTK_SIGNAL_FUNC(do_log), bname); |
| 1438 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_log), bname); | 1439 gtk_signal_connect(GTK_OBJECT(GTK_FILE_SELECTION(logdialog)->cancel_button), "clicked", GTK_SIGNAL_FUNC(cancel_log), bname); |
| 1439 } | 1440 } |
| 1441 | |
| 1442 g_free(buf); | |
| 1440 | 1443 |
| 1441 gtk_widget_show(logdialog); | 1444 gtk_widget_show(logdialog); |
| 1442 gdk_window_raise(logdialog->window); | 1445 gdk_window_raise(logdialog->window); |
| 1443 } | 1446 } |
| 1444 | 1447 |
| 1881 fgets(first, 64, f); | 1884 fgets(first, 64, f); |
| 1882 | 1885 |
| 1883 if (!strcasecmp(first, "Config {\n")) { | 1886 if (!strcasecmp(first, "Config {\n")) { |
| 1884 destroy_dialog(NULL, importdialog); | 1887 destroy_dialog(NULL, importdialog); |
| 1885 importdialog = NULL; | 1888 importdialog = NULL; |
| 1889 g_free(buf); | |
| 1886 return; | 1890 return; |
| 1887 } else if (buf[0] == 'm') { | 1891 } else if (buf[0] == 'm') { |
| 1888 buf2 = buf; | 1892 buf2 = buf; |
| 1889 buf = g_malloc(1025); | 1893 buf = g_malloc(1025); |
| 1890 g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2); | 1894 g_snprintf(buf, 1024, "toc_set_config {%s}\n", buf2); |
