diff options
author | Curtis McEnroe | 2019-02-21 23:16:20 -0500 |
---|---|---|
committer | Curtis McEnroe | 2019-02-21 23:17:40 -0500 |
commit | f3db938ded8210956d492d7c42df1793893e5cbe (patch) | |
tree | b7c366f954e50e315f4098446e1e4c00322188a5 /input.c | |
parent | c0c59d093fc5d1d0799c0830b470bfb72cf82062 (diff) |
Replace "view" with "window"
I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/input.c b/input.c index 31adc98..f91d11b 100644 --- a/input.c +++ b/input.c @@ -54,7 +54,7 @@ static void inputRaw(struct Tag tag, char *params) { if (!params || !self.raw) { self.raw ^= true; uiFmt( - TagRaw, UIWarm, "Raw view is %s", + TagRaw, UIWarm, "Raw window is %s", self.raw ? "enabled" : "disabled" ); } @@ -92,7 +92,7 @@ static void inputQuery(struct Tag tag, char *params) { char *nick = param(tag, "/query", ¶ms, "nick"); if (!nick) return; tabTouch(TagNone, nick); - uiViewTag(tagFor(nick)); + uiWindowTag(tagFor(nick)); logReplay(tagFor(nick)); } @@ -139,19 +139,19 @@ static void inputOpen(struct Tag tag, char *params) { } } -static void inputView(struct Tag tag, char *params) { +static void inputWindow(struct Tag tag, char *params) { (void)tag; - char *view = param(tag, "/view", ¶ms, "name or number"); - if (!view) return; - int num = strtol(view, &view, 0); - if (!view[0]) { - uiViewNum(num); + char *name = param(tag, "/window", ¶ms, "name or number"); + if (!name) return; + int num = strtol(name, &name, 0); + if (!name[0]) { + uiWindowNum(num); } else { - struct Tag tag = tagFind(view); + struct Tag tag = tagFind(name); if (tag.id != TagNone.id) { - uiViewTag(tag); + uiWindowTag(tag); } else { - uiFmt(tag, UIHot, "No view for %s", view); + uiFmt(tag, UIHot, "No window for %s", name); } } } @@ -186,9 +186,9 @@ static const struct { { "/raw", inputRaw }, { "/topic", inputTopic }, { "/url", inputURL }, - { "/view", inputView }, { "/who", inputWho }, { "/whois", inputWhois }, + { "/window", inputWindow }, }; static const size_t CommandsLen = sizeof(Commands) / sizeof(Commands[0]); @@ -215,7 +215,7 @@ void input(struct Tag tag, char *input) { char *trail; strtol(&word[1], &trail, 0); if (!trail[0]) { - inputView(tag, &word[1]); + inputWindow(tag, &word[1]); return; } |