2007-03-14 [colin] 2.8.1cvs10
authorColin Leroy <colin@colino.net>
Wed, 14 Mar 2007 20:49:59 +0000 (20:49 +0000)
committerColin Leroy <colin@colino.net>
Wed, 14 Mar 2007 20:49:59 +0000 (20:49 +0000)
* src/gtk/logwindow.c
Probably fix bug 1149, crash on logwindow
close - at the expense of performance once
logwin has been opened

ChangeLog
PATCHSETS
configure.ac
src/gtk/logwindow.c

index c75d894..0c21f4f 100644 (file)
--- 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
index 52d8378..9b5bc4d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index 6246388..d1009c2 100644 (file)
@@ -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=
 
index 62392d5..aaffed5 100644 (file)
@@ -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;
 }