Commit Graph

188 Commits

Author SHA1 Message Date
Slava Zanko 93dbc46e9c Reorganization of sources. Part 1.
* 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>
2010-01-26 10:30:23 +02:00
Slava Zanko 39d5b94cac Reorganized pathes to files in '#include' directives 2010-01-26 10:30:22 +02:00
Slava Zanko ddb9ada2e8 Changes in sources matched with mass movement of $(srcdir)/src/*/ into $(srcdir)/lib/*/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:22 +02:00
Slava Zanko 43805741aa Changes in sources matched with movement of $(srcdir)/vfs into $(srcdir)/lib/vfs/mc-vfs
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:21 +02:00
Slava Zanko f90725ad0d Changes in sources matched with movement of $(srcdir)/edit into $(srcdir)/src/editor
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-01-26 10:30:19 +02:00
Ilia Maslakov 1eeffc2803 added new parameter mcview_eof into ini-file
if mcview_eof defined show mcview_eof as EOF

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-01-19 19:15:30 +00:00
Andrew Borodin 6123cac32b Ticket #1954: check pointers to GArray before deletion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-01-12 13:42:02 +00:00
Andrew Borodin 1055b85072 Ticket #1918: viewer in QuickView mode corrupts screen.
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>
2010-01-06 18:12:53 +03:00
Andrew Borodin 462315fe09 Save find file options in user configuration file.
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>
2010-01-06 18:04:50 +03:00
Ilia Maslakov 7c2692cf8c add new etitor parameter editor_show_right_margin
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-01-06 14:26:02 +03:00
Enrico Weigelt, metux IT service ec1a52fb0a VFS: renamed USE_VFS to ENABLE_VFS 2009-12-30 11:06:11 +02:00
Enrico Weigelt, metux IT service 80b3776c20 VFS: fixed lots of missing includes to vfs/vfs.h 2009-12-30 11:06:09 +02:00
Slava Zanko 4f88a84526 Ticket #1663: Panels state saves and restores despite disabled 'Auto save setup'
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>
2009-12-25 13:23:05 +02:00
Vit Rosin a7110419a6 missing check in src_mcconfig_get.c-mc_config_get_groups()_-2
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-12-16 11:10:43 +02:00
Slava Zanko 59efad629f Ticket #1613: remove charset confirmation on startup
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>
2009-11-19 10:36:37 +02:00
Andrew Borodin ccabd60ffc Implemented keybindings for Help window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin da33e767e9 Type accuracy and code clean up.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin efdb645468 Implemeted keybindings for Tree widget
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
kenny 0c309724a5 Ticket #1776: save flags of select/unselet file group.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-18 14:21:08 +03:00
Slava Zanko 90a7ad8528 Ticket #1790: mc crashes on start
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>
2009-11-11 11:33:06 +02:00
Martin Petricek 2cfed22012 Ticket #1746: Setting "Use passive mode over proxy" is not remembered
Fix: "Use passive mode over proxy" was not remembered in config

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-03 12:20:42 +02:00
Slava Zanko 51f10b3038 Cleanup of code for compile with new warnings options for compilator
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-30 20:36:48 +02:00
Andrew Borodin 91a4598b54 Ticket #1755: code cleanup before 4.7.0-pre4 release.
Free some variables allocated at MC startup.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-30 14:41:03 +02:00
Slava Zanko c9b4b0159d Ticket #1656: Incorrect processing of cases the lack of rights to save preferences.
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>
2009-10-28 13:37:39 +02:00
Slava Zanko 27cc9ac15e Ticket #119: Persistent global configuration option for "Preserve attributes" wanted
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>
2009-10-27 23:20:48 +02:00
Ilia Maslakov 467d833ac3 Ticket #46 (mcedit: check POSIX newline at end of file)
* added warning dialog (showed before save/save as)
    * added option "editor_check_new_line"
    * changed dialog 'Edit Save Mode' (added check box 'Check POSIX new line')

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

    * Redesing of 'Edit Save Mode' dialog.
    * Added hotkeys in 'Edit Save Mode' dialog.
    * Modified warning message, minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-27 12:08:45 +00:00
Andrew Borodin 7e33c12685 Show actual shortcuts in editor menu.
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>
2009-10-26 16:15:32 +03:00
Andrew Borodin 41989bd0c6 Implemented display of actual shortcuts in main menu.
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>
2009-10-26 16:15:31 +03:00
Ilia Maslakov 82b7c4fdee Add support for multi-hotkeys in editor (like a ctrl-x,t).
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-26 16:15:31 +03:00
Andrew Borodin b4b30941f5 Some refactoring.
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>
2009-10-26 16:15:31 +03:00
Ilia Maslakov de56559df5 Reimplemented keybindings parser.
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>
2009-10-26 16:15:31 +03:00
Slava Zanko 14be06d050 Reorganize work with files. Fixed permissions of files in mc home dir. All file names now accumulated into src/fileloc.h
* 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>
2009-10-07 12:01:05 +03:00
Slava Zanko 7896ea84f6 Added handlers for panel sort keybind actions.
* PanelSelectSortOrder - show 'Sort order' dialog
 * PanelToggleSortOrderPrev - toggle next sort type (or reverse sort order)
 * PanelToggleSortOrderNext - toggle previous sort type (or cancel reverse)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko 82a384d8f4 Some changes for better toggle sort types of panel.
Now we have just one array for formats of panel and for sort types.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:53 +03:00
IMDagger 6a4124c8ea Ticket #38: fixed saving other_dir path into panels.ini.
Save Info, Tree and etc. panels state, and restore after.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-05 13:09:41 +04:00
Slava Zanko 5bdd17a6ec Rename widget_* functions and variables into input_* functions and variables.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-29 17:42:36 +00:00
Slava Zanko 3f95f87f5e Rename Widget* events into Input* events.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-29 17:42:36 +00:00
Slava Zanko 07777d282f Added --keymap command line option
Also, anned more pathes for found standart keymap file.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-29 17:42:34 +00:00
Ilia Maslakov 5a397a6b9a * add new commands into cmddef.h
* add user keybind in widgets
    * add widget keybindings

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-29 17:42:34 +00:00
Ilia Maslakov 606dce4e8b add redefine keys support in viewer
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-29 17:42:33 +00:00
Ilia Maslakov da303d73ac * removed edit/usermap.c edit/usermap.h
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-29 17:42:33 +00:00
Ilia Maslakov 27545f1745 rework screen.c keymapping
Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-29 17:42:33 +00:00
Ilia Maslakov 71b1a8bf99 Ticket #212 (User defined hotkeys)
created structs:
    struct name_key_map_t
    struct key_config_t
    global_key_map_t
    add lookup_action
    replace editor key map struct to global_key_map_t
    add main_map screen_map
    replace command CK_* to src/cmddef.h
    add mc.keymap
    fix misc/Makefile.am
    add x_keymap
    add more commands

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-29 17:42:32 +00:00
Slava Zanko bdfc9adf39 Continue development of skins
* Remove highlight of hidden filenames.
 * Fixed colors with ncurses screen library
 * Fix lines drawing with ncurses screen library.
 * Fix drawing of lines in slang with non-utf codepages.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>

 * Code cleanup.
 * Code cleanup, refactoring and optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-18 11:56:12 +03:00
Slava Zanko 2216332c0c continue develop of skins.
* Compile with option --with-screen=ncurses
 * Added default init of colors (if color description is null)
 * Renamed some color pairs. All static color pairs now cached.
 * Fix cursor show in panel over selected files in b&w color scheme.
 * Fix editor highlight
 * Handle old-style colors definitions.
 * Fix showing box lines in onebyte codepages.
 * Fix segfault with:
 * mc -C 'menu=blue,white:'
 * Fix reading of color backgrounds from old-style color definition strings.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>

 * Fixed typos.
 * Added ACS_PLUS char and related stuff.
 * Changed order of colors.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

 * Fixed pseudo-graphics drawing for S-Lang library and 8-bit locale.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-09-18 11:54:20 +03:00
Slava Zanko da6a25afc7 Box lines drawing. Now reading from skins. With ncurses don't work!
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-18 11:49:44 +03:00
Slava Zanko c1c8671370 refatoring: move init of tty lines drawing onto separate function
Refactoring: transform integer variables into list of integers.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-09-07 10:17:27 +00:00
Ilia Maslakov 465d4d2cc5 Ticket #1497 (stickchars)
add frm_* vars
    read frame lines from ini
[Lines]
lefttop
righttop
centertop
centerbottom
leftbottom
rightbottom
leftmiddle
rightmiddle
centermiddle
horiz
vert
thinhoriz
thinvert

    fix draw frames in stickchar mode

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-09-07 10:17:27 +00:00
Slava Zanko b06ab0fe72 Split src/view.c into small files for better support of code
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-08-24 16:26:41 +00:00
Andrew Borodin 96e032b473 Ticket #1531: old method of reverse selection of files.
Now Gray-* shortcut inverts selection of directories as well as files.
This is very confusing feature especially when user is going to delete
files.

Added new variable 'reverse_files_only' allows use the old behavior
of reverse selection.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-08-19 11:25:25 +04:00