1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Renamed console window functions

This commit is contained in:
James Booth 2012-02-12 22:23:51 +00:00
parent 9e63c4a0f6
commit bff2210b7f
4 changed files with 16 additions and 14 deletions

View File

@ -18,7 +18,7 @@ int handle_start_command(char *cmd)
if (strcmp(cmd, "/quit") == 0) {
result = QUIT_PROF;
} else if (strncmp(cmd, "/help", 5) == 0) {
win_cons_help();
cons_help();
result = AWAIT_COMMAND;
} else if (strncmp(cmd, "/connect ", 9) == 0) {
char *user;
@ -32,7 +32,7 @@ int handle_start_command(char *cmd)
jabber_connect(user, passwd);
result = START_MAIN;
} else {
win_cons_bad_command(cmd);
cons_bad_command(cmd);
result = AWAIT_COMMAND;
}
@ -71,7 +71,7 @@ static int _cmd_quit(void)
static int _cmd_help(void)
{
win_cons_help();
cons_help();
return TRUE;
}
@ -107,7 +107,7 @@ static int _cmd_close(char *cmd)
if (win_in_chat()) {
win_close_win();
} else {
win_cons_bad_command(cmd);
cons_bad_command(cmd);
}
return TRUE;
@ -121,7 +121,7 @@ static int _cmd_default(char *cmd)
jabber_send(cmd, recipient);
win_show_outgoing_msg("me", recipient, cmd);
} else {
win_cons_bad_command(cmd);
cons_bad_command(cmd);
}
return TRUE;

View File

@ -157,19 +157,19 @@ static int _roster_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanz
log_msg(CONN, "ERROR: query failed");
else {
query = xmpp_stanza_get_child_by_name(stanza, "query");
win_cons_show("Roster:");
cons_show("Roster:");
for (item = xmpp_stanza_get_children(query); item;
item = xmpp_stanza_get_next(item)) {
if ((name = xmpp_stanza_get_attribute(item, "name"))) {
char line[200];
sprintf(line, " %s (%s)", name,
xmpp_stanza_get_attribute(item, "jid"));
win_cons_show(line);
cons_show(line);
} else {
char line[200];
sprintf(line, " %s",
xmpp_stanza_get_attribute(item, "jid"));
win_cons_show(line);
cons_show(line);
}
}
}

View File

@ -191,7 +191,7 @@ void win_show_outgoing_msg(char *from, char *to, char *message)
}
}
void win_cons_help(void)
void cons_help(void)
{
char tstmp[80];
get_time(tstmp);
@ -224,7 +224,7 @@ void win_cons_help(void)
}
}
void win_cons_show(char *msg)
void cons_show(char *msg)
{
char tstmp[80];
get_time(tstmp);
@ -238,7 +238,7 @@ void win_cons_show(char *msg)
}
}
void win_cons_bad_command(char *cmd)
void cons_bad_command(char *cmd)
{
char tstmp[80];
get_time(tstmp);

View File

@ -42,8 +42,10 @@ int win_in_chat(void);
void win_get_recipient(char *recipient);
void win_show_incomming_msg(char *from, char *message);
void win_show_outgoing_msg(char *from, char *to, char *message);
void win_cons_help(void);
void win_cons_bad_command(char *cmd);
void win_cons_show(char *cmd);
// console window actions
void cons_help(void);
void cons_bad_command(char *cmd);
void cons_show(char *cmd);
#endif