diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command.c | 11 | ||||
-rw-r--r-- | src/ui.h | 1 | ||||
-rw-r--r-- | src/windows.c | 32 |
3 files changed, 43 insertions, 1 deletions
diff --git a/src/command.c b/src/command.c index 05122a96..fb32d683 100644 --- a/src/command.c +++ b/src/command.c @@ -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(); diff --git a/src/ui.h b/src/ui.h index 6e33efc6..eb10fbad 100644 --- a/src/ui.h +++ b/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); diff --git a/src/windows.c b/src/windows.c index fe3d0b63..aa401e85 100644 --- a/src/windows.c +++ b/src/windows.c @@ -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(""); |