diff --git a/src/command/command.c b/src/command/command.c index 8b681778..ee489df0 100644 --- a/src/command/command.c +++ b/src/command/command.c @@ -1395,7 +1395,7 @@ cmd_execute_default(const char * const inp) break; case WIN_CONSOLE: - ui_unknown_command(inp); + cons_show("Unknown command: %s", inp); break; case WIN_DUCK: diff --git a/src/command/commands.c b/src/command/commands.c index ee80ab2d..6d31de99 100644 --- a/src/command/commands.c +++ b/src/command/commands.c @@ -66,7 +66,7 @@ cmd_connect(gchar **args, struct cmd_help_t help) jabber_conn_status_t conn_status = jabber_get_connection_status(); if ((conn_status != JABBER_DISCONNECTED) && (conn_status != JABBER_STARTED)) { - ui_already_connected(); + cons_show("You are either connected already, or a login is in process."); result = TRUE; } else { char *user = args[0]; diff --git a/src/ui/core.c b/src/ui/core.c index 2a8d1438..79dcc7bf 100644 --- a/src/ui/core.c +++ b/src/ui/core.c @@ -541,18 +541,6 @@ _ui_invalid_command_usage(const char * const usage, void (**setting_func)(void)) } } -static void -_ui_unknown_command(const char * const input) -{ - cons_show("Unknown command: %s", input); -} - -static void -_ui_already_connected(void) -{ - cons_show("You are either connected already, or a login is in process."); -} - static void _ui_disconnected(void) { @@ -1932,6 +1920,4 @@ ui_init_module(void) ui_input_nonblocking = _ui_input_nonblocking; ui_replace_input = _ui_replace_input; ui_invalid_command_usage = _ui_invalid_command_usage; - ui_unknown_command = _ui_unknown_command; - ui_already_connected = _ui_already_connected; } diff --git a/src/ui/ui.h b/src/ui/ui.h index 6039ea80..dc341be8 100644 --- a/src/ui/ui.h +++ b/src/ui/ui.h @@ -160,8 +160,6 @@ void (*ui_input_nonblocking)(void); void (*ui_replace_input)(char *input, const char * const new_input, int *size); void (*ui_invalid_command_usage)(const char * const usage, void (**setting_func)(void)); -void (*ui_unknown_command)(const char * const input); -void (*ui_already_connected)(void); // console window actions void (*cons_show)(const char * const msg, ...); diff --git a/tests/test_cmd_connect.c b/tests/test_cmd_connect.c index 76493115..33f49164 100644 --- a/tests/test_cmd_connect.c +++ b/tests/test_cmd_connect.c @@ -19,11 +19,13 @@ static void test_with_connection_status(jabber_conn_status_t status) { - stub_ui_already_connected(); + mock_cons_show(); CommandHelp *help = malloc(sizeof(CommandHelp)); mock_connection_status(status); + expect_cons_show("You are either connected already, or a login is in process."); + gboolean result = cmd_connect(NULL, *help); assert_true(result); diff --git a/tests/ui/mock_ui.c b/tests/ui/mock_ui.c index 0e01be25..94f8e3c3 100644 --- a/tests/ui/mock_ui.c +++ b/tests/ui/mock_ui.c @@ -82,11 +82,6 @@ char * _stub_ui_ask_password(void) return NULL; } -static -void _stub_ui_already_connected(void) -{ -} - static win_type_t _mock_ui_current_win_type(void) { @@ -263,12 +258,6 @@ stub_cons_show(void) cons_show = _stub_cons_show; } -void -stub_ui_already_connected(void) -{ - ui_already_connected = _stub_ui_already_connected; -} - void stub_ui_handle_recipient_not_found(void) { diff --git a/tests/ui/mock_ui.h b/tests/ui/mock_ui.h index 70c9f3b3..5b984615 100644 --- a/tests/ui/mock_ui.h +++ b/tests/ui/mock_ui.h @@ -66,6 +66,4 @@ void cons_show_roster_expect(GSList *list); void ui_switch_win_expect_and_return(int given_i, gboolean result); -void stub_ui_already_connected(void); - -#endif \ No newline at end of file +#endif diff --git a/themes/batman b/themes/batman new file mode 100644 index 00000000..a99d1dcf --- /dev/null +++ b/themes/batman @@ -0,0 +1,36 @@ +[colours] +bkgnd=default +titlebar=yellow +statusbar=yellow +titlebar.text=black +titlebar.brackets=black +statusbar.text=magenta +statusbar.brackets=black +statusbar.active=magenta +statusbar.new=magenta +main.text=white +input.text=yellow +main.time=white +main.splash=yellow +online=green +away=yellow +chat=green +dnd=green +xa=yellow +offline=grey +typing=cyan +gone=red +error=red +incoming=yellow +roominfo=green +me=black +them=yellow +titlebar.unencrypted=red +titlebar.encrypted=green +titlebar.untrusted=red +titlebar.trusted=green +otr.started.trusted=green +otr.started.untrusted=red +otr.ended=yellow +otr.trusted=green +otr.untrusted=red diff --git a/themes/joker b/themes/joker new file mode 100644 index 00000000..3c8adc39 --- /dev/null +++ b/themes/joker @@ -0,0 +1,36 @@ +[colours] +bkgnd=default +titlebar=magenta +statusbar=magenta +titlebar.text=white +titlebar.brackets=cyan +statusbar.text=green +statusbar.brackets=cyan +statusbar.active=green +statusbar.new=white +main.text=white +input.text=green +main.time=white +main.splash=green +online=green +away=yellow +chat=green +dnd=green +xa=yellow +offline=grey +typing=green +gone=red +error=red +incoming=yellow +roominfo=green +me=magenta +them=green +titlebar.unencrypted=red +titlebar.encrypted=green +titlebar.untrusted=red +titlebar.trusted=green +otr.started.trusted=green +otr.started.untrusted=red +otr.ended=yellow +otr.trusted=green +otr.untrusted=red diff --git a/themes/shade b/themes/shade new file mode 100644 index 00000000..0b61a0f7 --- /dev/null +++ b/themes/shade @@ -0,0 +1,36 @@ +[colours] +bkgnd=default +titlebar=default +statusbar=default +titlebar.text=white +titlebar.brackets=magenta +statusbar.text=magenta +statusbar.brackets=magenta +statusbar.active=white +statusbar.new=green +main.text=white +input.text=white +main.time=magenta +main.splash=magenta +online=green +away=yellow +chat=green +dnd=green +xa=yellow +offline=white +typing=green +gone=red +error=red +incoming=yellow +roominfo=green +me=black +them=magenta +titlebar.unencrypted=red +titlebar.encrypted=green +titlebar.untrusted=red +titlebar.trusted=green +otr.started.trusted=green +otr.started.untrusted=red +otr.ended=yellow +otr.trusted=green +otr.untrusted=red diff --git a/themes/spawn b/themes/spawn new file mode 100644 index 00000000..0703a4e9 --- /dev/null +++ b/themes/spawn @@ -0,0 +1,36 @@ +[colours] +bkgnd=default +titlebar=red +statusbar=red +titlebar.text=yellow +titlebar.brackets=green +statusbar.text=yellow +statusbar.brackets=green +statusbar.active=white +statusbar.new=green +main.text=white +input.text=green +main.time=red +main.splash=red +online=green +away=yellow +chat=green +dnd=green +xa=yellow +offline=grey +typing=green +gone=red +error=red +incoming=yellow +roominfo=green +me=green +them=yellow +titlebar.unencrypted=red +titlebar.encrypted=green +titlebar.untrusted=red +titlebar.trusted=green +otr.started.trusted=green +otr.started.untrusted=red +otr.ended=yellow +otr.trusted=green +otr.untrusted=red