In the case where insufficient rights to the contents of the directory ~/.mc/* to
save preferences I get "settings saved in ~ /.mc/ini", but really nothing is saved.
It would be correct to issue a message like "Not enough permissions to save the ~/.mc/ini"
Also, when autosave should be issued a message about the lack of rights.
This branch will check rights of config-files.
testCase:
*) chmod 0400 ~/.mc
*) run mc
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 1750_view_next_prev_file:
Sync argument name of mcview_viewer() function in header and in source files.
Ticket #1750: fix of view next/prev file in viewer.
To view the next (C-f) of previous (C-f) file in viewer,
the quit from viewer is required now.
This commit restores the previous behavior.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Attempting to open a .tlz lzma archive fails - error 'xxx.tlz doesn't look like a tar archive'.
If the file is renamed to .tar.lzma, it is opened without problems.
Fix issue: add recognize of '.tlz' extention.
Refactoring: avoid calls of strlen() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* When try to replace existing file in background operation
assertion raised (created operations for initialization ctx->ui for background):
** (mc:25716): CRITICAL **: file_progress_real_query_replace: assertion `ctx->ui != NULL' failed
* Process has been already done, but still draw in list (C-x j)
* Process is stopped or worked, remove operation don't hide process from list, but kill it
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Test case:
* create file with name "test" in "tmp" directory (for example)
* create directory with same name ("test") in other "tmp2" directory (for example)
* try to copy or move file "test" into "tmp2" in background mode
* wait for some time
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
mc 4.7.0-pre1 introduced dynamic "Save attributes" checkbox value in Copy/Move dialog.
But code is Linux-specific, and not even isolated by macros.
I suggest to add code specific for BSD and SVR4 systems.
In BSD systems (MacOS X, NetBSD, FreeBSD) there is statfs.f_fstypename which contains name of filesystem.
Valid FS names are: msdos, msdosfs (FreeBSD), ntfs, smbfs, procfs, fusefs (BSD), fusefs_subfstype (Mac)
In SVR4 systems (Solaris and other SVR4 Unixes) there are statvfs.f_basetype and statvfs
syscall instead of statfs and also autotools define STAT_STATVFS.
Valid FS names are: pcfs, proc, ntfs, fuse, smbfs
(Note that NetBSD 3.0+ also use statvfs but with BSD syntax.)
For all other OSes we simply return 1.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Currently, there is no way to change the defaults. The file mask
dialog options are not persistent.
Added new config option 'copymove_persistent_attr'. If this option is equal to '0'
then 'Preserve attributes' in copy/move dialog will always switched off.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* 1674_syntax_highlightings:
Fixed error of opening yum *.repo files.
unknown.syntax to something more useful
Yacc/Bison syntax added
added new syntax file 'filehighlight.syntax'; hah
Syntax file for java .properties format
IMO, it would be nice to use attached unknown.syntax
file from http://mc.linuxinside.com/cgi-bin/dir.cgi instead the current one.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
As the format is basically a set of key/value pairs, but allows a number of ways to write them,
syntax file tries hard to highlight them all correctly. Plus highlights some specific tokens that can be found in values.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This patch was grabbed from Russian fork (ru-fork). Original commit message:
[COMMAND LINE]: Fix SUSE gabage, letter B in command prompt under root! Yessssssss! :)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This is incomplete copy of same glib-function.
For older glib (less than 2.13) functional is enought.
For full version of glib welcome to glib update.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* HACK_menu:
Added new keybinding files in mc.spec.
Show actual shortcuts in editor menu.
Implemented default actual shortcuts for main menu.
Implemented display of actual shortcuts in main menu.
Add support for multi-hotkeys in editor (like a ctrl-x,t).
Added default keybinding strings.
Added missed '#include "fileloc.h"' in main.c.
Some refactoring.
Reimplemented keybindings parser.
Use commands instead of callbacks to execute menu items.
Fixed key translation in editor.
Use commands instead of callbacks to execute menu items.
Menu fixes and optimization.
New menu engine: use GList instead of GPtrArray.
Menu: handle HOME and END keys.
Ticket #1563: Modified menu engine to create and modify menu dynamically.
Key emulation in editor was removed. Default key emulation
is stored in misc/mc.keymap.default file. Emacs key emulation
is stored in misc/mc.keymap.emacs.
Editor options dialog was redesigned.
Shortcut parser was fixed.
Fixes after rebase to recent master.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Many shortcuts are not defined in keymap file and therefore
not displayed in menu.
Editor menu is not reimplemented yet.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Renamed name_key_map_t to name_keymap_t.
Renamed global_key_map_t to global_keymap_t.
Use more '#ifdef USE_INTERNAL_EDIT' preprocessor directives
Removed unused variables and structure members.
Aplly const modificator to keybind argument of keybind_cmd_bind().
Aplly const modificator to keyname argument of lookup_action().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
New parser allows get the string representation of menu shortcuts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>