Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Collect keybind-related variables in src/keybind.[ch] files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
init_translation_table() now returnes newly-allocated string
instead of pointer to the static buffer.
Thanks Vit Rosin for original patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added src/diffviewer/ydiff.[ch] into project tree
added entry 'View diff files' into 'Command' menu
added 'diffviewer' color pairs
fixed Makefile and configure.am
added new binding CmdDiffView into '[main]' section
Big thanx to 'Daniel Borca <dborca@yahoo.com>' for ydiff
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Added diffviewer own library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Fixed CFLAGS for diffviewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
changed skins, added section
[diffviewer]
added=
changedline=
changednew=
changed=
removed=
folder=
error=
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Reimplementation of hardcoded shortcuts to keybindings.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
added new option quick_search_case_sensitive, with 3 position are: 0, 1, 2.
if "0", quick search in case insensitive
if "1", quick search in case sensitive
if "2", get from panel "case_sensitive"
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Problem description:
1. Run mc as
mc /#ftp:user@server
2. If FTP server asks password, MC shows the password dialog window.
3. If type the first symbol in input line, MC crashes.
Bug cause:
MC asks ftp password before initialize of input line keybindings.
Solution:
Reimplemented MC startup sequence.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Fixed showing of datetime format in various locales (such as Polish locale)
Added new options in config file:
[Misc]
...
timeformat_recent=%d.%m.%y %H:%M
timeformat_old=%d.%m.%y %H:%M
...
where
timeformat_recent - for files with mtime between now
and "6 moths old" (like "Nov 2 00:56")
timeformat_old - for other files (like "Jun 23 2007")
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added support of autodetect codepages via 'enca' program.
New parameter in user configuration file (~/.mc/ini):
[Misc]
autodetect_codeset=(one of `enca --list languages | cut -d : -f1`)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Little code cleanup.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Type accuracy. Added missing includes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* moved src/fileloc.h into lib/fileloc.h
* moved src/timefmt.h into lib/timefmt.h
* removed unneedded includes into src/util.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* moved src/global.h into lib/global.h
* moved glibcompat.[ch] from ./src/ into ./lib/
* moved fs.h from ./src/ into ./lib/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Initial step: code refactoring:
* small code formatting;
* type accuracy;
* introduce new type 'panel_view_mode_t' for panel type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The new section [FindFile] was created for find file options.
The find_ignore_dirs key in Misc section is obsolete now.
The ignore_dirs key in FindFile section is used instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Added option 'auto_save_setup_panels' into [Midnight-Commander] section of ini-file.
If no specified, value of this option is equal to value of 'auto_save_setup' option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Since mc-4.7.0-pre1 was added charset confirmation if charset was changed.
This commit was adds automatic recognize of system charset and fix in current
config. Also, now contig file will untouched if 'Auto save setup' option is switched off.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
If ~/.mc/panels.ini have incorrect value of 'sort_order' key, then mc will crashed.
Fix issue: Now default sort_order for incorrect value is 'name' (sort by name)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
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>
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>
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>
* Added common functions for work with backups of main config files.
* Fixed permissions of ~/.mc/ini;
* Fixed permissions of ~/.mc/filepos
* Fixed permissions of ~/.mc/hotlist
* Fixed permissions of ~/.mc/Tree
* Fixed ownership for ~/.mc/hotlist file
* Changed definitions of config files. Now used constants from src/fileloc.h
Also, added ability for change mc user home dir. Just type:
{{{
make CFLAGS='-DMC_USERCONF_DIR=\".mc2\"'
}}}
And you will have different config files (very usefull for testing or development).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>