Commit Graph

4196 Commits

Author SHA1 Message Date
Slava Zanko
c6796f790d VFS-plugins: remove usage of vpath->unparsed from 'local' plugin
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
093128c532 VFS: Current directory handler now have type vfs_path_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
a12fdfbb0e VFS: many changes for use vfs_path_t
* completed vfs_path_from_str();
 * completed vfs_path_to_str() and vfs_path_to_str_elements_count();
 * removed deprecated vfs_split();
 * changes in all related code;
 * new unit tests.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
457c8b89e7 Changed internal function sfs_redirect() for handle vfs_path_t arg
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
137ad4483d Changed internal function ftpfs_send_command() for handle vfs_path_t arg
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
152124d9b7 Following prototypes of functions was changed in VFS-module API:
* getid
 * mkdir
 * rmdir
 * setctl

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
d67da5dfa8 Following prototypes of functions was changed in VFS-module API:
* readlink
 * symlink
 * rename
 * link
 * unlink
 * mknod

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
1406eb5035 Following prototypes of functions was changed in VFS-module API:
* opendir
 * stat
 * lstat
 * chdir

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
dd19ca201d Following prototypes of functions was changed in VFS-module API:
* chmod
 * chown
 * utime

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
479902f83e Following prototypes of functions was changed in VFS-module API:
* open
 * getlocalcopy
 * ungetlocalcopy

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Andrew Borodin
42bc3171c3 Ticket #2361: VFS URI reimplementation
Created vfs_url_t structure

...and use it to parse and store network VFS options.

vfs_s_super structure now has a special member for network VFS options.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Andrew Borodin
d2bd11be9b (save_setup_cmd): remove home directory and password
...from message of setup saving.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
82b27ead4d Optimization of history load.
Formerly, each widget loaded its history self in its constructor.
Thus, history file was read as many times as many widgets with history
are in dialog.

Now all widget histories are read from ${XDG_CACHE_HOME}/mc/history
file at one time after dialog initialization.

The ev_history_load_save_t event is apllied to load  histories.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
cff5925598 Optimization of history save.
Formerly, each widget saved its history self in WIDGET_DESTROY stage.
Thus, history file was read and written as many times as many widgets
with history are in dialog.

Now all widget histories are written to ${XDG_CACHE_HOME}/mc/history
file at one time before dialog destruction.

An ev_history_load_save_t event type is created to use new event engine
to save histories.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
7d469f841c (history_save): new function to save widget history
...to some in-memory created config without write it to file.

(history_put): now uses history_save().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
27ee15f828 "Layout" dialog window: remove "Save" button
...because it duplcates the "Save setup" menu item.
More correct i18n.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
87e16316bc src/filemanager/option.c: minor optimization and includes clean up.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
e2c1db9f5a "Panel options" dialog window: remove "Save" button
...because it duplcates the "Save setup" menu item.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
28231f66d9 "Configure options" dialog window: remove "Save" button
...because it duplcates the "Save setup" menu item.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Andrew Borodin
4e232774b2 Ticket #2541: MC saves configuration many times.
The problem: when mc quits with auto-save setup, the main confguration
file is written 4 times.
The solution: don't write ini when some part of setup is saved. Write
ini only after save whole confguration.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-06-21 16:13:10 +04:00
Slava Zanko
b375236b53 Ticket #2544: search dialog trim spaces
What steps will reproduce the problem?

 * View some text (log) file (F3), or edit (F4).
 * Open search dialog (F7).
 * Enter string starting with space and ending with space (I used " ERROR " without quotes), press Enter
 * Press F7 to open search dialog again.

What is the expected output?
 * Original string in search dialog (" ERROR " without quotes)

What do you see instead?
 * "ERROR " (without leading space!)

What solution?
 * In function mc_config_set_string_raw() use g_key_file_set_string() instead of g_key_file_set_value()
 * change src/learn.c for handle new behavior
 * write some tests for new behavior

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-05-31 18:50:31 +03:00
Andrew Borodin
f147633f41 Ticket #2312: panelize content is lost when doing F5/F6/F8 on a file on the other panel.
(panel_operate): don't update panelize content in the other panel
before copy/move/delete operation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-05-30 17:29:20 +04:00
Ilia Maslakov
5e6e6aa37a Ticket #2556 (incorrect files mark by mouse)
What steps will reproduce the problem?
        1) activate left panel
        2) start mark files by mouse right button
        3) drag cursor into right panel
    What is the expected output?
        files are not marked in the right panel
    What do you see instead?
        files are marked in the right panel. it is not correct

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-05-28 10:47:19 +00:00
Yury V. Zaytsev
7dae33b257 Added locale setting before calling dpkg to fix "link to" parsing on non-C locales
Thanks to Andrew Borodin for this fix!

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2011-05-17 15:50:36 +04:00
Yury V. Zaytsev
87174687e2 Ticket #2552: Browsing *.deb files is broken with latest Perl
Latest Perl update broke the deb extfs. Thanks to Jakub Wilk for the solution!

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2011-05-17 15:50:36 +04:00
Andrew Borodin
47115e97ad Fix of terminal resize handling
...and fix of <sys/ioctl.h> includes
and includes cleanup in src/filemanager/layout.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
d92a2a4fd6 Get rid of some function forward declarations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
321f5b2555 WEdit::num_widget_lines and WEdit::num_widget_columns are removed.
Widget sizes are used instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
c81486c202 WEdit::screen_modified is unused. Removed.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
e64fe399e3 Viewer: removed commented-out code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Pavel Vasilyev
777627103b Ticket #2518: code cleanup before 4.7.5.2 release.
(tree_store_load_from): removed unused variable.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-13 13:37:46 +04:00
Andrew Borodin
358391bd6b CPIO VFS: Use GSList to store inodes.
And missing includes were added.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-07 13:45:46 +04:00
Andrew Borodin
8de04446a3 Don't handle VFS timestamps for dirs opened in panels.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-07 13:45:46 +04:00
Andrew Borodin
a6e588e895 local.c: added copyright notice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Slava Zanko
b46d2a3d62 Renamed struct vfs_s_fh to vfs_file_handler_t
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin
68628184b1 vfs_s_super and vfs_s_fh now don't contain members specific to any vfs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin
2e839a6ec6 sfs.c: reimplemented cached file list using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin
5b7c5f09f4 Use GSList to create the list of no-proxied FTP hosts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin
401aaa5014 Ticket #2501: continue split of VFS core library and VFS plugins.
Use GList for list of vfs_s_super objects in vfs_s_subclass.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-07 13:45:46 +04:00
Andrew Borodin
ae07d3a9d4 Ticket #2511: fix of column mark with alt-alrrow keys in mcedit.
This bug was introduces in 1374340aa2 commit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-31 10:32:27 +04:00
Andrew Borodin
a225419f1a (editcmd_dialog_raw_key_query): fix of result value.
ctrl-g is handled in common way (SIGINT), ctrl-c can be used as macro
shortcut.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
e9014c5b13 Fix of DLG_ACTION handling in 'VFS Setting' dialog window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
50a1b22860 Fix of DLG_ACTION handling in 'Chmod' command window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
ab1ee7bd9f Fix of CK_Cancel handling in Tree widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
0068809e58 Fix of DLG_ACTION handling in 'Configure options' dialog window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
4519c85134 Fix of DLG_ACTION handling in interactive help.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
3e35200517 Fix of DLG_ACTION handling in diff viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
9ae7a28bf8 Fix of DLG_ACTION handling in viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin
87f3030c7a Fix of DLG_ACTION handling in file panels.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Slava Zanko
56c83d03d4 Added --configure-options for easy update & reconfigure existing mc.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-29 12:37:55 +03:00
Slava Zanko
ed70459b4d Ticket #2495 (addition info about paths)
Added -F option (AKA --datadir-info) for show extended information about used data dirs

display info about default used paths by 'mc -V'

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-29 12:37:55 +03:00
Andrew Borodin
0f1095ea38 Ticket #71: support of "Skip all" on multi-file/dir operation.
Added support of skip all failures on file/dir operations.
Original patch was created by me <me 0xn0 de> and modified by Thomas
Zajic <zlatko gmx at>.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-25 12:33:36 +03:00
alexander.stohr
a53d636b05 Ticket #2120 (cd to ~ processed incorrectly)
cd to "~" or "~" with subdirs may fail when issued from the in the command
    line if more than one space is separating the "cd" and "~". So, "cd<one space>~" works,
    but "cd<multiple spaces>~" fails.

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

    some fixes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-22 21:30:23 +00:00
Slava Zanko
06f99484de Added configure parameter --enable-mclib for build own shared library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko
c0637dcb27 update .gitignore for src/vfs/extfs/helpers/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko
f40887c3c6 Lib: removed includes to "src" directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
6621250292 Added events for handle parent_call_string() and parent_call()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
a01b8edd7a Use events for suspend mc (by pressing on CTRL+Z)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
aad40e52fb Moved mc_refresh() to lib/widget
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
5f8a5e4290 Use events for calling help window
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
62207c8d4d Use events for operate with clipboard (copy/paste to external clipboard, save/load to file)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
c2dfb82f61 Use events for update panels
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
3634716374 Moved input_map, listbox_map and dialog_map variables to 'lib' subdirectory.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
0f93e313df src/background.c: added some forgotten va_end() calls
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
c58365fa64 Move check_for_default() function from lib/util.c to src/util.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
7dad2df6a8 Moved initialization of mc_global.share_data_dir and mc_global.sysconf_dir to library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
e784cf65a5 Move src/filemanager/complete.c to lib/widget/input_complete.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
5a458c702d Use events to show VFS messages.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
746653fda2 Removed mc_main_error_quark() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
4005b7924e Use events to check timestamp of panel directories
...instead of direct access to panels in VGS GC.

Inlcudes clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
6016620f42 Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Slava Zanko
6c5f5bf768 VFS structure changes:
* moved from lib/vfs/mc-vfs to lib/vfs;
  * split by directories for VFS-plugins and moved to src/vfs;
  * lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:48:26 +02:00
Slava Zanko
d512649b33 Prepare to initialize application events.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:46:41 +02:00
Andrew Borodin
5ef6375120 Symbolic names of keymap sections are defined.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
b3d0a9237b Change hardcoded definitions of default keymap.
Now default key bindings are hardcoded as strings like values in keymap
file. Such presentation of key bindings allows simplify keymaps merge
when new bindings are added, replaced or removed old ones during MC
initialization.

Previously, to rebind some keys, used must redefine the entire section
where that bindings are in. New merge algorithm doesn't require the
redefinition of entire section in user's keymap file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
6484b1dce7 Allow remove key with empty value from target config.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
35b429f625 Prepare to merge default and user-defined keymaps.
default_main_map and default_main_x_map renamed to
default_main_keymap and default_main_x_keymap respectively to unified
variable names.

Editor: setup keymaps only once for all editors.
Viewer: share single keymap array for all viewers.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
4fbdbd4456 Added --nokeymap command line option to disable load keybindings from file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-20 19:26:08 +03:00
Andrew Borodin
722121a575 Define keybind numbers using enum.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
1374340aa2 Fixup of shift-arrow mark in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
50de02cfe4 Unification of keybinding names.
Most of keybind names are changed to unify that names.
Details see in doc/keybind-migration.txt file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
68a8745f6d Ticket #2511: simplification and unification of keybinding names.
Added doc/keybind-migration.txt file to describe new keybinding names
used in mc.keymap.* files in 4.8.x series.
Cosmetics: reordering of keymap section declarations to provide identical
order totally in the source tree.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Ilia Maslakov
4015e14aff Ticket #2512 (fixup for usermenu)
Fixed user menu behaviour. MC hangs if menu entry contains the 'read' command or something like that.
    bug introduced in the Ticket #323 (changeset: 0cfbe19d96).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-17 16:12:12 +00:00
Ilia Maslakov
ecd8ca2292 mark inserted from file
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-17 08:50:52 +00:00
Ilia Maslakov
dc6bd875c4 Ticket #2504 (Verical block is unmarked after copy/move)
Now mark of vertical block is not reset after copy/move. This make easy many copies/movements.
    Do nothing if cursor is in first line of selection.
2011-03-17 08:50:52 +00:00
Slava Zanko
bdf5543950 Direct commit: fixed visibility scope for global variable GArray *macros_list
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-04 11:53:30 +02:00
Ilia Maslakov
b642e2e1e1 added check for instruction "#interactive" in the script.
if the external script contain #interactive then do show prompt.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
b58e7e64fc Fix cursor position after execution of external script.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
d31116328a Changed engine of external macros execution
Now "EditPipeBlock (X)" action tries execute the
~/.local/share/mc/mcedit/macros.d/macro.X.sh script.
To bind action EditPipeBlock (X) to the any hotkey you need add this binding
into ~/.local/share/mc/mc.macros file like following:

[editor]
ctrl-Q=EditWordLeft:-1;EditWordRightHighlight:-1;EditPipeBlock:3;
ctrl-W=EditPipeBlock:1;

This means that "ctrl-W" hotkey initiates the EditPipeBlock (1) action,
editor handler translates this into execution of
~/.local/share/mc/mcedit/macros.d/macro.1.sh shell script.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
83177cfc16 added a new action "Record and Repeat commands", added menu entry (Record/Repeat actions) for this.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

some fixes

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

and one more fix

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-03 20:45:07 +00:00
Ilia Maslakov
6066713f77 Removed unneeded menu entries.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-02 11:16:55 +00:00
Ilia Maslakov
8e22a16430 Added lookup_key_by_code, now parameter is string.
For example: "ctrl-w=action:code;action:code;action:code;"

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-02 11:16:54 +00:00
Ilia Maslakov
8509b74f73 Ticket #323 (reimplimented editor macros)
Reimplemented editor macro engine:

    * added string binding "InsertChar" for action - "CK_Insert_Char"
    * added keybind_lookup_actionname - found action name by numeric constant
    * replaced struct macro to struct macro_action_t
    * added struct macros_t for describe editor scripts
    * rewritten edit_load_macro_cmd, edit_execute_macro
    * renamed edit_save_macro_cmd into edit_store_macro_cmd (WEdit * edit);
    * dropped Wedit properties: macro_i, macro_depth, macro[MAX_MACRO_LENGTH]
    * added GArray *macros_list to the store macroses of mcedit
    * added edit_get_macro

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-02 11:16:44 +00:00
GoTaR
795b3a76f0 Ticket #1668: Screen and input corruption under xterm [non-UTF]
The problem:
    viewing binary files contain char 0x9A leads to massive screen corruption and Search
    dialog pops up with 1;2c search string (multiple times depending on actual screen contents).
    So it looks like the file 'presses' F7 or / and shift-right_arrow for every specified
    character combination occurrence. In case of bigger files it's impossible to exit from
    such viewer, as search dialog keeps popping up after closing.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-01 15:24:38 +03:00
Andrew Borodin
41758cc0e4 Ticket #2462: "Search for content" checkbox is disabled by default.
"Search for content" checkbox in 'Find File' dialog should be enabled by default.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-24 10:23:20 +03:00
Ilia Maslakov
4e97991714 code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-17 21:46:20 +00:00
Ilia Maslakov
afed48a44a Ticket #2499 (action to the mark current word)
added action CK_Mark_Word to the mark current word
    changed double-click the mouse handler of the editor

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-17 21:38:06 +00:00
Ilia Maslakov
cfad4d685b Ticket #2500 (incorrect the word boundary detection)
fixed detection of the word boundary (added '{', '}' as end of the word).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 22:17:15 +00:00
Ilia Maslakov
9f0d38520a replaced call mc_config_del_param to mc_config_del_key
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 22:09:41 +00:00
Andrew Borodin
cfd0e8d3fc Handle ignore dirs directly in 'Find file' dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 21:59:55 +03:00
Andrew Borodin
7fa3dfc649 Added counter of ignored dirs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-16 21:58:59 +03:00
Andrew Borodin
90e3933e89 Ticket #2275: find files: support of relative dirs in ignore_dirs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-16 21:58:59 +03:00
Ilia Maslakov
7651b5dd30 Ticket #2483 (editor: improvement word left/right)
now the cursor jump more intuitive after actions "word left"/"word right".
    It will be stop before BOL, BOF

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-13 08:30:19 +00:00
Andrew Borodin
20788b9bde use_mouse_p: moved definition from src/filemanager/midnight.c to lib/tty/mouse.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
fe60e4c89b find.c (search_content): type accuracy of return value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
5b9a7dd43f (mc_config_del_param): renamed to mc_config_del_key.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
ac8e519854 Remove extra checks before call of g_strfreev().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
1ceb2494e4 Fixup compile with --disable-charset.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:55 +02:00
Slava Zanko
8c4eb1bae8 Two small typos in strings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-05 16:54:51 +02:00
Ilia Maslakov
afb498de3a Ticket #2456 (Incorrect restore selection after UNDO)
fixed incorrect restore selection after UNDO

    test case:
        1. mcedit new_empty_file
        2. type in 0123456789
        3. F3 5*left F3 - digit '4' is not marked at this point
        4. backspace, ctrl-u - digit '4' is marked now
        5. left, 2*del, 2*ctrl-u - digits '4' and '5' are not marked

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-04 18:32:13 +03:00
Ilia Maslakov
9b5de3c96b direct commit: utf8 fixup
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-03 17:14:48 +03:00
Ilia Maslakov
f42e10ab1d Ticket #2484 (segfault after getting previous char)
fixed segfault after getting the previous char in utf8, if previous char's
    are: 0xB1, 0xB3, 0xB6, 0xBF, 0xBC.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-03 09:50:15 +03:00
Andrew Borodin
e3cbdfad04 Ticket #2489: colors of bold and selected text in viewer cannot be set in the command line
...using --colors option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-02 14:55:06 +03:00
Andrew Borodin
09021fd954 Reorganization of "Show mini info" option.
"Show mini info" checkbox was moved from the "Layout" dialog window
to the "Panel options" one. Documentation was updated.
The show_mini_info global variable was transformed to the member
of panels_options_t structure.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Andrew Borodin
f13778d94f torben_fj_mode options was moved from [Midnight-Commander] section to [Panels] one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Andrew Borodin
5341a6b53f Ticket #2305: drop backward compatibility for global panels options.
Drop backward compatibility for global panels options. These options
are read form [Panels] section, if this section exists. If this section
is abscent, default values are used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Slava Zanko
8af4c9ca7f menu file now searched also in mc_sysconfig_dir directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:44:04 +02:00
Slava Zanko
c8982e822c Updated docs (man pages and comments in source code)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko
f31863a80a Renamed variables mc_home to mc_sysconfig_dir and mc_home_alt to mc_share_data_dir for more sence
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko
acbe048486 Ticket #1851: Home config directory [xdg-user-dirs]
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
 * XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
 * XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
 * XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc

This is mainstream standard already adopted by many projects.

Old settings will be migrated at first time from ~/.mc to these dirs.

See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-20 17:38:27 +02:00
Andrew Borodin
1f98ee6dc7 Refactoring.
(paint_panel): removed. Sending of WIDGET_DRAW message is used instead.
(update_dirty_panels): moved from panel.c to midnight.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-19 13:03:54 +03:00
Andrew Borodin
57cdd0a08a Refactoring.
(restore_into_right_dir_panel): made static.
(panel_update_cols): moved from panel.[ch] to layout.[ch].
(set_display_type): minor cleanup and type accuracy.
(panel_display_t): type accuracy

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-19 13:03:54 +03:00
Andrew Borodin
c7fdc8f95b Ticket #2390: file list format of panel is intialized incorrectly
...after switch panel back from quick view or info mode to file list one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-19 13:03:39 +03:00
Andrew Borodin
99b60cc2b3 Ticket #2466: main menu is not drawn correctly
...after change of it visibility and activity.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-12 13:00:36 +03:00
Andrew Borodin
16c13be47b Added option to change mode of panel swap.
New "Simple panels swap" checkbox in "Panel options" configuration
dialog window. Unchecked by default.

Documentation update.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2c994461a6 Forced update listing format after swap
...because of possible changed sizes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2a98492e77 Resort swapped panels in according with its sort options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2ebfd4e293 Ticket #2368: swap panels should respect sort options.
Initial step: refactoring: create new panel_sort_info_t structure
to store sort options of panel.
Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Ilia Maslakov
7bd3a17db7 do not set modify flag when user menu cancelled.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-06 16:01:52 +00:00
Ilia Maslakov
bf7675246f Ticket #2463 (do not reset selection after execute user menu)
do not reset selection after execute user menu

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-06 16:01:51 +00:00
Andrew Borodin
186b2ff3f7 Ticket #2464: find file: don't check content regexp
...if search for content is not used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-06 18:49:48 +03:00
Anton Novosyolov
a30cf7e980 Ticket #2266: filtered view default text
I suggest changing default text in filtered view (alt-!) command input line
instead current filename in panel to contents of cmdline.

It's easier to edit command line with commands like alt-tab,
alt-enter, etc., and then view the result in mcview.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-06 11:02:00 +02:00
Andrew Borodin
45306458ca Ticket #2458: fixed broken command autocompletion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-05 15:22:40 +03:00
Ilia Maslakov
ab46ad0749 Modified editor general options gialog
...added "Group undo" option.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-01 21:17:27 +00:00
Ilia Maslakov
b39033812b Ticket #27 (group undo)
added option editor_group_undo unset by default
    added group undo mechanism

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-01 21:17:19 +00:00
Ilia Maslakov
d84fb5d0ce updated default_editor_keymap, added default for CK_Redo
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:43 +00:00
Ilia Maslakov
6832b8e7e9 binded EditRedo on alt-r
added entry Redo into editor menu

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:43 +00:00
Ilia Maslakov
03363eac71 added action EditRedo.
added functions:
        * edit_push_redo_action
        * edit_pop_redo_action
        * edit_do_redo

    removed not supported (not actual) code

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:42 +00:00
Ilia Maslakov
b5fc178027 Ticket #25 (mcedit: REDO)
little optimization, renamed:
        * variables stack* to undo_stack*
        * pop_action to edit_pop_undo_action
        * edit_push_action to edit_push_undo_action

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:42 +00:00
Andrew Borodin
da2c82e8d3 Ticket #2170: color of panel header cannot be set in the command line
...using --colors option.

Grammar in default skin description.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-29 13:58:28 +03:00
Egmont Koblinger
e593572bb9 Ticket #2169: Add support for 256 colors terminals
Forget the old limit of 8 background and 16 foreground colors.
From now on Midnight Commander can use all the 256 colors,
as your favorite terminal emulator supports them - or not,
in which case it's not going to stay your favorite terminal for long.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-29 11:58:10 +02:00
Andrew Borodin
a8b62e421e (warn_same_file): cleanup of preprocessing usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Andrew Borodin
7cfaeca063 Panel update: type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Andrew Borodin
75fa78595e (single_dirsize_cmd): send CK_PanelMoveDown message instead of KEY_DOWN one to panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Ilia Maslakov
7d21002668 Ticket #1898 (mcedit: vertical selection bug)
now after changing the cursor position does not break the vertical text selection.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-23 16:03:56 +00:00
Jindrich Novy
b51ae367da fix crash in progress bar handling
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-23 14:25:39 +03:00
Andrew Borodin
4abfaf8172 Ticket #2448: division by zero in file copy progress dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-23 14:25:39 +03:00
Andrew Borodin
16c37545a3 (try_complete): fix completion for file names started with one character.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-23 13:24:55 +03:00
Ilia Maslakov
e4de4f00d1 little changes to make 'completion' more intuitive.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-23 13:24:55 +03:00
Andrew Borodin
b5d3857e29 Fixup of path autocompletion
...and reorganizing of some conditions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-22 10:35:32 +03:00