1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00

Merge branch 'master' into plugins

This commit is contained in:
James Booth 2014-04-12 15:38:16 +01:00
commit 0a90047bf7
11 changed files with 150 additions and 33 deletions

View File

@ -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:

View File

@ -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];

View File

@ -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;
}

View File

@ -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, ...);

View File

@ -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);

View File

@ -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)
{

View File

@ -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

36
themes/batman Normal file
View File

@ -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

36
themes/joker Normal file
View File

@ -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

36
themes/shade Normal file
View File

@ -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

36
themes/spawn Normal file
View File

@ -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