From eac6b52e05c3d2c5c705b1f8c5a58f36358133df Mon Sep 17 00:00:00 2001 From: James Booth Date: Sat, 29 Oct 2016 13:06:50 +0100 Subject: [PATCH 1/3] Fix typo --- src/event/server_events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/event/server_events.c b/src/event/server_events.c index ff77b3af..a434bf47 100644 --- a/src/event/server_events.c +++ b/src/event/server_events.c @@ -988,7 +988,7 @@ sv_ev_certfail(const char *const errormsg, TLSCertificate *cert) } if (g_strcmp0(cmd, "/tls allow") == 0) { - cons_show("Coninuing with connection."); + cons_show("Continuing with connection."); tlscerts_set_current(cert->fingerprint); free(cmd); return 1; From c0f099cb84e8903750f0ef79670d3cc368dd4c30 Mon Sep 17 00:00:00 2001 From: Frank Zschockelt Date: Sat, 29 Oct 2016 17:27:32 +0200 Subject: [PATCH 2/3] Added main.help.header theme option --- src/command/cmd_funcs.c | 4 ++-- src/config/theme.c | 2 ++ src/config/theme.h | 1 + src/ui/console.c | 18 +++++++++--------- 4 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/command/cmd_funcs.c b/src/command/cmd_funcs.c index 35ae3119..145752ca 100644 --- a/src/command/cmd_funcs.c +++ b/src/command/cmd_funcs.c @@ -1483,9 +1483,9 @@ _cmd_help_cmd_list(const char *const tag) cons_show(""); ProfWin *console = wins_get_console(); if (tag) { - win_println(console, THEME_WHITE_BOLD, '-', "%s commands", tag); + win_println(console, THEME_HELP_HEADER, '-', "%s commands", tag); } else { - win_println(console, THEME_WHITE_BOLD, '-', "All commands"); + win_println(console, THEME_HELP_HEADER, '-', "All commands"); } GList *ordered_commands = NULL; diff --git a/src/config/theme.c b/src/config/theme.c index 44c9c3ff..3cd50d6e 100644 --- a/src/config/theme.c +++ b/src/config/theme.c @@ -81,6 +81,7 @@ theme_init(const char *const theme_name) g_hash_table_insert(defaults, strdup("main.text.me"), strdup("white")); g_hash_table_insert(defaults, strdup("main.text.them"), strdup("white")); g_hash_table_insert(defaults, strdup("main.splash"), strdup("cyan")); + g_hash_table_insert(defaults, strdup("main.help.header"), strdup("white")); g_hash_table_insert(defaults, strdup("error"), strdup("red")); g_hash_table_insert(defaults, strdup("incoming"), strdup("yellow")); g_hash_table_insert(defaults, strdup("mention"), strdup("yellow")); @@ -731,6 +732,7 @@ theme_attrs(theme_item_t attrs) case THEME_TEXT_ME: _theme_prep_fgnd("main.text.me", lookup_str, &bold); break; case THEME_TEXT_THEM: _theme_prep_fgnd("main.text.them", lookup_str, &bold); break; case THEME_SPLASH: _theme_prep_fgnd("main.splash", lookup_str, &bold); break; + case THEME_HELP_HEADER: _theme_prep_fgnd("main.help.header", lookup_str, &bold); break; case THEME_ERROR: _theme_prep_fgnd("error", lookup_str, &bold); break; case THEME_INCOMING: _theme_prep_fgnd("incoming", lookup_str, &bold); break; case THEME_MENTION: _theme_prep_fgnd("mention", lookup_str, &bold); break; diff --git a/src/config/theme.h b/src/config/theme.h index 10b4b644..9896c1b9 100644 --- a/src/config/theme.h +++ b/src/config/theme.h @@ -46,6 +46,7 @@ typedef enum { THEME_TEXT_ME, THEME_TEXT_THEM, THEME_SPLASH, + THEME_HELP_HEADER, THEME_ERROR, THEME_INCOMING, THEME_MENTION, diff --git a/src/ui/console.c b/src/ui/console.c index c990f69b..ba6e5b38 100644 --- a/src/ui/console.c +++ b/src/ui/console.c @@ -110,20 +110,20 @@ cons_show_help(const char *const cmd, CommandHelp *help) ProfWin *console = wins_get_console(); cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "%s", &cmd[1]); - win_print(console, THEME_WHITE_BOLD, '-', ""); + win_println(console, THEME_HELP_HEADER, '-', "%s", &cmd[1]); + win_print(console, THEME_HELP_HEADER, '-', ""); int i; for (i = 0; i < strlen(cmd) - 1 ; i++) { - win_append(console, THEME_WHITE_BOLD, "-"); + win_append(console, THEME_HELP_HEADER, "-"); } - win_appendln(console, THEME_WHITE_BOLD, ""); + win_appendln(console, THEME_HELP_HEADER, ""); cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "Synopsis"); + win_println(console, THEME_HELP_HEADER, '-', "Synopsis"); ui_show_lines(console, help->synopsis); cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "Description"); + win_println(console, THEME_HELP_HEADER, '-', "Description"); win_println(console, THEME_DEFAULT, '-', "%s", help->desc); int maxlen = 0; @@ -134,7 +134,7 @@ cons_show_help(const char *const cmd, CommandHelp *help) if (i > 0) { cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "Arguments"); + win_println(console, THEME_HELP_HEADER, '-', "Arguments"); for (i = 0; help->args[i][0] != NULL; i++) { win_println_indent(console, maxlen + 3, "%-*s: %s", maxlen + 1, help->args[i][0], help->args[i][1]); } @@ -142,7 +142,7 @@ cons_show_help(const char *const cmd, CommandHelp *help) if (g_strv_length((gchar**)help->examples) > 0) { cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "Arguments"); + win_println(console, THEME_HELP_HEADER, '-', "Arguments"); ui_show_lines(console, help->examples); } } @@ -2063,7 +2063,7 @@ cons_navigation_help(void) { ProfWin *console = wins_get_console(); cons_show(""); - win_println(console, THEME_WHITE_BOLD, '-', "Navigation"); + win_println(console, THEME_HELP_HEADER, '-', "Navigation"); cons_show("Alt-1..Alt-0, F1..F10 : Choose window."); cons_show("Alt-LEFT, Alt-RIGHT : Previous/next chat window."); cons_show("PAGEUP, PAGEDOWN : Page the main window."); From ffa01a1a4c4185a584d5920edb0d565a3807eb85 Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 30 Oct 2016 17:06:06 +0000 Subject: [PATCH 3/3] Add main.help.header to themes --- themes/aqua | 1 + themes/batman | 1 + themes/bios | 1 + themes/boothj5 | 1 + themes/boothj5_laptop | 1 + themes/boothj5_slack | 1 + themes/forest | 7 +------ themes/hacker | 1 + themes/headache | 1 + themes/orange | 1 + themes/original | 1 + themes/original_bright | 1 + themes/whiteness | 1 + 13 files changed, 13 insertions(+), 6 deletions(-) diff --git a/themes/aqua b/themes/aqua index a0f7fb91..8c86da3a 100644 --- a/themes/aqua +++ b/themes/aqua @@ -22,6 +22,7 @@ main.text=blue main.text.me=bold_cyan main.text.them=bold_white main.splash=bold_white +main.help.header=bold_blue main.time=cyan input.text=white subscribed=bold_cyan diff --git a/themes/batman b/themes/batman index e982b182..f9186525 100644 --- a/themes/batman +++ b/themes/batman @@ -12,6 +12,7 @@ main.text=white input.text=yellow main.time=white main.splash=yellow +main.help.header=bold_white online=green away=yellow chat=green diff --git a/themes/bios b/themes/bios index 80ac885f..a0a36eb8 100644 --- a/themes/bios +++ b/themes/bios @@ -22,6 +22,7 @@ main.text=bold_white main.text.me=bold_white main.text.them=bold_white main.splash=bold_green +main.help.header=bold_white main.time=bold_green input.text=bold_white subscribed=bold_green diff --git a/themes/boothj5 b/themes/boothj5 index a0da10c5..fd38f419 100644 --- a/themes/boothj5 +++ b/themes/boothj5 @@ -22,6 +22,7 @@ main.text=white main.text.me=cyan main.text.them=bold_white main.splash=bold_red +main.help.header=bold_white main.time=yellow input.text=bold_green subscribed=green diff --git a/themes/boothj5_laptop b/themes/boothj5_laptop index 86339c1e..d7512f62 100644 --- a/themes/boothj5_laptop +++ b/themes/boothj5_laptop @@ -22,6 +22,7 @@ main.text=white main.text.me=cyan main.text.them=bold_white main.splash=bold_red +main.help.header=bold_white main.time=yellow input.text=bold_green subscribed=green diff --git a/themes/boothj5_slack b/themes/boothj5_slack index b372df77..5dd435d1 100644 --- a/themes/boothj5_slack +++ b/themes/boothj5_slack @@ -22,6 +22,7 @@ main.text=white main.text.me=cyan main.text.them=bold_white main.splash=bold_red +main.help.header=bold_white main.time=yellow input.text=bold_green subscribed=green diff --git a/themes/forest b/themes/forest index 13f0f12d..d216a2f1 100644 --- a/themes/forest +++ b/themes/forest @@ -22,6 +22,7 @@ main.text=bold_cyan main.text.me=yellow main.text.them=green main.splash=bold_yellow +main.help.header=bold_yellow main.time=bold_green input.text=bold_blue subscribed=green @@ -76,9 +77,3 @@ roster.room.trigger=bold_green occupants.header=bold_green receipt.sent=bold_black -[ui] -titlebar.position=1 -inputwin.position=2 -statusbar.position=3 -mainwin.position=4 - diff --git a/themes/hacker b/themes/hacker index a6516baa..95785bf9 100644 --- a/themes/hacker +++ b/themes/hacker @@ -22,6 +22,7 @@ main.text=green main.text.me=green main.text.them=green main.splash=bold_green +main.help.header=bold_green main.time=bold_green input.text=bold_green subscribed=bold_green diff --git a/themes/headache b/themes/headache index d53a1286..fd8ccca5 100644 --- a/themes/headache +++ b/themes/headache @@ -22,6 +22,7 @@ main.text=blue main.text.me=white main.text.them=bold_white main.splash=red +main.help.header=bold_blue main.time=green input.text=yellow subscribed=bold_magenta diff --git a/themes/orange b/themes/orange index 729ea5d4..353dc4d3 100644 --- a/themes/orange +++ b/themes/orange @@ -22,6 +22,7 @@ main.text=black main.text.me=black main.text.them=green main.splash=blue +main.help.header=black main.time=blue input.text=black subscribed=blue diff --git a/themes/original b/themes/original index 27cc38dd..38eba694 100644 --- a/themes/original +++ b/themes/original @@ -22,6 +22,7 @@ main.text=white main.text.me=white main.text.them=white main.splash=cyan +main.help.header=white main.time=white input.text=white subscribed=green diff --git a/themes/original_bright b/themes/original_bright index 92f139e3..fea535ca 100644 --- a/themes/original_bright +++ b/themes/original_bright @@ -22,6 +22,7 @@ main.text=bold_white main.text.me=bold_white main.text.them=bold_white main.splash=bold_cyan +main.help.header=bold_white main.time=bold_white input.text=bold_white subscribed=bold_green diff --git a/themes/whiteness b/themes/whiteness index 5bf83850..bea6722e 100644 --- a/themes/whiteness +++ b/themes/whiteness @@ -22,6 +22,7 @@ main.text=black main.text.me=black main.text.them=black main.splash=black +main.help.header=black main.time=black input.text=black subscribed=green