mirror of
https://github.com/profanity-im/profanity.git
synced 2024-11-03 19:37:16 -05:00
Added prefs command
This commit is contained in:
parent
f710d6f26d
commit
5f60e46308
@ -38,6 +38,7 @@ static gboolean _handle_command(const char * const command,
|
||||
const char * const inp);
|
||||
static gboolean _cmd_quit(const char * const inp);
|
||||
static gboolean _cmd_help(const char * const inp);
|
||||
static gboolean _cmd_prefs(const char * const inp);
|
||||
static gboolean _cmd_who(const char * const inp);
|
||||
static gboolean _cmd_ros(const char * const inp);
|
||||
static gboolean _cmd_connect(const char * const inp);
|
||||
@ -73,6 +74,7 @@ static struct cmd_t commands[] = {
|
||||
{ "/dnd", _cmd_dnd },
|
||||
{ "/flash", _cmd_set_flash },
|
||||
{ "/help", _cmd_help },
|
||||
{ "/prefs", _cmd_prefs },
|
||||
{ "/msg", _cmd_msg },
|
||||
{ "/online", _cmd_online },
|
||||
{ "/quit", _cmd_quit },
|
||||
@ -82,7 +84,7 @@ static struct cmd_t commands[] = {
|
||||
{ "/xa", _cmd_xa },
|
||||
};
|
||||
|
||||
static const int num_cmds = 15;
|
||||
static const int num_cmds = 16;
|
||||
|
||||
gboolean process_input(char *inp)
|
||||
{
|
||||
@ -194,6 +196,13 @@ static gboolean _cmd_help(const char * const inp)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean _cmd_prefs(const char * const inp)
|
||||
{
|
||||
cons_prefs();
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean _cmd_ros(const char * const inp)
|
||||
{
|
||||
jabber_conn_status_t conn_status = jabber_connection_status();
|
||||
|
1
src/ui.h
1
src/ui.h
@ -73,6 +73,7 @@ void win_disconnected(void);
|
||||
|
||||
// console window actions
|
||||
void cons_help(void);
|
||||
void cons_prefs(void);
|
||||
void cons_bad_command(const char * const cmd);
|
||||
void cons_show(const char * const cmd);
|
||||
void cons_bad_show(const char * const cmd);
|
||||
|
@ -300,6 +300,38 @@ void win_disconnected(void)
|
||||
}
|
||||
}
|
||||
|
||||
void cons_prefs(void)
|
||||
{
|
||||
cons_show("");
|
||||
cons_show("Current preferences:");
|
||||
cons_show("");
|
||||
|
||||
if (prefs_get_beep())
|
||||
cons_show("Terminal beep : ON");
|
||||
else
|
||||
cons_show("Terminal beep : OFF");
|
||||
|
||||
if (prefs_get_flash())
|
||||
cons_show("Terminal flash : ON");
|
||||
else
|
||||
cons_show("Terminal flash : OFF");
|
||||
|
||||
if (prefs_get_notify())
|
||||
cons_show("Desktop notifications : ON");
|
||||
else
|
||||
cons_show("Desktop notifications : OFF");
|
||||
|
||||
if (prefs_get_showsplash())
|
||||
cons_show("Splash screen : ON");
|
||||
else
|
||||
cons_show("Splash screen : OFF");
|
||||
|
||||
cons_show("");
|
||||
|
||||
if (_curr_prof_win == 0)
|
||||
dirty = TRUE;
|
||||
}
|
||||
|
||||
void cons_help(void)
|
||||
{
|
||||
cons_show("");
|
||||
|
Loading…
Reference in New Issue
Block a user