commit f0f63a82fb5767b3bbd308efa1ed2b68160fd9c7
parent a547fd1e0e7c2091f428bc8a75dfd5f4958b2e41
Author: Chris Allegretta <chrisa@asty.org>
Date: Sat, 2 Sep 2000 18:44:21 +0000
Changed awkward messages for no help and no wrap mode toggles
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@199 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
5 files changed, 33 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -14,11 +14,18 @@ CVS Code
functions. Thanks Mini editor team :->
- Changed last_search and last_replace vars to statically
allocated (hence nulled) and moved to search.c (Matt Kraai).
+- global.c:
+ toggle_init()
+ - Changed "No auto wrap" and "No help mode" to "Auto wrap" and
+ "Help mode". See the change to do_toggle() below.
- nano.c:
do_mouse()
- Patch for handling lines w/tabs and mouse better (Ben Roberts).
do_wrap()
- Made wrapping code less ambitious.
+ do_toggle()
+ - Added checks for no help and no wrap mode, and print opposite
+ enable/disable message.
- winio.c:
total_refresh()
- Added edit_refresh() call to actually update the screen if messy.
diff --git a/global.c b/global.c
@@ -118,12 +118,12 @@ void toggle_init(void)
toggle_const_msg = _("Constant cursor position");
toggle_autoindent_msg = _("Autoindent");
toggle_suspend_msg = _("Suspend");
- toggle_nohelp_msg = _("No help mode");
+ toggle_nohelp_msg = _("Help mode");
toggle_picomode_msg = _("Pico messages");
toggle_mouse_msg = _("Mouse support");
toggle_cuttoend_msg = _("Cut to end");
toggle_regexp_msg = _("Regular expressions");
- toggle_wrap_msg = _("No auto wrap");
+ toggle_wrap_msg = _("Auto wrap");
toggle_init_one(&toggles[0], TOGGLE_CONST_KEY, toggle_const_msg,
CONSTUPDATE);
diff --git a/nano.c b/nano.c
@@ -1595,11 +1595,23 @@ void help_init(void)
void do_toggle(int which)
{
#ifndef NANO_SMALL
+ char *enabled = "enabled";
+ char *disabled = "disabled";
+
+
if (ISSET(toggles[which].flag)) {
- statusbar("%s %s", toggles[which].desc, "disabled");
+ if (toggles[which].val == TOGGLE_NOHELP_KEY ||
+ toggles[which].val == TOGGLE_WRAP_KEY)
+ statusbar("%s %s", toggles[which].desc, enabled);
+ else
+ statusbar("%s %s", toggles[which].desc, disabled);
UNSET(toggles[which].flag);
} else {
- statusbar("%s %s", toggles[which].desc, "enabled");
+ if (toggles[which].val == TOGGLE_NOHELP_KEY ||
+ toggles[which].val == TOGGLE_WRAP_KEY)
+ statusbar("%s %s", toggles[which].desc, disabled);
+ else
+ statusbar("%s %s", toggles[which].desc, enabled);
SET(toggles[which].flag);
}
switch (toggles[which].val) {
diff --git a/po/cat-id-tbl.c b/po/cat-id-tbl.c
@@ -31,12 +31,12 @@ const struct _msg_ent _msg_tbl[] = {
{"Constant cursor position", 22},
{"Autoindent", 23},
{"Suspend", 24},
- {"No help mode", 25},
+ {"Help mode", 25},
{"Pico messages", 26},
{"Mouse support", 27},
{"Cut to end", 28},
{"Regular expressions", 29},
- {"No auto wrap", 30},
+ {"Auto wrap", 30},
{"Invoke the help menu", 31},
{"Write the current file to disk", 32},
{"Exit from nano", 33},
diff --git 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-02 13:45-0400\n"
+"POT-Creation-Date: 2000-09-02 14:48-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -120,7 +120,7 @@ msgid "Suspend"
msgstr ""
#: global.c:121
-msgid "No help mode"
+msgid "Help mode"
msgstr ""
#: global.c:122
@@ -140,7 +140,7 @@ msgid "Regular expressions"
msgstr ""
#: global.c:126
-msgid "No auto wrap"
+msgid "Auto wrap"
msgstr ""
#: global.c:166
@@ -675,24 +675,24 @@ msgstr ""
msgid "Cannot move bottom win"
msgstr ""
-#: nano.c:1806
+#: nano.c:1818
msgid "Main: set up windows\n"
msgstr ""
-#: nano.c:1821
+#: nano.c:1833
msgid "Main: bottom win\n"
msgstr ""
-#: nano.c:1827
+#: nano.c:1839
msgid "Main: open file\n"
msgstr ""
-#: nano.c:1895
+#: nano.c:1907
#, c-format
msgid "I got Alt-[-%c! (%d)\n"
msgstr ""
-#: nano.c:1921
+#: nano.c:1933
#, c-format
msgid "I got Alt-%c! (%d)\n"
msgstr ""