4 patches (file4, glib2 locale, ...)
Koblinger Egmont
egmont at uhulinux.hu
Sun May 25 11:26:26 UTC 2003
Hi,
I send you four small patches, all of them cleanly apply to both 4.6.0 and
the latest snapshot. Please apply them (in case you don't have a good
reason not to do so :-)))
colors.patch: file copying and similar dialogue windows turned their color
from yellow to blue from 4.5.55 to 4.6.0. However, focused hotkey remained
yellow, which IMHO looks now ugly, blue is much nicer there.
error.patch: g_strerror() in glib2 returns utf8, which appears incorrectly
on the screen. E.g. try to remove a file not owned by you using LANG=hu_HU.
This patch autodetects whether glib2 is used, and inserts an utf8 ->
current locale conversion in this case.
file4.patch: using version 4 of the file command (I've tried with
file-4.02, grab it from ftp://ftp.astron.com/pub/file/) viewing files
inside tarballs often give an error message. The reason is that file 4
prints "/dev/stdin: blahblah" instead of "standard input: blahblah".
hu.po.patch: fixes some minor bugs in the Hungarian translation. Anyway,
it would be a good idea to change src/boxes.c:460 to contain "iso 8859-*"
instead of "iso 8859-1", since this option works perfectly with other iso
charsets as well.
cheers,
Egmont
-------------- next part --------------
diff -urN mc-4.6.0-pre2.orig/src/text.c mc-4.6.0-pre2/src/text.c
--- mc-4.6.0-pre2.orig/src/text.c 2002-10-14 00:12:14.000000000 +0200
+++ mc-4.6.0-pre2/src/text.c 2002-12-29 16:33:38.000000000 +0100
@@ -41,7 +41,7 @@
"dnormal=black,lightgray:"
"dfocus=black,cyan:"
"dhotnormal=blue,lightgray:"
-"dhotfocus=yellow,cyan:"
+"dhotfocus=blue,cyan:"
"viewunderline=brightred,blue:"
"menuhot=yellow,cyan:"
"menusel=white,black:"
-------------- next part --------------
diff -urN mc-4.6.0.orig/src/util.c mc-4.6.0/src/util.c
--- mc-4.6.0.orig/src/util.c 2003-01-28 23:58:23.000000000 +0100
+++ mc-4.6.0/src/util.c 2003-05-25 13:02:31.000000000 +0200
@@ -765,9 +765,17 @@
char *unix_error_string (int error_num)
{
static char buffer [BUF_LARGE];
+#if GLIB_MAJOR_VERSION >= 2
+ gchar *strerror_currentlocale;
+ strerror_currentlocale = g_locale_from_utf8(g_strerror (error_num), -1, NULL, NULL, NULL);
+ g_snprintf (buffer, sizeof (buffer), "%s (%d)",
+ strerror_currentlocale, error_num);
+ g_free(strerror_currentlocale);
+#else
g_snprintf (buffer, sizeof (buffer), "%s (%d)",
g_strerror (error_num), error_num);
+#endif
return buffer;
}
-------------- next part --------------
diff -urN mc-4.6.0.orig/src/ext.c mc-4.6.0/src/ext.c
--- mc-4.6.0.orig/src/ext.c 2002-11-14 08:25:19.000000000 +0100
+++ mc-4.6.0/src/ext.c 2003-04-13 17:12:48.000000000 +0200
@@ -437,6 +437,13 @@
for (content_shift = 15;
content_string[content_shift] == ' ';
content_shift++);
+ } else if (!islocal
+ && !strncmp (content_string, "/dev/stdin:",
+ 11)) {
+ /* Skip "/dev/stdin: " */
+ for (content_shift = 11;
+ content_string[content_shift] == ' ';
+ content_shift++);
}
} else {
/* No data */
-------------- next part --------------
diff -urN mc-4.6.0.orig/po/hu.po mc-4.6.0/po/hu.po
--- mc-4.6.0.orig/po/hu.po 2003-02-05 19:09:47.000000000 +0100
+++ mc-4.6.0/po/hu.po 2003-05-25 12:57:38.000000000 +0200
@@ -934,19 +934,19 @@
#: src/boxes.c:460
msgid "Full 8 bits output"
-msgstr "8-bites kijelz?s"
+msgstr "8 bites kijelz?s"
#: src/boxes.c:460
msgid "ISO 8859-1"
-msgstr "ISO 8859-1"
+msgstr "ISO-8859-*"
#: src/boxes.c:460
msgid "7 bits"
-msgstr "7-bites"
+msgstr "7 bites"
#: src/boxes.c:467 src/boxes.c:591
msgid "F&ull 8 bits input"
-msgstr "&8-bites bevitel"
+msgstr "&8 bites bevitel"
#: src/boxes.c:475 src/boxes.c:572
msgid " Display bits "
@@ -954,7 +954,7 @@
#: src/boxes.c:556 src/boxes.c:578 src/selcodepage.c:71
msgid "Other 8 bit"
-msgstr "Egy?b 8-bites"
+msgstr "Egy?b 8 bites"
#: src/boxes.c:575
msgid "Input / display codepage:"
@@ -2144,7 +2144,7 @@
#: src/filegui.c:772
msgid "&Background"
-msgstr "&H?tt?rben"
+msgstr "H?tt?r&ben"
#: src/filegui.c:782
msgid "&Stable Symlinks"
@@ -3060,7 +3060,7 @@
#: src/main.c:2273
msgid "Use stickchars to draw"
-msgstr "7-bites ASCII karakterekkel val? megjelen?t?s."
+msgstr "7 bites ASCII karakterekkel val? megjelen?t?s."
#: src/main.c:2277
msgid "Enables subshell support (default)"
@@ -3601,7 +3601,7 @@
#: src/util.c:670 src/util.c:696
msgid "%b %e %H:%M"
-msgstr "%b %e %H:%M"
+msgstr "%b %e %H.%M"
#: src/util.c:671 src/util.c:694
msgid "%b %e %Y"
More information about the mc-devel
mailing list