Code

Mouse support is now optional (enable-mouse)
authorKalle Wallin <kaw@linux.se>
Mon, 12 Jul 2004 21:17:27 +0000 (21:17 +0000)
committerKalle Wallin <kaw@linux.se>
Mon, 12 Jul 2004 21:17:27 +0000 (21:17 +0000)
git-svn-id: https://svn.musicpd.org/ncmpc/trunk@1861 09075e82-0dd4-0310-85a5-a0d7c8717e4f

ChangeLog
src/command.c
src/conf.c
src/options.h
src/screen.c
src/screen_help.c

index 0a995d862443f68b08207aef94b4df52a6de097a..5e2279601cf8a0e3105d4d449125cbe99ead5fb6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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)
index 6cf3bf1720d3d534e443be900a8c0a0461ef3eb9..c8d43d99dcdaa607ab36351c1a76f43f74c7761f 100644 (file)
@@ -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);
index 9dacbfbee9bac75dda8f50bc45f7c69ce79b77d5..f1f1223a3e10d839b4f8ffac0847e752e476a8aa 100644 (file)
@@ -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;
index 5bc24f38d156a037f2444b2a49b0093f42dd0939..9cbe38675dcd0170a75cd578adb85433592bfbd3 100644 (file)
@@ -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;
 
index c2c1e7fdaeff5c69fdbb8fabea8b175592c35e83..9ea46f739c36bcd237e7552770e3214d127f1cfb 100644 (file)
@@ -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 )
index 4d1db15940f4a978c3c6e3649b480ba22661618f..68021c6515c558563c8ba3259ffd64a55ed83678 100644 (file)
@@ -110,23 +110,6 @@ static help_text_row_t help_text[] =
   { 0, CMD_DELETE,         NULL },
   { 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 }
 };