Commit Graph

56 Commits (f1cae5194c952c2552d132997e268d5ca395140e)

Author SHA1 Message Date
Curtis McEnroe 3e2a9c2056
Factor out uiPrompt to call on nick change 2018-09-14 23:37:09 -04:00
Curtis McEnroe 714a703935
Check width of entire next word including codes
This results in a tiny bit of premature wrapping for color codes, but
that isn't a problem.
2018-09-14 18:54:18 -04:00
Curtis McEnroe 6aa42b852b
Remove word handling from formatParse 2018-09-14 18:48:03 -04:00
Curtis McEnroe 326bc5163d
Preview with nick in input window 2018-09-13 23:44:55 -04:00
Curtis McEnroe 9ca6814933
Avoid uninitialized x in uiRead 2018-09-13 15:39:40 -04:00
Curtis McEnroe 9a69869d39
Add IRCDefault to colors enum 2018-09-13 15:17:41 -04:00
Curtis McEnroe 4c4d91b449
Rewrite UI again
The persistent topic is gone and the status line is now at the top. The
status formatting still needs to be reworked. I also want to try showing
the nick in the input window so it really looks like your next message.
2018-09-13 01:03:47 -04:00
Curtis McEnroe b36a134702
Use formatParse split to position input cursor 2018-09-12 22:55:02 -04:00
Curtis McEnroe 872608e5c4
Factor out IRC formatting parsing 2018-09-12 20:23:45 -04:00
Curtis McEnroe 0cf067315d
Preserve scroll position when new lines appear 2018-09-05 17:10:26 -04:00
Curtis McEnroe 240f9ebf84
Use PascalCase for constants
Begone underscores.
2018-09-02 16:13:00 -04:00
Curtis McEnroe ccb54d36d9
Add status indicators 2018-09-02 14:04:05 -04:00
Curtis McEnroe 140f6e896d
Mark views when they are created 2018-09-02 01:01:41 -04:00
Curtis McEnroe 133ff4e651
Avoid unportable iswascii(3) 2018-08-20 17:20:44 -04:00
Curtis McEnroe 38fc42f03d
Add UI "heat" for status/messages/pings
Bring back the beeps! Allow pings from notices. Also factor out
dequoting of part/quit messages.
2018-08-17 14:00:08 -04:00
Curtis McEnroe ed9961410e
Set title to tag name 2018-08-13 23:09:53 -04:00
Curtis McEnroe 2ae5b6b9ab
Add /query, /part and /close
Closing a channel before parting it is a bit weird, but if I send a PART
on /close, it would get reopened again to show the part message.
2018-08-13 13:49:03 -04:00
Curtis McEnroe a09df5f697
Avoid setting mark if switching to the same view 2018-08-12 21:38:25 -04:00
Curtis McEnroe 2ec109e246
Disable focus tracking in uiHide
Most significantly so that the sequences don't end up on screen during a
/url.
2018-08-12 20:41:13 -04:00
Curtis McEnroe 0dfeb3df84
Add shift-{left,right} for single-line scrolling 2018-08-11 22:46:28 -04:00
Curtis McEnroe 24ca3aed81
Leave room for topic when creating view 2018-08-11 22:45:53 -04:00
Curtis McEnroe a281f89592
Rework UI code for multi-channel
Tags are now permanently assigned (and I'm betting on never needing more
than 256 of them) and the UI maps tags to a linked list of views for
easy reordering and removal. Currently, views can only be added. Views
don't have a topic window until they need one. All UI code wants to be
functional reactive.

Beeping is temporarily removed until message priorities (status,
message, ping) can be added to the UI. At that point spawning
notify-send should also be possible. Priorities will also help with
unnecessary markers, which will not appear for status messages.

The tab system is now used to send QUIT and NICK messages to all the
relevant tags. Verbose output now goes to its own tag, and sending to
it sends raw IRC.

IRC colors are now listed in chat.h and handler functions for numeric
replies have real names. The color algorithm now uses a real hash
function for hopefully better results. QUIT, PART and KICK messages are
scanned for URLs.
2018-08-11 20:02:03 -04:00
Curtis McEnroe 07c750d25c
Become multi-channel
There's a lot of UI missing for it, but it technically works.
2018-08-10 23:31:20 -04:00
Curtis McEnroe a64f1a4ea2
Add URL detection, listing and opening
Might also add /copy, like /open.
2018-08-09 00:24:49 -04:00
Curtis McEnroe 09fe40abd9
Use blank line as unread marker 2018-08-08 19:52:25 -04:00
Curtis McEnroe 4771a54bf9
Add markers as lines to the log 2018-08-08 18:50:57 -04:00
Curtis McEnroe eac0f83efa
Factor out line editing to edit.c 2018-08-08 16:59:26 -04:00
Curtis McEnroe b66c8abf70
Set log marker on FocusOut event
All of this needs refactoring, probably separating the line editing out
from the actual input handling.
2018-08-08 00:55:45 -04:00
Curtis McEnroe c9b7846d23
Use BLACK LEFT-POINTING TRIANGLE for marker 2018-08-08 00:09:09 -04:00
Curtis McEnroe ee0df2846e
Reset attrs after addIRC
Otherwise the marker inherits whatever was left on.
2018-08-07 23:40:40 -04:00
Curtis McEnroe 9114d0555c
Add tab complete UI
This definitely needs refactoring.
2018-08-07 23:03:08 -04:00
Curtis McEnroe ee49c36655
Mark log when scrolling up 2018-08-07 22:19:45 -04:00
Curtis McEnroe 7d76246c3f
Highlight and beep pings 2018-08-07 17:51:23 -04:00
Curtis McEnroe a6ede6f91f
Factor out allocating conversion between wcs and mbs 2018-08-07 16:24:14 -04:00
Curtis McEnroe fe21b1410f
Convert input to multibyte before handling 2018-08-07 15:46:04 -04:00
Curtis McEnroe 0b429a7ccc
Define ui.c BUF_LEN with enum 2018-08-07 14:14:07 -04:00
Curtis McEnroe fa270d9287
Hack clang into checking uiFmt format strings 2018-08-07 14:11:19 -04:00
Curtis McEnroe a26a6fee8d
Add reverse and reset IRC formatting codes 2018-08-07 00:09:50 -04:00
Curtis McEnroe d71d040995
Rewrite line editing again, add formatting 2018-08-06 22:14:59 -04:00
Curtis McEnroe 3f3fa34d8a
Implement word wrapping 2018-08-06 15:12:13 -04:00
Curtis McEnroe d6fb797b11
Use wchar_t strings for all of UI
vaswprintf is a nightmare.
2018-08-06 14:19:52 -04:00
Curtis McEnroe ea4c70dae5
Rename line editing functions 2018-08-06 11:22:45 -04:00
Curtis McEnroe 5bb96a79e7
Initialize all possible color pairs
This is actually possible with use_default_colors!
2018-08-05 18:34:35 -04:00
Curtis McEnroe dbed1929dc
Refactor color initialization 2018-08-05 15:00:38 -04:00
Curtis McEnroe c1283ed18a
Add ^L redraw 2018-08-05 13:42:37 -04:00
Curtis McEnroe 7beb4c9912
Use 16 colors if available
Fall back to using bold if there are only 8 colors. This also allowed
bright background colors in 16-color terminals.

I must port this system to torus. I'll be able to remove the awful
termcap patch hack.
2018-08-05 13:28:49 -04:00
Curtis McEnroe 7e02eddcf4
Limit parsed colors to number of mIRC colors
Oh boy that's embarrassing.
2018-08-05 11:00:01 -04:00
Curtis McEnroe 6df61b5dda
Show source link on exit 2018-08-04 21:23:28 -04:00
Curtis McEnroe 8fdf2c402d
Implement line editing, scrolling
Don't really have a way to implement the M-* keys, and currently missing
C-w.
2018-08-04 20:54:50 -04:00
Curtis McEnroe 7b5bc5aa41
Rename ui chat to log 2018-08-04 17:59:43 -04:00