From d3b575315a0a79bc54b1f608107ff75c356f3ac1 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 14 Mar 2007 20:49:59 +0000 Subject: [PATCH] 2007-03-14 [colin] 2.8.1cvs10 * src/gtk/logwindow.c Probably fix bug 1149, crash on logwindow close - at the expense of performance once logwin has been opened --- ChangeLog | 7 +++++++ PATCHSETS | 1 + configure.ac | 2 +- src/gtk/logwindow.c | 8 ++++++-- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c75d89464..0c21f4f13 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-03-14 [colin] 2.8.1cvs10 + + * src/gtk/logwindow.c + Probably fix bug 1149, crash on logwindow + close - at the expense of performance once + logwin has been opened + 2007-03-14 [colin] 2.8.1cvs9 * src/main.c diff --git a/PATCHSETS b/PATCHSETS index 52d837801..9b5bc4d20 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2426,3 +2426,4 @@ ( cvs diff -u -r 1.395.2.285 -r 1.395.2.286 src/summaryview.c; ) > 2.8.1cvs7.patchset ( cvs diff -u -r 1.1.2.50 -r 1.1.2.51 src/wizard.c; ) > 2.8.1cvs8.patchset ( cvs diff -u -r 1.115.2.141 -r 1.115.2.142 src/main.c; ) > 2.8.1cvs9.patchset +( cvs diff -u -r 1.1.4.26 -r 1.1.4.27 src/gtk/logwindow.c; ) > 2.8.1cvs10.patchset diff --git a/configure.ac b/configure.ac index 6246388ad..d1009c299 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=9 +EXTRA_VERSION=10 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c index 62392d5f0..aaffed53a 100644 --- a/src/gtk/logwindow.c +++ b/src/gtk/logwindow.c @@ -110,6 +110,7 @@ LogWindow *log_window_create(void) g_object_ref(G_OBJECT(logwin->buffer)); gtk_text_view_set_buffer(GTK_TEXT_VIEW(text), NULL); logwin->hidden = TRUE; + logwin->never_shown = TRUE; gtk_text_buffer_get_start_iter(buffer, &iter); logwin->end_mark = gtk_text_buffer_create_mark(buffer, "end", &iter, FALSE); @@ -203,7 +204,11 @@ void log_window_show(LogWindow *logwin) GtkTextMark *mark; logwin->hidden = FALSE; - gtk_text_view_set_buffer(GTK_TEXT_VIEW(logwin->text), logwin->buffer); + + if (logwin->never_shown) + gtk_text_view_set_buffer(GTK_TEXT_VIEW(logwin->text), logwin->buffer); + + logwin->never_shown = FALSE; mark = gtk_text_buffer_get_mark(buffer, "end"); gtk_text_view_scroll_mark_onscreen(text, mark); @@ -322,7 +327,6 @@ static gboolean log_window_append(gpointer source, gpointer data) static void hide_cb(GtkWidget *widget, LogWindow *logwin) { - gtk_text_view_set_buffer(GTK_TEXT_VIEW(logwin->text), NULL); logwin->hidden = TRUE; } -- 2.25.1