summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gui/curses/gui-curses-main.c8
-rw-r--r--src/gui/gtk/gui-gtk-main.c10
-rw-r--r--src/gui/gui-chat.c14
-rw-r--r--src/gui/gui-chat.h1
-rw-r--r--src/gui/gui-layout.h2
5 files changed, 34 insertions, 1 deletions
diff --git a/src/gui/curses/gui-curses-main.c b/src/gui/curses/gui-curses-main.c
index 3215499f8..3b199d315 100644
--- a/src/gui/curses/gui-curses-main.c
+++ b/src/gui/curses/gui-curses-main.c
@@ -46,6 +46,7 @@
#include "../gui-color.h"
#include "../gui-filter.h"
#include "../gui-input.h"
+#include "../gui-layout.h"
#include "../gui-history.h"
#include "../gui-nicklist.h"
#include "../gui-window.h"
@@ -331,6 +332,10 @@ gui_main_end (int clean_exit)
if (gui_input_clipboard)
free (gui_input_clipboard);
+ /* delete layout saved */
+ gui_layout_window_remove_all ();
+ gui_layout_buffer_remove_all ();
+
/* delete all windows */
while (gui_windows)
{
@@ -353,6 +358,9 @@ gui_main_end (int clean_exit)
/* end color */
gui_color_end ();
+
+ /* free chat buffer */
+ gui_chat_free_buffer ();
}
/* end of Curses output */
diff --git a/src/gui/gtk/gui-gtk-main.c b/src/gui/gtk/gui-gtk-main.c
index 4654434f9..89f7b74e1 100644
--- a/src/gui/gtk/gui-gtk-main.c
+++ b/src/gui/gtk/gui-gtk-main.c
@@ -41,6 +41,7 @@
#include "../gui-filter.h"
#include "../gui-history.h"
#include "../gui-input.h"
+#include "../gui-layout.h"
#include "../gui-window.h"
#include "gui-gtk.h"
@@ -221,7 +222,11 @@ gui_main_end (int clean_exit)
/* free clipboard buffer */
if (gui_input_clipboard)
free(gui_input_clipboard);
-
+
+ /* delete layout saved */
+ gui_layout_window_remove_all ();
+ gui_layout_buffer_remove_all ();
+
/* delete all windows */
while (gui_windows)
{
@@ -245,5 +250,8 @@ gui_main_end (int clean_exit)
/* end color */
gui_color_end ();
+
+ /* free chat buffer */
+ gui_chat_free_buffer ();
}
}
diff --git a/src/gui/gui-chat.c b/src/gui/gui-chat.c
index 48431b0ef..9d7e8bc84 100644
--- a/src/gui/gui-chat.c
+++ b/src/gui/gui-chat.c
@@ -1102,3 +1102,17 @@ gui_chat_printf_y (struct t_gui_buffer *buffer, int y, const char *message, ...)
string_iconv_fprintf (stdout, "%s\n", gui_chat_buffer);
}
}
+
+/*
+ * gui_chat_free_buffer: free buffer used by chat functions
+ */
+
+void
+gui_chat_free_buffer ()
+{
+ if (gui_chat_buffer)
+ {
+ free (gui_chat_buffer);
+ gui_chat_buffer = NULL;
+ }
+}
diff --git a/src/gui/gui-chat.h b/src/gui/gui-chat.h
index 01e3535a8..c616bc526 100644
--- a/src/gui/gui-chat.h
+++ b/src/gui/gui-chat.h
@@ -87,6 +87,7 @@ extern void gui_chat_printf_date_tags (struct t_gui_buffer *buffer,
const char *message, ...);
extern void gui_chat_printf_y (struct t_gui_buffer *buffer, int y,
const char *message, ...);
+extern void gui_chat_free_buffer ();
/* chat functions (GUI dependent) */
diff --git a/src/gui/gui-layout.h b/src/gui/gui-layout.h
index d4cf705ff..72ad8e50b 100644
--- a/src/gui/gui-layout.h
+++ b/src/gui/gui-layout.h
@@ -56,6 +56,7 @@ extern struct t_gui_layout_window *gui_layout_windows;
/* layout functions */
+extern void gui_layout_buffer_remove_all ();
extern void gui_layout_buffer_reset ();
extern struct t_gui_layout_buffer *gui_layout_buffer_add (const char *plugin_name,
const char *buffer_name,
@@ -65,6 +66,7 @@ extern int gui_layout_buffer_get_number (const char *plugin_name,
const char *buffer_name);
extern void gui_layout_buffer_apply ();
+extern void gui_layout_window_remove_all ();
extern void gui_layout_window_reset ();
extern struct t_gui_layout_window *gui_layout_window_search_by_id (int id);
extern struct t_gui_layout_window *gui_layout_window_add (int internal_id,