mirror of
https://github.com/irssi/irssi.git
synced 2025-01-03 14:56:47 -05:00
You can change the default line indentation with /SET indent
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@570 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
e32c3bcd33
commit
674d240718
@ -23,6 +23,7 @@
|
|||||||
#include "commands.h"
|
#include "commands.h"
|
||||||
#include "server.h"
|
#include "server.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
#include "irc.h"
|
#include "irc.h"
|
||||||
#include "channels.h"
|
#include "channels.h"
|
||||||
@ -39,10 +40,9 @@
|
|||||||
/* how long to keep line cache in memory (seconds) */
|
/* how long to keep line cache in memory (seconds) */
|
||||||
#define LINE_CACHE_KEEP_TIME (10*60)
|
#define LINE_CACHE_KEEP_TIME (10*60)
|
||||||
|
|
||||||
#define DEFAULT_INDENT_POS 10
|
|
||||||
|
|
||||||
static int linecache_tag;
|
static int linecache_tag;
|
||||||
static int window_create_override;
|
static int window_create_override;
|
||||||
|
static int default_indent_pos;
|
||||||
|
|
||||||
static GUI_WINDOW_REC *gui_window_init(WINDOW_REC *window, MAIN_WINDOW_REC *parent)
|
static GUI_WINDOW_REC *gui_window_init(WINDOW_REC *window, MAIN_WINDOW_REC *parent)
|
||||||
{
|
{
|
||||||
@ -263,7 +263,7 @@ static LINE_CACHE_REC *gui_window_line_cache(GUI_WINDOW_REC *gui, LINE_REC *line
|
|||||||
rec = g_new(LINE_CACHE_REC, 1);
|
rec = g_new(LINE_CACHE_REC, 1);
|
||||||
rec->last_access = time(NULL);
|
rec->last_access = time(NULL);
|
||||||
|
|
||||||
xpos = 0; color = 0; indent_pos = DEFAULT_INDENT_POS;
|
xpos = 0; color = 0; indent_pos = default_indent_pos;
|
||||||
last_space = last_color = 0; last_space_ptr = NULL;
|
last_space = last_color = 0; last_space_ptr = NULL;
|
||||||
|
|
||||||
rec->count = 1; lines = NULL;
|
rec->count = 1; lines = NULL;
|
||||||
@ -850,11 +850,19 @@ static int sig_check_linecache(void)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void read_settings(void)
|
||||||
|
{
|
||||||
|
default_indent_pos = settings_get_int("indent");
|
||||||
|
}
|
||||||
|
|
||||||
void gui_windows_init(void)
|
void gui_windows_init(void)
|
||||||
{
|
{
|
||||||
|
settings_add_int("lookandfeel", "indent", 10);
|
||||||
|
|
||||||
window_create_override = -1;
|
window_create_override = -1;
|
||||||
linecache_tag = g_timeout_add(LINE_CACHE_CHECK_TIME, (GSourceFunc) sig_check_linecache, NULL);
|
linecache_tag = g_timeout_add(LINE_CACHE_CHECK_TIME, (GSourceFunc) sig_check_linecache, NULL);
|
||||||
|
|
||||||
|
read_settings();
|
||||||
signal_add("gui window create override", (SIGNAL_FUNC) sig_window_create_override);
|
signal_add("gui window create override", (SIGNAL_FUNC) sig_window_create_override);
|
||||||
signal_add("window created", (SIGNAL_FUNC) gui_window_created);
|
signal_add("window created", (SIGNAL_FUNC) gui_window_created);
|
||||||
signal_add("window destroyed", (SIGNAL_FUNC) gui_window_destroyed);
|
signal_add("window destroyed", (SIGNAL_FUNC) gui_window_destroyed);
|
||||||
@ -862,6 +870,7 @@ void gui_windows_init(void)
|
|||||||
signal_add("window item changed", (SIGNAL_FUNC) signal_window_item_update);
|
signal_add("window item changed", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
signal_add("window name changed", (SIGNAL_FUNC) signal_window_item_update);
|
signal_add("window name changed", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
signal_add("window item remove", (SIGNAL_FUNC) signal_window_item_update);
|
signal_add("window item remove", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
|
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
void gui_windows_deinit(void)
|
void gui_windows_deinit(void)
|
||||||
@ -878,4 +887,5 @@ void gui_windows_deinit(void)
|
|||||||
signal_remove("window item changed", (SIGNAL_FUNC) signal_window_item_update);
|
signal_remove("window item changed", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
signal_remove("window name changed", (SIGNAL_FUNC) signal_window_item_update);
|
signal_remove("window name changed", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
signal_remove("window item remove", (SIGNAL_FUNC) signal_window_item_update);
|
signal_remove("window item remove", (SIGNAL_FUNC) signal_window_item_update);
|
||||||
|
signal_remove("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
}
|
}
|
||||||
|
@ -82,6 +82,7 @@ static void textui_init(void)
|
|||||||
irssi_gui = IRSSI_GUI_TEXT;
|
irssi_gui = IRSSI_GUI_TEXT;
|
||||||
core_init();
|
core_init();
|
||||||
irc_init();
|
irc_init();
|
||||||
|
//silc_init();
|
||||||
fe_common_core_init();
|
fe_common_core_init();
|
||||||
fe_common_irc_init();
|
fe_common_irc_init();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user