Merge branch '2570_cleanup'

* 2570_cleanup:
  Fixed vfs descriptions.
  Do not mark the text after opening the file.
  Ticket 2570: Code cleanup
This commit is contained in:
Slava Zanko 2011-07-11 20:24:40 +03:00
commit 52aecfdfa2
28 changed files with 25 additions and 29 deletions

View File

@ -3,6 +3,10 @@ AUTOMAKE_OPTIONS = 1.5
SUBDIRS = intl po lib src doc contrib misc
if HAVE_TESTS
SUBDIRS += tests
endif
EXTRA_DIST =
dist_noinst_SCRIPTS = build-glib2.sh

View File

@ -596,10 +596,11 @@ po/Makefile.in
if test x$enable_tests != xno; then
AC_CONFIG_FILES([
lib/tests/Makefile
lib/tests/mcconfig/Makefile
lib/tests/search/Makefile
lib/tests/vfs/Makefile
tests/Makefile
tests/lib/Makefile
tests/lib/mcconfig/Makefile
tests/lib/search/Makefile
tests/lib/vfs/Makefile
])
fi

View File

@ -1,9 +1,5 @@
SUBDIRS = event filehighlight mcconfig search skin tty vfs strutil widget .
if HAVE_TESTS
SUBDIRS += tests
endif
if ENABLE_MCLIB
LIB_VERSION=`echo $(LIBMC_VERSION) | \
tr '.' ' '| \

View File

@ -2072,7 +2072,7 @@ edit_insert_file (WEdit * edit, const char *filename)
edit_insert (edit, buf[i]);
}
/* highlight inserted text then not persistent blocks */
if (!option_persistent_selections)
if (!option_persistent_selections && edit->modified)
{
edit_set_markers (edit, edit->curs1, current, 0, 0);
if (edit->column_highlight)

View File

@ -16,23 +16,23 @@ stored when configured or compiled, like /usr/local/libexec or /usr/libexec).
Assign a vfs suffix. For example, if you have .zip file, and would like
to see what's inside it, path will be
/anypath/my.zip#uzip/some_path/...
/anypath/my.zip/uzip://some_path/...
In this example, .zip is suffix, but I call vfs 'uzip'. Why? Well,
what this vfs essentially does is UNzip. UN is too long, so I choosed
U. Note that sometime in future filesystem like zip may exist: It will
take whole tree and create .zip file from it. So /usr#zip will be
take whole tree and create .zip file from it. So /usr/zip:// will be
zipfile containing whole /usr tree.
If your vfs does not require file to work on, add '+' to the end of name.
Note, that trailing '+' in file name is not a part of vfs name, it is
just an vfs attribue. So you have not use it in vfs commands:
cd #rpms
cd rpms://
is correct command, and
cd #rpms+
cd rpms+://
is incorrect command.
@ -132,7 +132,7 @@ show on the console or can be redirected to a file.
* Putting it to use
----------------------------------------------------------
The file .mc.ext in a home directory, and in mc's user directory (commonly
/usr/local/lib/mc), contains instructions for operations on files depending
/etc/mc), contains instructions for operations on files depending
on filename extensions. It is well documented in other files in this
distribution, so here are just a few notes specifically on use of the
Virtual File System you just built.
@ -178,14 +178,14 @@ subject. The sum of this is the .mc.ext entry:
# zip
regex/\.(zip|ZIP)$
Open=%cd zip:%d/%p
Open=%cd %p/uzip://
View=%view{ascii} unzip -v %f
Icon=zip.xpm
Extract=unzip %f '*'
Add an entry like this to the .mc.ext file in a user's home directory, If you
want others to have it, add it to the mc.ext file in the mc system directory,
often /usr/local/lib/mc/mc.ext. Notice this file is not prepended with a dot.
often /etc/mc/mc.ext. Notice this file is not prepended with a dot.
Once all this is done, and things are in their proper places, exit mc if you
were using it, and restart it so it picks up the new information.

View File

@ -21,7 +21,7 @@ La prima
Assegnate un suffisso vfs. Per esempio, se avete un file .zip e vorreste
vedere cosa c'è dentro di esso, il percorso sarebbe
/qualsiasipercorso/my.zip#uzip/unpercorso/...
/qualsiasipercorso/my.zip/uzip://unpercorso/...
Poi basta aggiungere una linea nel file extfs.ini contenente solo quella
estensione. Se il vostro vfs non richiede file di lavoro, aggiungete
@ -31,7 +31,7 @@ In questo esempio, .zip
Perché? Beh, quello che fa vfs è essenzialmente UNzip. UN è troppo lungo
così è stato scelto U. Notare che in futuro un filesystem come zip potrà
esistere: prenderà l'intero albero e creerà un file zip da esso. Così
/usr:zip sarà un file zip contenente l'intero albero /usr.
/usr/zip:// sarà un file zip contenente l'intero albero /usr.
La seconda potrebbe richiedere un po' di conoscenza di programmazione shell/c:
si deve creare un prefisso di programma (con i permessi di esecuzione) in
@ -137,7 +137,7 @@ risultato mostrato in console o redirezionato in un file.
* Messa in uso
----------------------------------------------------------
Il file .mc.ext nella directory home e nella directory utente di mc
(normalmente /usr/local/lib/mc), contiene le istruzioni per le operazioni
(normalmente /etc/mc), contiene le istruzioni per le operazioni
sui files a seconda dell'estensione. E' ben documentato in altri file in
questa distribuzione perciò qui si darà solo qualche nota specificatamente
sull'uso del File System Virtuale che si è appena creato.
@ -183,14 +183,14 @@ c'
# zip
regex/\.(zip|ZIP)$
Open=%cd zip:%d/%p
Open=%cd %p/uzip://
View=%view{ascii} unzip -v %f
Icon=zip.xpm
Extract=unzip %f '*'
Aggiungere una voce come questa al file .mc.ext nella directory home dell'utente.
Se volete che altri la vedano, aggiungetela nel file mc.ext nella directory di
sistema di mc spesso in /usr/local/lib/mc/mc.ext. Notare che questo file non
sistema di mc spesso in /etc/mc/mc.ext. Notare che questo file non
ha un punto iniziale.
Una volta che tutto questo è fatto e le cose sono al loro posto, uscite da mc

View File

@ -34,13 +34,7 @@
# Make sure that boto <http://code.google.com/p/boto> (python-boto in Debian) is installed.
# Preferably pytz (package python-tz in Debian) should be installed as well.
#
# Save as executable file /share/mc/extfs/s3 (or wherever your mc expects to find extfs modules)
# Add the the following to your extfs.ini (might exists as /usr/share/mc/extfs/extfs.ini):
# ----- begin extfs.ini -----
# # Amazon S3
# s3:
# ----- end extfs.ini -----
#
# Save as executable file /usr/libexec/mc/extfs/s3 (or wherever your mc expects to find extfs modules)
#
# Settings: (should be set via environment)
# Required:
@ -52,7 +46,7 @@
#
#
# Usage:
# Open dialog "Quick cd" (<alt-c>) and type: #s3 <enter> (or simply type ''cd #s3'' in shell line)
# Open dialog "Quick cd" (<alt-c>) and type: s3:// <enter> (or simply type `cd s3://' in shell line)
#
#
# History:

1
tests/Makefile.am Normal file
View File

@ -0,0 +1 @@
SUBDIRS = lib