Free layout and chat buffer on exit
This commit is contained in:
parent
843451f9bf
commit
091c07d571
@ -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 */
|
||||
|
@ -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 ();
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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) */
|
||||
|
||||
|
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user