From: Eric W. <war...@us...> - 2001-10-26 23:20:23
|
Update of /cvsroot/gaim/gaim/src In directory usw-pr-cvs1:/tmp/cvs-serv9896 Modified Files: dialogs.c Log Message: this probably shouldn't matter, but i had something *really* odd happen to me related to the name, so i'm not risking it. Index: dialogs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/dialogs.c,v retrieving revision 1.276 retrieving revision 1.277 diff -u -d -r1.276 -r1.277 --- dialogs.c 2001/10/26 22:58:16 1.276 +++ dialogs.c 2001/10/26 23:20:20 1.277 @@ -3467,7 +3467,14 @@ g_free(view); } -void show_log(char *name) +static void des_log_win(GtkObject *win, gpointer data) +{ + char *x = gtk_object_get_user_data(win); + if (x) + g_free(x); +} + +void show_log(char *nm) { gchar filename[256]; gchar buf[BUF_LONG]; @@ -3487,6 +3494,7 @@ GtkWidget *last = NULL; GtkWidget *frame; struct view_log *view; + char *name = nm ? g_strdup(nm) : NULL; int options; guint block; @@ -3503,6 +3511,8 @@ options ^= GTK_IMHTML_NO_SIZES; window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_object_set_user_data(GTK_OBJECT(window), name); + gtk_signal_connect(GTK_OBJECT(window), "destroy", GTK_SIGNAL_FUNC(des_log_win), NULL); gtk_window_set_wmclass(GTK_WINDOW(window), "log", "Gaim"); if (name) g_snprintf(buf, BUF_LONG, "Gaim - Conversations with %s", name); |