changeset 681:ac0ede6a53cf

Do not create log window more than once.
author zas_
date Sun, 18 May 2008 07:36:57 +0000
parents 2c9184126cf9
children 54980ddfe1ce
files src/logwindow.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/logwindow.c	Sat May 17 22:37:04 2008 +0000
+++ b/src/logwindow.c	Sun May 18 07:36:57 2008 +0000
@@ -171,13 +171,16 @@
 
 void log_window_new(void)
 {
-	LogWindow *logwin;
+	if (logwindow == NULL)
+		{
+		LogWindow *logwin;
 
-	logwin = log_window_create();
-	log_window_init(logwin);
-	log_window_show(logwin);
+		logwin = log_window_create();
+		log_window_init(logwin);
+		logwindow = logwin;
+		}
 
-	logwindow = logwin;
+	log_window_show(logwindow);
 }
 
 void log_window_append(const gchar *str, LogType type)