Mercurial > pidgin
comparison src/gtklog.c @ 10574:77ef3f2f0df8
[gaim-migrate @ 11966]
Leak fixes, round 3. Also, fix find in the log viewer to find in all
logs, not just every-other-one-you-select.
Plus some other minor tweaks.
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 05 Feb 2005 17:59:20 +0000 |
parents | 5b33637b69fd |
children | 0f5c5e6fb27f |
comparison
equal
deleted
inserted
replaced
10573:2d809781816f | 10574:77ef3f2f0df8 |
---|---|
103 gtk_tree_store_append (lv->treestore, &iter, NULL); | 103 gtk_tree_store_append (lv->treestore, &iter, NULL); |
104 gtk_tree_store_set(lv->treestore, &iter, | 104 gtk_tree_store_set(lv->treestore, &iter, |
105 0, title, | 105 0, title, |
106 1, log, -1); | 106 1, log, -1); |
107 } | 107 } |
108 g_free(read); | |
108 } | 109 } |
109 | 110 |
110 | 111 |
111 cursor = gdk_cursor_new(GDK_LEFT_PTR); | 112 cursor = gdk_cursor_new(GDK_LEFT_PTR); |
112 gdk_window_set_cursor(lv->window->window, cursor); | 113 gdk_window_set_cursor(lv->window->window, cursor); |
187 title_utf8 = gaim_utf8_try_convert(title); | 188 title_utf8 = gaim_utf8_try_convert(title); |
188 g_free(title); | 189 g_free(title); |
189 title = title_utf8; | 190 title = title_utf8; |
190 gtk_window_set_title(GTK_WINDOW(viewer->window), title); | 191 gtk_window_set_title(GTK_WINDOW(viewer->window), title); |
191 gtk_imhtml_clear(GTK_IMHTML(viewer->imhtml)); | 192 gtk_imhtml_clear(GTK_IMHTML(viewer->imhtml)); |
192 gtk_imhtml_append_text(GTK_IMHTML(viewer->imhtml), read, | 193 gtk_imhtml_append_text(GTK_IMHTML(viewer->imhtml), read, |
193 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_SCROLL | | 194 GTK_IMHTML_NO_COMMENTS | GTK_IMHTML_NO_TITLE | GTK_IMHTML_NO_SCROLL | |
194 ((flags & GAIM_LOG_READ_NO_NEWLINE) ? GTK_IMHTML_NO_NEWLINE : 0)); | 195 ((flags & GAIM_LOG_READ_NO_NEWLINE) ? GTK_IMHTML_NO_NEWLINE : 0)); |
195 | 196 |
196 if (viewer->search) | 197 if (viewer->search) |
198 { | |
199 gtk_imhtml_search_clear(GTK_IMHTML(viewer->imhtml)); | |
197 gtk_imhtml_search_find(GTK_IMHTML(viewer->imhtml), viewer->search); | 200 gtk_imhtml_search_find(GTK_IMHTML(viewer->imhtml), viewer->search); |
201 } | |
198 | 202 |
199 g_free(read); | 203 g_free(read); |
200 g_free(title); | 204 g_free(title); |
201 } | 205 } |
202 | 206 |
223 strftime(title, sizeof(title), "%c", localtime(&log->time)); | 227 strftime(title, sizeof(title), "%c", localtime(&log->time)); |
224 | 228 |
225 /* do utf8 conversions */ | 229 /* do utf8 conversions */ |
226 utf8_tmp = gaim_utf8_try_convert(month); | 230 utf8_tmp = gaim_utf8_try_convert(month); |
227 strncpy(month, utf8_tmp, sizeof(month)); | 231 strncpy(month, utf8_tmp, sizeof(month)); |
232 g_free(utf8_tmp); | |
228 utf8_tmp = gaim_utf8_try_convert(title); | 233 utf8_tmp = gaim_utf8_try_convert(title); |
229 strncpy(title, utf8_tmp, sizeof(title)); | 234 strncpy(title, utf8_tmp, sizeof(title)); |
230 g_free(utf8_tmp); | 235 g_free(utf8_tmp); |
231 | 236 |
232 if (strncmp(month, prev_top_month, sizeof(month)) != 0) { | 237 if (strncmp(month, prev_top_month, sizeof(month)) != 0) { |