From 0b88ce08cb43a49e12079a376ed1d986de56d77e Mon Sep 17 00:00:00 2001 From: Chris Allegretta Date: Fri, 15 Sep 2000 15:46:32 +0000 Subject: [PATCH] Mouse fix for new key handling code git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@223 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- ChangeLog | 4 ++++ nano.c | 6 ++++++ po/nano.pot | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a0ee1b0..982d757c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -25,6 +25,10 @@ CVS code - do_toggle() - Rewrote function to allow NOHELP toggle to wotk on systems without a working resizewin(). New function window_init(). + mouse_init() + - Add keypad only if mouse support is on, otherwise mouse doesn't + work. I guess you have to choose between having the mouse and + having a working keypad for the time being (thank god for Meta-m). - winio.c: total_refresh() - Added titlebar() call. diff --git a/nano.c b/nano.c index 3394731e..bb61117c 100644 --- a/nano.c +++ b/nano.c @@ -1358,11 +1358,17 @@ void mouse_init(void) #ifndef NANO_SMALL #ifdef NCURSES_MOUSE_VERSION if (ISSET(USE_MOUSE)) { + keypad(edit, TRUE); + keypad(bottomwin, TRUE); + mousemask(BUTTON1_RELEASED, NULL); mouseinterval(50); + } else { mousemask(0, NULL); + keypad(edit, FALSE); + keypad(bottomwin, FALSE); } #endif #endif diff --git a/po/nano.pot b/po/nano.pot index 7653173d..9b26d681 100644 --- a/po/nano.pot +++ b/po/nano.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-09-14 23:37-0400\n" +"POT-Creation-Date: 2000-09-15 11:48-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -675,52 +675,52 @@ msgstr "" msgid "Cannot move bottom win" msgstr "" -#: nano.c:1631 +#: nano.c:1637 #, c-format msgid "%s enable/disable" msgstr "" -#: nano.c:1643 +#: nano.c:1649 msgid "enabled" msgstr "" -#: nano.c:1644 +#: nano.c:1650 msgid "disabled" msgstr "" -#: nano.c:1872 +#: nano.c:1878 msgid "Main: set up windows\n" msgstr "" -#: nano.c:1879 +#: nano.c:1885 msgid "Main: bottom win\n" msgstr "" -#: nano.c:1885 +#: nano.c:1891 msgid "Main: open file\n" msgstr "" -#: nano.c:1919 +#: nano.c:1925 #, c-format msgid "I got Alt-O-%c! (%d)\n" msgstr "" -#: nano.c:1943 +#: nano.c:1949 #, c-format msgid "I got Alt-[-1-%c! (%d)\n" msgstr "" -#: nano.c:1976 +#: nano.c:1982 #, c-format msgid "I got Alt-[-2-%c! (%d)\n" msgstr "" -#: nano.c:2024 +#: nano.c:2030 #, c-format msgid "I got Alt-[-%c! (%d)\n" msgstr "" -#: nano.c:2050 +#: nano.c:2056 #, c-format msgid "I got Alt-%c! (%d)\n" msgstr "" -- 2.39.5