From: Chris Allegretta Date: Sat, 2 Sep 2000 18:44:21 +0000 (+0000) Subject: Changed awkward messages for no help and no wrap mode toggles X-Git-Tag: v0.9.17~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f0f63a82fb5767b3bbd308efa1ed2b68160fd9c7;p=nano.git 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 --- diff --git a/ChangeLog b/ChangeLog index 349d99e7..a023e408 100644 --- 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 index 6b8e06bd..a136cf61 100644 --- 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 index 1059f2af..9393f773 100644 --- 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 index fab63e47..dea1d665 100644 --- 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 index 41a687e5..d94453a0 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-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 \n" "Language-Team: LANGUAGE \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 ""