comparison plugins/history.c @ 6824:9ae5ce753d63

[gaim-migrate @ 7368] History plugin fixes from javabsp committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 13 Sep 2003 21:01:05 +0000
parents 70d5122bc3ff
children 083d1e4a9c78
comparison
equal deleted inserted replaced
6823:2a6f5eb2d561 6824:9ae5ce753d63
28 char *path = g_build_filename(userdir, "logs", logfile, NULL); 28 char *path = g_build_filename(userdir, "logs", logfile, NULL);
29 char buf[HISTORY_SIZE+1]; 29 char buf[HISTORY_SIZE+1];
30 char *tmp, *tmp2; 30 char *tmp, *tmp2;
31 int size; 31 int size;
32 GtkIMHtmlOptions options = GTK_IMHTML_NO_COLOURS; 32 GtkIMHtmlOptions options = GTK_IMHTML_NO_COLOURS;
33 GtkTextIter end;
33 34
34 if (stat(path, &st) || S_ISDIR(st.st_mode) || st.st_size == 0 || 35 if (stat(path, &st) || S_ISDIR(st.st_mode) || st.st_size == 0 ||
35 !(fd = fopen(path, "r"))) { 36 !(fd = fopen(path, "r"))) {
36 g_free(userdir); 37 g_free(userdir);
37 g_free(logfile); 38 g_free(logfile);
59 tmp2 = g_strdup(tmp); 60 tmp2 = g_strdup(tmp);
60 61
61 gtkconv = GAIM_GTK_CONVERSATION(c); 62 gtkconv = GAIM_GTK_CONVERSATION(c);
62 63
63 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), tmp2, strlen(tmp2), options); 64 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), tmp2, strlen(tmp2), options);
65 gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<br>", -1, options);
66 gtk_text_buffer_get_end_iter(GTK_IMHTML(gtkconv->imhtml)->text_buffer, &
67 end);
68 gtk_text_view_scroll_to_iter(GTK_TEXT_VIEW(gtkconv->imhtml), &end, 0, 0,
69 0, 0);
70 gtk_text_buffer_move_mark_by_name(GTK_IMHTML(gtkconv->imhtml)->text_buffer,
71 "insert", &end);
64 72
65 g_free(tmp2); 73 g_free(tmp2);
66 g_free(userdir); 74 g_free(userdir);
67 g_free(logfile); 75 g_free(logfile);
68 g_free(path); 76 g_free(path);