diff options
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/log.c | 1 | ||||
-rw-r--r-- | src/common/session.c | 10 | ||||
-rw-r--r-- | src/common/session.h | 4 | ||||
-rw-r--r-- | src/common/weeconfig.c | 31 | ||||
-rw-r--r-- | src/common/weeconfig.h | 11 |
5 files changed, 51 insertions, 6 deletions
diff --git a/src/common/log.c b/src/common/log.c index 6738b0404..292fc1387 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -70,7 +70,6 @@ log_write_line (t_gui_buffer *buffer, char *message) if (buffer->log_file) { msg_no_color = (char *)gui_color_decode ((unsigned char *)message, 0); - log_write_date (buffer); fprintf (buffer->log_file, "%s\n", (msg_no_color) ? msg_no_color : message); fflush (buffer->log_file); diff --git a/src/common/session.c b/src/common/session.c index 5985448ca..ad3146204 100644 --- a/src/common/session.c +++ b/src/common/session.c @@ -365,7 +365,9 @@ session_save_line (FILE *file, t_gui_line *line) rc = rc && (session_write_int (file, SESSION_LINE_WITH_MESSAGE, line->line_with_message)); rc = rc && (session_write_int (file, SESSION_LINE_WITH_HIGHLIGHT, line->line_with_highlight)); rc = rc && (session_write_str (file, SESSION_LINE_DATA, line->data)); - rc = rc && (session_write_int (file, SESSION_LINE_OFS_AFTER_DATE, line->ofs_after_date)); + rc = rc && (session_write_int (file, SESSION_LINE_OFS_AFTER_DATE, line->ofs_start_message)); + rc = rc && (session_write_int (file, SESSION_LINE_OFS_START_MESSAGE, line->ofs_start_message)); + rc = rc && (session_write_str (file, SESSION_LINE_NICK, line->nick)); rc = rc && (session_write_id (file, SESSION_LINE_END)); return rc; } @@ -1501,6 +1503,12 @@ session_load_line (FILE *file) case SESSION_LINE_OFS_AFTER_DATE: rc = rc && (session_read_int (file, &(line->ofs_after_date))); break; + case SESSION_LINE_OFS_START_MESSAGE: + rc = rc && (session_read_int (file, &(line->ofs_start_message))); + break; + case SESSION_LINE_NICK: + rc = rc && (session_read_str (file, &(line->nick))); + break; default: weechat_log_printf (_("session: warning: ignoring value from " "line (object id: %d)\n")); diff --git a/src/common/session.h b/src/common/session.h index 9062bbb7a..7100e0bf0 100644 --- a/src/common/session.h +++ b/src/common/session.h @@ -169,7 +169,9 @@ enum t_session_line SESSION_LINE_WITH_MESSAGE, SESSION_LINE_WITH_HIGHLIGHT, SESSION_LINE_DATA, - SESSION_LINE_OFS_AFTER_DATE + SESSION_LINE_OFS_AFTER_DATE, + SESSION_LINE_OFS_START_MESSAGE, + SESSION_LINE_NICK }; enum t_session_uptime diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index d346f4a28..29b7085a7 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -87,7 +87,14 @@ int cfg_look_nicklist_max_size; int cfg_look_nickmode; int cfg_look_nickmode_empty; char *cfg_look_no_nickname; -char *cfg_look_completor; +char *cfg_look_nick_prefix; +char *cfg_look_nick_suffix; +int cfg_look_align_nick; +char *cfg_look_align_nick_values[] = +{ "none", "left", "right", NULL }; +int cfg_look_align_other; +int cfg_look_align_size; +char *cfg_look_nick_completor; char *cfg_look_nick_completion_ignore; int cfg_look_nick_complete_first; int cfg_look_infobar; @@ -190,10 +197,30 @@ t_config_option weechat_options_look[] = N_("display space if nick mode is not (half)op/voice"), OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE, NULL, NULL, &cfg_look_nickmode_empty, NULL, config_change_buffers }, + { "look_nick_prefix", N_("text to display before nick in chat window"), + N_("text to display before nick in chat window"), + OPTION_TYPE_STRING, 0, 0, 0, + "<", NULL, NULL, &cfg_look_nick_prefix, config_change_noop }, + { "look_nick_suffix", N_("text to display after nick in chat window"), + N_("text to display after nick in chat window"), + OPTION_TYPE_STRING, 0, 0, 0, + ">", NULL, NULL, &cfg_look_nick_suffix, config_change_noop }, + { "look_align_nick", N_("nick alignment (fixed size for nicks in chat window)"), + N_("nick alignment (fixed size for nicks in chat window (none, left, right))"), + OPTION_TYPE_INT_WITH_STRING, 0, 0, 0, + "none", cfg_look_align_nick_values, &cfg_look_align_nick, NULL, config_change_noop }, + { "look_align_other", N_("alignment for other messages (not beginning with a nick)"), + N_("alignment for other messages (not beginning with a nick)"), + OPTION_TYPE_BOOLEAN, BOOL_FALSE, BOOL_TRUE, BOOL_FALSE, + NULL, NULL, &cfg_look_align_other, NULL, config_change_noop }, + { "look_align_size", N_("size for aligning nick and other messages"), + N_("size for aligning nick and other messages"), + OPTION_TYPE_INT, 8, 64, 8, + NULL, NULL, &cfg_look_align_size, NULL, config_change_noop }, { "look_nick_completor", N_("the string inserted after nick completion"), N_("the string inserted after nick completion"), OPTION_TYPE_STRING, 0, 0, 0, - ":", NULL, NULL, &cfg_look_completor, config_change_noop }, + ":", NULL, NULL, &cfg_look_nick_completor, config_change_noop }, { "look_nick_completion_ignore", N_("chars ignored for nick completion"), N_("chars ignored for nick completion"), OPTION_TYPE_STRING, 0, 0, 0, diff --git a/src/common/weeconfig.h b/src/common/weeconfig.h index e35bf4ed4..03e6377dc 100644 --- a/src/common/weeconfig.h +++ b/src/common/weeconfig.h @@ -54,6 +54,10 @@ #define CFG_LOOK_NICKLIST_TOP 2 #define CFG_LOOK_NICKLIST_BOTTOM 3 +#define CFG_LOOK_ALIGN_NICK_NONE 0 +#define CFG_LOOK_ALIGN_NICK_LEFT 1 +#define CFG_LOOK_ALIGN_NICK_RIGHT 2 + #define CFG_IRC_DISPLAY_AWAY_OFF 0 #define CFG_IRC_DISPLAY_AWAY_LOCAL 1 #define CFG_IRC_DISPLAY_AWAY_CHANNEL 2 @@ -104,7 +108,12 @@ extern int cfg_look_nicklist_max_size; extern int cfg_look_nickmode; extern int cfg_look_nickmode_empty; extern char *cfg_look_no_nickname; -extern char *cfg_look_completor; +extern char *cfg_look_nick_prefix; +extern char *cfg_look_nick_suffix; +extern int cfg_look_align_nick; +extern int cfg_look_align_other; +extern int cfg_look_align_size; +extern char *cfg_look_nick_completor; extern char *cfg_look_nick_completion_ignore; extern int cfg_look_nick_complete_first; extern int cfg_look_infobar; |