diff options
Diffstat (limited to 'src/command.c')
-rw-r--r-- | src/command.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/command.c b/src/command.c index ba69da15..e0c18e8e 100644 --- a/src/command.c +++ b/src/command.c @@ -119,6 +119,7 @@ static gboolean _cmd_set_gone(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_autoping(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_titlebar(gchar **args, struct cmd_help_t help); static gboolean _cmd_set_autoaway(gchar **args, struct cmd_help_t help); +static gboolean _cmd_set_mouse(gchar **args, struct cmd_help_t help); static gboolean _cmd_vercheck(gchar **args, struct cmd_help_t help); static gboolean _cmd_away(gchar **args, struct cmd_help_t help); static gboolean _cmd_online(gchar **args, struct cmd_help_t help); @@ -438,6 +439,17 @@ static struct cmd_t setting_commands[] = "Possible properties are 'version'.", NULL } } }, + { "/mouse", + _cmd_set_mouse, parse_args, 1, 1, + { "/mouse on|off", "Use profanity mouse handling.", + { "/mouse on|off", + "-------------", + "If set to 'on', profanity will handle mouse actions, which enabled scrolling the main window with the mouse wheel.", + "To select text, use the shift key while selcting an area.", + "If set to 'off', profanity leaves mouse handling to the terminal implementation.", + "The default is 'on', if you have strange behaviour with mouse actions, set to 'off'.", + NULL } } }, + { "/chlog", _cmd_set_chlog, parse_args, 1, 1, { "/chlog on|off", "Chat logging to file", @@ -911,6 +923,8 @@ _cmd_complete_parameters(char *input, int *size) prefs_autocomplete_boolean_choice); _parameter_autocomplete(input, size, "/chlog", prefs_autocomplete_boolean_choice); + _parameter_autocomplete(input, size, "/mouse", + prefs_autocomplete_boolean_choice); _parameter_autocomplete(input, size, "/history", prefs_autocomplete_boolean_choice); _parameter_autocomplete(input, size, "/vercheck", @@ -2090,6 +2104,13 @@ _cmd_set_chlog(gchar **args, struct cmd_help_t help) } static gboolean +_cmd_set_mouse(gchar **args, struct cmd_help_t help) +{ + return _cmd_set_boolean_preference(args[0], help, + "Mouse handling", prefs_set_mouse); +} + +static gboolean _cmd_set_history(gchar **args, struct cmd_help_t help) { return _cmd_set_boolean_preference(args[0], help, |