Skip to content

Commit

Permalink
Add scrollback strip color option
Browse files Browse the repository at this point in the history
Conflicts:
	src/common/cfgfiles.c
  • Loading branch information
youknowone committed Apr 21, 2013
1 parent e6056db commit f7dcea3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/common/cfgfiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -560,6 +560,7 @@ const struct prefs vars[] = {
{"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT},
{"text_max_lines", P_OFFINT (max_lines), TYPE_INT},
{"text_replay", P_OFFINT (text_replay), TYPE_BOOL},
{"text_replay_strip_color", P_OFFINT (text_replay_strip_color), TYPE_BOOL},
{"text_show_marker", P_OFFINT (show_marker), TYPE_BOOL},
{"text_show_sep", P_OFFINT (show_separator), TYPE_BOOL},
{"text_stripcolor", P_OFFINT (stripcolor), TYPE_BOOL},
Expand Down Expand Up @@ -643,6 +644,7 @@ load_config (void)
prefs.autoreconnect = 1;
prefs.recon_delay = 10;
prefs.text_replay = 1;
prefs.text_replay_strip_color = 1;
prefs.tabchannels = 1;
prefs.tab_layout = 2; /* 0=Tabs 1=Reserved 2=Tree */
prefs.tab_sort = 1;
Expand Down
6 changes: 4 additions & 2 deletions src/common/text.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,11 @@ scrollback_load (session *sess)
text = strchr (buf + 3, ' ');
if (text)
{
text = strip_color (text + 1, -1, STRIP_COLOR);
if (prefs.text_replay_strip_color)
text = strip_color (text + 1, -1, STRIP_COLOR);
fe_print_text (sess, text, stamp);
g_free (text);
if (prefs.text_replay_strip_color)
g_free (text);
}
lines++;
}
Expand Down
1 change: 1 addition & 0 deletions src/common/xchat.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ struct xchatprefs
unsigned int windows_as_tabs;
unsigned int indent_nicks;
unsigned int text_replay;
unsigned int text_replay_strip_color;
unsigned int show_marker;
unsigned int show_separator;
unsigned int thin_separator;
Expand Down

0 comments on commit f7dcea3

Please sign in to comment.