1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 07:16:37 +02:00

Save of bars in main WeeChat config file (weechat.rc)

This commit is contained in:
Sebastien Helleu
2008-03-07 18:39:14 +01:00
parent 75e8c9a2f5
commit 324eaa5069
4 changed files with 106 additions and 3 deletions
+4
View File
@@ -147,6 +147,7 @@ gui_bar_window_calculate_pos_size (struct t_gui_bar_window *bar_window,
/*
* gui_bar_window_new: create a new "window bar" for a bar, in screen or a window
* if window is not NULL, bar window will be in this window
* return 1 if ok, 0 if error
*/
int
@@ -154,6 +155,9 @@ gui_bar_window_new (struct t_gui_bar *bar, struct t_gui_window *window)
{
struct t_gui_bar_window *new_bar_window;
if (!gui_init_ok)
return 0;
new_bar_window = (struct t_gui_bar_window *) malloc (sizeof (struct t_gui_bar_window));
if (new_bar_window)
{
+16
View File
@@ -38,6 +38,7 @@
#include "../../core/wee-util.h"
#include "../../plugins/plugin.h"
#include "../gui-main.h"
#include "../gui-bar.h"
#include "../gui-bar-item.h"
#include "../gui-buffer.h"
#include "../gui-chat.h"
@@ -74,6 +75,7 @@ void
gui_main_init ()
{
struct t_gui_buffer *ptr_buffer;
struct t_gui_bar *ptr_bar;
initscr ();
@@ -123,6 +125,20 @@ gui_main_init ()
if (CONFIG_BOOLEAN(config_look_set_title))
gui_window_title_set ();
}
if (gui_init_ok)
{
/* create bar windows for root bars (they were read from config,
but no window was created (GUI was not initialized) */
for (ptr_bar = gui_bars; ptr_bar; ptr_bar = ptr_bar->next_bar)
{
if ((ptr_bar->type == GUI_BAR_TYPE_ROOT)
&& (!ptr_bar->bar_window))
{
gui_bar_window_new (ptr_bar, NULL);
}
}
}
}
/*
+1
View File
@@ -159,6 +159,7 @@ gui_bar_new (struct t_weechat_plugin *plugin, char *name, char *type,
new_bar->items_count = 0;
new_bar->items_array = NULL;
}
new_bar->bar_window = NULL;
if (type_value == GUI_BAR_TYPE_ROOT)
{