diff options
author | Kalle Wallin <kaw@linux.se> | 2004-07-12 21:17:27 +0000 |
---|---|---|
committer | Kalle Wallin <kaw@linux.se> | 2004-07-12 21:17:27 +0000 |
commit | 2c6af7312cf617f40ab407323fd07a9fa5579495 (patch) | |
tree | fb4f458db5608b60a8b922c2c57015276c846c68 | |
parent | a054f129e4e4eb6baac21c192c1cf49bd6343fc4 (diff) | |
download | mpd-2c6af7312cf617f40ab407323fd07a9fa5579495.tar.gz mpd-2c6af7312cf617f40ab407323fd07a9fa5579495.tar.xz mpd-2c6af7312cf617f40ab407323fd07a9fa5579495.zip |
Mouse support is now optional (enable-mouse)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1861 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/command.c | 4 | ||||
-rw-r--r-- | src/conf.c | 5 | ||||
-rw-r--r-- | src/options.h | 7 | ||||
-rw-r--r-- | src/screen.c | 3 | ||||
-rw-r--r-- | src/screen_help.c | 17 |
6 files changed, 17 insertions, 24 deletions
@@ -3,7 +3,10 @@ at once (-abcde) * conf.c: removed support for the old configuration syntax * list_window.[c.h]: added LW_HIDE_CURSOR_FLAG - * screen_help.c: hide cursor on the help screen + * screen_help.c: hide cursor on the help screen, removed build info + * configure.ac: added --disable-raw-mode + * Added support for SIGSTOP, SIGCONT in raw mode + * Mouse support is now optional (enable-mouse) 2004-07-09 Kalle Wallin <kaw@linux.se> * ncmpc-0.11.0 released (r1820) diff --git a/src/command.c b/src/command.c index 6cf3bf172..c8d43d99d 100644 --- a/src/command.c +++ b/src/command.c @@ -401,8 +401,8 @@ get_keyboard_command_with_timeout(int ms) return CMD_NONE; #ifdef HAVE_GETMOUSE - // if( key==KEY_MOUSE ) - // return CMD_MOUSE_EVENT; + if( key==KEY_MOUSE ) + return CMD_MOUSE_EVENT; #endif return get_key_command(key); diff --git a/src/conf.c b/src/conf.c index 9dacbfbee..f1f1223a3 100644 --- a/src/conf.c +++ b/src/conf.c @@ -57,6 +57,7 @@ #define CONF_AUDIBLE_BELL "audible-bell" #define CONF_VISIBLE_BELL "visible-bell" #define CONF_XTERM_TITLE "set-xterm-title" +#define CONF_MOUSE_EVENTS "enable-mouse" typedef enum { KEY_PARSER_UNKNOWN, @@ -462,6 +463,10 @@ read_rc_file(char *filename, options_t *options) { options->enable_xterm_title = str2bool(value); } + else if( !strcasecmp(CONF_MOUSE_EVENTS, name) ) + { + options->enable_mouse_events = str2bool(value); + } else { match_found = 0; diff --git a/src/options.h b/src/options.h index 5bc24f38d..9cbe38675 100644 --- a/src/options.h +++ b/src/options.h @@ -20,9 +20,10 @@ typedef struct gboolean auto_center; gboolean wide_cursor; gboolean enable_colors; - gboolean audible_bell; /* not implemented */ - gboolean visible_bell; /* not implemented */ - gboolean enable_xterm_title; /* not implemented */ + gboolean audible_bell; + gboolean visible_bell; + gboolean enable_xterm_title; + gboolean enable_mouse_events; } options_t; diff --git a/src/screen.c b/src/screen.c index c2c1e7fda..9ea46f739 100644 --- a/src/screen.c +++ b/src/screen.c @@ -478,7 +478,8 @@ screen_init(mpdclient_t *c) timeout(SCREEN_TIMEOUT); /* initialize mouse support */ #ifdef HAVE_GETMOUSE - mousemask(ALL_MOUSE_EVENTS, NULL); + if( options.enable_mouse_events ) + mousemask(ALL_MOUSE_EVENTS, NULL); #endif if( COLS<SCREEN_MIN_COLS || LINES<SCREEN_MIN_ROWS ) diff --git a/src/screen_help.c b/src/screen_help.c index 4d1db1594..68021c651 100644 --- a/src/screen_help.c +++ b/src/screen_help.c @@ -111,23 +111,6 @@ static help_text_row_t help_text[] = { 0, CMD_SCREEN_UPDATE, NULL }, { 0, CMD_NONE, NULL }, - { 0, CMD_NONE, NULL }, - { 1, CMD_NONE, "ncmpc build information" }, - { 2, CMD_NONE, NULL }, - { 0, CMD_NONE, " Version : " VERSION }, - { 0, CMD_NONE, " Configuration dirs : ~/.ncmpc, " SYSCONFDIR "/" PACKAGE }, -#ifdef ENABLE_NLS - { 0, CMD_NONE, "NLS support : yes" }, -#else - { 0, CMD_NONE, "NLS support : no" }, -#endif -#ifdef ENABLE_KEYDEF_SCREEN - { 0, CMD_NONE, "Key Editor : yes" }, -#else - { 0, CMD_NONE, "Key Editor : no" }, -#endif - - { 0, CMD_NONE, NULL }, {-1, CMD_NONE, NULL } }; |