Andrew Borodin
2a5a5b4753
Ticket #2795 : hex search: can't find 00 (zeroes) in patterns.
...
Don't interpret the '0' character as end of search pattern.
Use pattern length for that.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-05-08 18:57:55 +04:00
Andrew Borodin
038b5e7406
Ticket #2787 : crash when creating relative symlink.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-25 14:55:56 +04:00
Andrew Borodin
393d90f207
(input_history_strip_password): actually url is not the pointer to constant.
2012-04-22 11:25:11 +03:00
Andrew Borodin
a878a2dd37
(vfs_expare): changed argument type from int to gboolean.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Andrew Borodin
0073a137af
(vfs_url_split): optimized to get rid of multiple string length caclulation.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Andrew Borodin
b1bcf6b01f
(resolve_symlinks): use (vfs_path_t *) as argument.
...
Minor optimization of resolve_symlinks() and diff_two_paths().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:11 +03:00
Andrew Borodin
2fe6ab5e9f
(tty_draw_box): do nothing if width or heigth of box is less than 1.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:10 +03:00
Andrew Borodin
58cf4e735c
(vfs_path_element_clone): ret rid of extra actions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:10 +03:00
Andrew Borodin
a4426ee8d7
(vfs_get_raw_current_dir): return pointer to constant.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 11:25:10 +03:00
Andrew Borodin
dbdc471553
g_dirname and g_basename function are deprecated since glib-2.2.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 11:25:10 +03:00
Slava Zanko
0a44a9ff5f
Ticket #2779 : Active VFS directories list contain incorrect current path
...
1) login to any ftp or fish resource
2) select ftp/fish entry and change current path
3) go back to old path
4) press Ctrl+X A (open "Active VFS directories" dialog)
Expected result: should be correct path to current VFS path
Actual result: path is incorrect.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:23:13 +03:00
Slava Zanko
33ea9092f5
Ticket #2777 : Stale symlinks in vfs
...
How to reproduce:
* mkdir -p a/b/c
* touch a/b/c/d
* ln -s d a/b/c/e
* tar -cf bad.tar a
* rm -rf a
* cd bad.tar/utar://a/b/c
Expected result: 'e' should be valid symlink to 'd'
Actual result: 'e' looks like broken link
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-18 15:55:13 +03:00
Slava Zanko
4184555b82
Ticket #2760 : The password for session ftp remains in input history
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-12 22:31:20 +03:00
Andrew Borodin
08f2593ae9
Ticket #2608 : mc hangs while switching to opened screen.
...
The bug was introduced in 6ad4b2466b
.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-09 21:16:23 +04:00
vokac
8c0621b2b6
Ticket #2764 : Case sensitive search with SEARCH_TYPE_PCRE
...
When mc is compiled with SEARCH_TYPE_PCRE (and without SEARCH_TYPE_GLIB,
e.g. on systems with old glib < 2.14) case (in)sensitive search works in opposite.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-09 11:30:15 +03:00
Andrew Borodin
c937060676
Ticket #1851 : fixed support of XDG_* shell variables
...
...broken in 13a660d2e0
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-04 15:52:08 +04:00
Andrew Borodin
91ff90f87b
Ticket #2386 : interpretation of LANG variable needs to be case insensitive.
...
On Mac OS X, in the iTerm2, when the LANG variable is set to en_US.utf-8
mcedit specifically does not correctly accept input (every character press
is interpreted as a '.'). However when LANG is set to en_US.UTF-8 mcedit
works correctly (see also http://code.google.com/p/iterm2/issues/detail?id=204 ).
On Linux, nl_langinfo(CODESET) returns upper case UTF-8 whether the LANG is set
to utf-8 or UTF-8.
On Mac OS X, it returns the same case as the LANG input.
So let tranform result of nl_langinfo(CODESET) to upper case unconditionally.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-28 13:00:22 +04:00
Slava Zanko
88483f5fac
Fixed creating string from relative non-local VFS.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:28:45 +03:00
Slava Zanko
ecda2061f2
Ticket #2758 : cd command not working in shell link
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:28:45 +03:00
Slava Zanko
49532ac834
Ticket #2755 : cannot copy zero-length files with [Preallocate space] option
...
If [Preallocate space] option is enabled, MC can't copy zero-length files:
"Cannot preallocate space for target file ... Invalid argument (22)"
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-25 15:20:17 +03:00
Andrew Borodin
4cc0aefb16
Ticket #2756 : fixed menu alignment.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-25 10:35:57 +04:00
Ilia Maslakov
02f4bb4a98
Ticket #2757 (mcedit not record input chars)
...
fixed trouble with internal editor macro engine introduced by commit #68a8745f6dd7ded9437317a694225d599745e983
now record input char and commands.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-03-22 16:48:16 +04:00
Andrew Borodin
21d0ff05f2
Disable resizable menu.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 16:21:09 +03:00
Andrew Borodin
308237aa11
Fixed preprocessor conditions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:06:00 +03:00
Andrew Borodin
67a4c6d521
Added macros for Layout and Misc sections of main config file.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:06:00 +03:00
Andrew Borodin
dea3aa9023
Reorder fields in mc_global struct and change type for some of them.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:06:00 +03:00
Andrew Borodin
dc3ff33d34
Tweak key bindings.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
c7bde637f9
Tweak background operations support.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
b8190c1f53
lib/tty/win.c: includes cleanup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
aadf01f390
Include sys/param.h conditionally.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
f7f37f674e
Check assert.h header and use it conditionally.
...
assert(3) should be replaced with g_assert().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
1b4df2bdd2
Removed check of unused header files.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:57 +03:00
Andrew Borodin
e2b67a33ba
Ticket #2740 : code cleanup before 4.8.2 release.
...
Removes references to AC_HEADER_STDC macro, marked as obsolescent
in the Autoconf 2.60 release.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:04:56 +03:00
Andrew Borodin
13a660d2e0
Allow setup mc home directory using MC_HOME environment variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-19 11:43:55 +03:00
Andrew Borodin
9919577962
Ticket #2738 : handle errors at mc sturtup stage.
...
Don't run MC if configuration directory cannot be created.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-17 19:04:22 +03:00
Ilia Maslakov
0f9083f9c0
fixed reading the not initialized data
...
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-03-15 12:47:46 +03:00
Andrew Borodin
dd9c7516a3
Support of use ~ as home directory in hotlist.
...
Expand tilde while vfs path canonicalize.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-12 16:23:59 +03:00
Andrew Borodin
fc371ba8f8
Make menu always resizable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
19a4eb1ca6
Added D_CENTER flag to query dialog flags
...
...to forced place a query dialog in the center of the screen.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
e1f2b5b017
Workaround for NCurses output routines.
...
Unlike S-Lang, NCurses always wraps long lines and unable trancate that
to pring only visible part of text. Therefore we have to implement our
own addch() wrappers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
62fc80f5f7
Allow draw a part of line if some coordinares are out of screen boundaries.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:56 +03:00
Andrew Borodin
7e6ff9caf9
Allow override standard dialog actions in some dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
dc3d161e71
Don't get dialog hotkey from disabled widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
65d9697d69
Fixed widget redraw order in dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
8bbad1dbfb
Menu hack to keep overlapped widgets order
...
...required in multi-window editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
fe34f89a19
Added dlg_set_top_widget() function
...
...to move widget to the top of widget list and make it current.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
6ad4b2466b
Allow add and remove widgets in runtime.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
33d25a0c8f
Put global mouse coordinates to widgets.
...
Now each widget gets absolute coordinates of mouse pointer and decides
itself how to handle them.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
7956b64e54
Fix mouse handling in dialog.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Andrew Borodin
c3f359c82b
Ticket #2608 : widget enhancements.
...
New method of widget ID assignment:
now widget ID is a value of unsigned long type. Dlg_head structure now has
new filed widget_id that contains a ID of the next added widget. When new
widget is added into dialog, widget_id is set as ID of it and then
incremented.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-08 10:37:55 +03:00
Slava Zanko
8451286bb5
Ticket #2695 : Fixed segfault while new file created in editor.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-08 10:33:22 +03:00
Slava Zanko
4047403077
Fixed creation of lock files
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:32 +03:00
Slava Zanko
05d220a9c6
vfs_path: Fixed broken relative paths processing.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
a8da7179d0
Return values of following functions are constants now:
...
* vfs_path_get_last_path_str()
* vfs_path_get_last_path_vfs()
* vfs_path_get_by_index()
* vfs_class_find_by_handle()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-03-06 11:52:31 +03:00
Slava Zanko
2b5c28b316
Changes to handle vfs_path_t object:
...
* removed strip_password () function;
* Added new vfs_path flag: VPF_HIDE_CHARSET;
* added vfs_path_add_element() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
18d8b06238
VFS: Added new function vfs_path_to_str_flags()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:31 +03:00
Slava Zanko
8562a215be
Code refactoring: removed concat_dir_and_file() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
862d53090d
Code refactoring
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
db58cd9ca7
Changed internal editor to use vfs_path_t objects.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
12a9390524
Changed lock_file() and unlock_file() functions
...
...to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:52:30 +03:00
Slava Zanko
ddf8c542c9
Added function vfs_path_cmp()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
b319ddfbab
Added vfs_path_cmp() ans vfs_path_ncmp() functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:51 +03:00
Slava Zanko
78f9f4252e
VFS: internal changes in vfs_path_t type.
...
Changed type of array from slower GList to faster GArray.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:50 +03:00
Slava Zanko
902e5cb978
Changed format of string 'current directory path' at header of panel.
...
* path elements now are separated and shown one-by-one
(eg. ftp://some.in.net instead of ~/some/path/ftp://some.in.net)
* encoding info is shown separated at top of header line
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:50 +03:00
Slava Zanko
0aa10fd6cb
Changed type of WPanel::cwd (char *) and WPanel::lwd (char *)
...
...to WPanel::cwd_vpath (vfs_path_tr *) and WPanel::lwd_vpath (vfs_path_t *).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:45:50 +03:00
Slava Zanko
66e5af24d9
Added new fnction for manipulate vpath objects:
...
* vfs_path_append_vpath_new ()
* vfs_path_vtokens_get ()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
a34a3b3aa5
Added vfs_path_tokens_count() and vfs_path_tokens_get() functions
...
...for easy work with vfs_path_t tokens.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
75c2b483ff
Changed interface of functions mc_getlocalcopy() and mc_ungetlocalcopy()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
ff69719304
Added inline function vfs_path_get_last_path_vfs()
...
...to simple get VFS class for last path element without malloc/free
operations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
02f31f4db6
Added inline function vfs_path_get_last_path_str()
...
...to simple get path string without malloc/free operations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
389ac85992
Changed input parameters of mc_mkstemp() and mc_tempdir() functions
...
to handle vfs_path_t type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:26 +03:00
Slava Zanko
53c500f58c
Moved functions mc_mkstemp() and mc_tempdir() to VFS module.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
4945d0f9a6
Changed interface of function mc_open() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
0a7caff306
Changed interface of function mc_symlink()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
b27f686f87
Changed interface of functions mc_link() and mc_rename()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
3f6f89bc49
Changed interface of following functions to handle vfs_path_t object as parameter:
...
* mc_chmod()
* mc_chown()
* mc_utime()
* mc_readlink()
* mc_unlink()
* mc_mkdir()
* mc_rmdir()
* mc_mknod()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
031e994cba
changed interface of function mc_setctl() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
9177b954df
Removed split_dir_name() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:25 +03:00
Slava Zanko
034252a71a
Changed interface of function mc_opendir()
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Slava Zanko
eeaad790ab
Changed interface of mc_stat() and mc_lstat() functions
...
...to handle vfs_path_t object as parameter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:41:24 +03:00
Slava Zanko
c47bc3778e
added vfs_path_build_filename() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Slava Zanko
8ec4f94dc6
changed interface of function mc_chdir() for handle vfs_path_t object as parameter
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Slava Zanko
d69d9b31f1
VFS core: vfs_s_free_inode() function have global visibility
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Slava Zanko
e2c326997f
Added usage of VFS_S_USETMP flag
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Slava Zanko
73a7f1ce67
Ticket #2695 : The vfs_path_t expansion to 'src/' subdirectory
...
Added vfs_subclass_flags_t type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-03-06 11:33:12 +03:00
Andrew Borodin
bff2736906
Support of disable of shell variables substitution in autocompletion.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-24 09:39:04 +03:00
Andrew Borodin
9f898d76dd
(strutils_unescape): allow disable shell variable substitution.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-24 09:39:04 +03:00
Ilia Maslakov
d94da7d5c3
Ticket #2731 (scroll long filenames in panel)
...
added bindings 'ScrollLeft', 'ScrollRight' for scroll long filenames in panel
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
some code & typo fixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-02-21 22:20:25 +04:00
Ilia Maslakov
5e688eec94
Ticket #2465 (dynamically resize panels)
...
added new panel's action to dynamically resize panels:
SplitEqual - make equal size of panels
SplitMore - enlarge left/up panel
SplitLess - enlarge right/down panel
changed misc/mc.keymap.default, misc/mc.keymap.emacs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-02-09 13:44:32 +04:00
Andrew Borodin
2fdc05db08
Ticket #2705 : the 0x prefix for hexadecimal search is optional now.
...
Hexadecimal values like "2d f0" can be used as well as "0x2d 0xf0"
in all search dialogs where hexadecimal search is supported.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-01-29 18:52:16 +03:00
Andrew Borodin
a395218ffb
Ticket #2704 : added hotkeys for search types.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-30 17:49:16 +03:00
Ilia Maslakov
9548eb4cb1
Ticket #2628 (shift-tab, ctrl-tab incorrect works)
...
fixed trouble with tab + ctrl/shift modifiers then mc started into xterm.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-29 17:20:35 +04:00
S. Melnikov
a3ddfd14ea
Ticket #2105 (mcview backward search)
...
Until 4.7 '/' was forward and '?' backward search.
In current releases both keys are bound to ViewSearch
so one must manually choose Backwards option in the dialog.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-28 17:30:07 +04:00
Ilia Maslakov
0b631ab1eb
Ticket #86 (disable X11 from command line)
...
added option --no-x, -X for starting mc without X11 support.
updated documentation: es, hu, it, en, pl, ru, sr.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-22 09:04:50 +04:00
Slava Zanko
1dffc24f9b
Fixed user defined home dir, if home dir contain tilda (~/)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:30:35 +03:00
Slava Zanko
44de4d1b1f
Fixed memory leak in lib/serialize.c
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:23:25 +03:00
Andrew Borodin
b49c165c59
(mc_config_normalize_before_save): fixed possible memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
d412b1ec8f
(history_put): unused. Removed.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
d305e5099c
Moved declaration of old_esc_mode_timeout variable to the proper file section.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Andrew Borodin
6704d927c0
(tty_lowlevel_getch): used in lib/tty only.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-12 12:23:25 +03:00
Slava Zanko
1ba18c54b0
Ticket 2686: Code cleanup
...
Avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 12:23:25 +03:00
Sergey
fac8c5d2f3
Ticket #2625 : mc does not preserve file mtime when copying over ssh
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-12 11:51:25 +03:00
Egmont Koblinger
b4912875b5
Ticket #2662 : Calculating free space by ctrl+space doesn't work.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-09 13:05:03 +03:00
Andrew Borodin
d99feea391
Ticket #2678 : fixup of filemanager layout after screen resize.
...
Initial state: forced suspend the previous screen when new screen has
been created. Forced resume the current screen when the previous screen
has been closed. Don't redraw suspended screens, just set sinch_pending
flag. Screen will be redrawn immediately after resume.
This commit allow ret rid of setup_panels() call if screen is resized
and filemanager is not active screen at that time.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-12-07 16:02:20 +03:00
Slava Zanko
29ba0a0cda
Show error and don't start if config directory is a regular file
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6b2c8d4800
Fixed migration rules
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
162a330f42
Added unit test for mc_config_get_full_path() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
6c32fa3b84
Added function mc_config_get_full_path() for search user's config files by short names.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
25c9267ac3
Some config files moved to more appropriate places.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Slava Zanko
a8c3ab345d
Changed source code for respect '--enable-homedir' configure option.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-12-06 16:24:10 +03:00
Andrew Savchenko
6d99accfe0
Ticket #2676 (save of some learned keys is broken)
...
fixed saving of 'F13'-'F20' learned keys.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-12-06 11:42:20 +04:00
Egmont Koblinger
026b07a2ab
Ticket #2662 : support extended mouse clicks beyond 223.
...
The ancient way of reporting mouse coordinates only supports coordinates
up to 231, so if your terminal is wider (or taller, but that's unlikely),
you cannot use your mouse in the rightmost columns.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-11-29 09:50:03 +03:00
Ilia Maslakov
e1231e3d8e
Ticket #2653 (fixed: input password)
...
Fixed: input field in password mode is fully masked with asterisks.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-11-03 16:46:31 +04:00
Slava Zanko
ffbd9561f0
Ticket #2652 : SMB is broken
...
After #2361 , smb vfs module doesn't work at all.
The error message "Cannot chdir to ..." raises after hostname enter.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-31 23:31:59 +03:00
Andrew Borodin
1673c37548
Ticket #2637 : faster startup of mc.
...
Since content of keymap file is ASCII-only and case insensitive,
don't use some utf8-manipulation: g_ascii_strcasecmp() is used
instead of str_casecmp().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-31 15:49:36 +03:00
Andrew Borodin
0035a1de73
Ticket #2643 : can't compile on OpenIndiana (Solaris)
...
lib/vfs/parse_ls_vga.c: added #include "lib/unixcompat.h" where makedev
macro is defined.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-28 11:59:33 +04:00
Ilia Maslakov
48460f6ca1
changed mc.keymap
2011-10-27 15:59:24 +04:00
Ilia Maslakov
5c252726f1
Ticket #275 (panelize enhancement)
...
added ".." at the top of file list (after external panelization)
added ".." at the top of file list (after 'find' panelization)
disable ctrl-r (refresh) for panelized content
added menu entry Left\Panelize, to restore panelized panel
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Minor changes in goto_parent_dir()
many code optimization
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
little fixup
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-10-27 15:54:57 +04:00
Sergei Trofimovich
fbb770d47a
fix build error in ‘vfs_preallocate’: vfs.c:613:12: error: ‘dest_desc’ undeclared (first use in this function)
...
When platform does not define HAVE_POSIX_FALLOCATE we get this error:
CC vfs.lo
../../../../mc/lib/vfs/vfs.c: In function 'vfs_preallocate':
../../../../mc/lib/vfs/vfs.c:613:12: error: 'dest_desc' undeclared (first use in this function)
../../../../mc/lib/vfs/vfs.c:613:12: note: each undeclared identifier is reported only once for each function it appears in
../../../../mc/lib/vfs/vfs.c:610:22: warning: unused parameter 'dest_vfs_fd' [-Wunused-parameter]
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2011-10-26 07:56:46 +03:00
Sergey
95c553c467
Ticket #2635 : mc adds spaces an the beginning of all files/dirs at the ftp server
...
For FTP servers, that do not send ".." in directory listing, mc adds one space to the name of every file and directory. Attached patch should fix this problem.
Steps to reproduce:
cd /#ftp:ftp.symantec.com
Expected result:
Correct list of files/directories
Actual result:
File/directory names with leading spaces
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-24 21:17:28 +03:00
Sergey
3e1b644f41
Ticket #2372 (Editor sometimes shows multibyte UTF-8 chars as two dots)
...
Sometimes when text contain multibyte UTF-8 chars, editor shows two dots instead of some letter.
When moving text cursor after that letter it will be displayed properly.
When moving cursor back (before letter) it will be displayed again as two dots.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
added UTF8_CHAR_LEN
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-10-24 11:19:03 +04:00
Oswald Buddenhagen
1c0cc50a3f
Ticket #2639 : doesn't compile when using --disable-nls
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-23 16:21:36 +04:00
Slava Zanko
41af257135
Added configuration option 'preallocate_space' for toggle space preallocating behaviour.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-20 10:51:08 +03:00
Slava Zanko
323fedecd7
Added implementation for files space preallocation
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-20 10:51:08 +03:00
Andrew Borodin
664b3efcda
Ticket #2623 : vfs: use data after free.
...
(vfs_s_close): vfs-specific data of file handler
vfs_file_handler_t::data is freed in vfs_s_subclass::fh_close method and
then can be used in vfs_s_subclass::file_store_one. Bug is related to
ftp and fish VFSes.
Added new vfs_s_subclass::fh_free_data method to free vfs-specific data
of file handler vfs_file_handler_t::data. Use it in ftp and vfs VFSes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-19 12:45:28 +04:00
Slava Zanko
0138645541
Ticket 1551: Update GPL version from 2 to 3
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-18 14:08:34 +03:00
Andrew Borodin
ce1249f052
Added percent sign to key names.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:04 +03:00
Andrew Borodin
cef8eb5cc4
(mc_refresh): moved from lib/widget/wtools.[ch] to lib/widget/dialog-switch.[ch]
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6273917e33
(size_trunc_len): fixed potential integer overflow if SI is used.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
6dabcb5f55
VFS small optimization
...
(vfs_class_data_find_by_handle, vfs_class_find_by_handle): move same
code to the separate function vfs_get_openfile().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
8f4b9e32f1
Remove extra screen update after show help.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
79023b26a4
(mc_build_filename): incorrect processing of first element of path.
...
If first element is relative, the result path should be also relative
not absolute.
If first element is empty, the result path is relative.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b63eea10cb
(mc_build_filename): fixed incorrect processing of empty paths.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
b61e0fc6a9
(_vfs_get_cwd): fixed memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Andrew Borodin
1c0e5a4773
Fix potential segfault in term_trim() functions
...
...if requested width is negative.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-10-17 13:30:03 +03:00
Slava Zanko
a1e34b8dfa
Code cleanup after runing splint on src/main.c file
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-10-17 13:30:03 +03:00
Andrew Borodin
f68b35b475
(try_complete): fixed warinig:
...
input_complete.c:874:26: warning: use of logical && with constant
operand; switch to bitwise & or remove constant
[-Wconstant-logical-operand]
if (q && q[1] == '(' && INPUT_COMPLETE_COMMANDS)
^ ~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
6c5a679b85
Use ESC_STR macro instead of hardcoded "\033".
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
b982f70d4b
Value accuracy of mouse_enabled global variable.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
cd1e5fb76d
Nice location of red (warning and error) dialogs.
...
Now warning/error dialog overlaps the previous status dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
bb8babce1e
(dlg_find_by_id): use the GLib way to find widget.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
db2fa05e27
(menubar_arrange): fixed typos.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:56 +03:00
Andrew Borodin
ba86de945c
Optimization of walking in dialog widgets.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-09 12:01:55 +03:00
Slava Zanko
12dfe1bd55
VFS ftpfs: fixed broken filenames in unaligned 'ls' command output
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
20c4694ee5
Ticket #2594 : ftp failures - leading white space in file name
...
Code cleanup: move 'ls' output parser (and functions-satellites) to
new file parse_ls_vga.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 20:10:48 +03:00
Slava Zanko
372cf39a4f
Fixed regexp error if current codepage isn't equal to UTF-8 in UTF-8 environment
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
20a79d52ab
Ticket #2595 : Broken panels recode in current master
...
Fixed path recoding
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 13:50:02 +03:00
Slava Zanko
70ff1dc3aa
Removed mc_global.args structure.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Ilia Maslakov
67c35a20a6
Added -g, --oldmouse option to support of NORMAL/BUTTON_EVENT mouse type.
...
Required for some terminals (screen/tmux) to force needed mouse type
(BUTTON_EVENT by default).
Normal tracking mode sends an escape sequence on both button press and release.
Mouse highlight tracking notifies a program of a button press, receives a range of
lines from the program, highlights the region covered by the mouse within that
range until button release, and then sends the program the release coordinates.
It is enabled by specifying parameter 1001 to DECSET.
Button-event tracking is essentially the same as normal tracking, but xterm also
reports button-motion events. Motion events are reported only if the mouse pointer
has moved to a different character cell. It is enabled by specifying parameter 1002 to DECSET.
On button press or release, xterm sends the same codes used by normal tracking mode.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
changed mc.1.in, added description of command line options -g, --oldmouse.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
bfbe9b94ae
Removed global variable slow_tty
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
9d9935d290
Removed global variable ugly_line_drawing
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Slava Zanko
8d44ed297b
Moved xterm_flag global variable to mc_global.tty.xterm_flag
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-09-08 14:12:10 +04:00
Andrew Borodin
387bad2c7e
Move SIGWINCH handler initialization to tty_init()
...
... and rename tty_low_level_change_screen_size() to
tty_change_screen_size().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:11:51 +04:00
Andrew Borodin
ad0a5015d3
Fix of mouse and ca capabilities check.
...
Based on patch from Andrey V. Malyshev <amal krasn ru>
http://mail.gnome.org/archives/mc-devel/2005-November/msg00052.html
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
09123c9fc9
Refactoring of TTY layer shutdown.
...
Unification of tty_shutdown() function as for S-Lang as for NCurses.
Added do_exit_ca_mode() call to the NCurses-based tty_shutdown().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:58 +04:00
Andrew Borodin
68468a25ac
Ticket #2601 : incorrect TTY layer initialization.
...
The xterm_flag variable was initialized in setup_mc() but used
first time in init_key() and in tty_init() (in do_enter_ca_mode())
before setup_mc() call.
Now xterm initialized in early step of mc start up process and
xterm support and mouse are initialized in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-09-08 14:10:51 +04:00
Andrew Borodin
fc3bb20f09
(size_trunc): added ability to show size in [G|g]bytes.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
12c893c73e
(size_trunc_len): process full range of uintmax_t type.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-08-30 21:36:13 +04:00
Andrew Borodin
3ec8721f47
(mc_search__hex_translate_to_regex): optimization and cleanup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:45:10 +04:00
Andrew Borodin
efb4206883
Ticket #2579 : incorrect length usage in hexadecimal search.
...
(mc_search__hex_translate_to_regex): don't use length of original string
after leading whitespace trim.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-19 12:34:11 +04:00
Slava Zanko
1940e8f5dd
Fixed broken search results highlighting
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-19 09:51:08 +03:00
Andrew Borodin
c4b95bcd32
Ticket #2576 : fix of symbols duplication.
...
dialog_map, input_map and listbox_map variabels are declared and defined twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-14 21:46:59 +04:00
Slava Zanko
d3bb9de01f
Ticket 2570: Code cleanup
...
Moved tests from lib/tests to tests/lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 20:23:44 +03:00
Slava Zanko
4e56efafe6
Ticket #81 : savannah: can't access files on ftp starting with space
...
files starting with space can't be acessed by mc through ftp - it
shows the file as not having the leading space and attempts to
access it produce 'permission denied' errors.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-11 19:50:32 +03:00
Andrew Borodin
17033652ee
Revert "Ticket #2453 : aggressive screen repaint"
...
This reverts commit f809e6cf7a
.
While navigating in main menu (from one submenu to another one)
or after closing a dialog, the screen is blinking.
2011-07-09 20:39:46 +04:00
Slava Zanko
63c0f34dce
Direct commit: Fixed double memory free in input histoey list.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-09 11:55:30 +03:00
Andrew Borodin
f3fefa67f6
(push_history): fixed memory leak.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
630bcae4d4
(input_destroy): optimization: don't do useless actions.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Andrew Borodin
de5fac8d0a
Ticket #2545 : fixup of saving WInput history.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 20:48:53 +04:00
Slava Zanko
e1edfd7c93
Remove replace_prepare_t type and use defined constants for use just one type (int) in functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:28:07 +03:00
Vitaliy Filippov
fb7b01eeb9
Despite of the fact that algorithm now ignores the absence of closing curly
...
brace '}' (which probably isn't 100% correct), this should be checked in tests
for replace_handle_esc_seq function, not process_escape_sequence - it is the
replace_handle_esq_seq who decides whether it is an escape sequence or not.
Also, \x{4344} is usually a code for wide character (UTF-8), and not for "CD".
So we can either ignore the higher bits, or generate wide character codes...
The second would be convenient, but would also introduce a hard-coded UTF-8 charset.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 17:28:07 +03:00
Slava Zanko
3ced63361b
added tests for mc_search_regex__replace_handle_esc_seq() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:28:07 +03:00
Slava Zanko
6cec807140
str_isutf8() function now returns gboolean value
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:31 +03:00
Vitaliy Filippov
aa2d0b07ed
Ticket #1882 : PCRE search: escape sequence support in replacements, UTF8 support (just a flag for libPCRE)
...
Enables use of escape sequences inside regex replace strings,
Enables UTF-8 caseless search in PCRE.
Supported escape sequences: \DEC, \xHEX, \0OCT, \n, \t, \v,
\b, \r, \f, \a. Any of them could be enclosed into \{}.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 17:26:30 +03:00
Slava Zanko
bb12a1296f
Direct commit: fixed broken build
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 13:49:56 +03:00
Andrew Borodin
f809e6cf7a
Ticket #2453 : aggressive screen repaint
...
... to avoid artefacts after printing of non-printable symbols.
(tty_touch_lines): new function to mark modified lines of screen.
(do_refresh): mark lines as modified before redraw of non-fullscreen dialog
and clear entire screen before redraw of fullscreen dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-08 13:51:41 +04:00
Andrew Borodin
8ff0da42cd
lib/mcconfig/paths.c: cleanup.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 12:38:03 +03:00
Slava Zanko
c057627979
Ticket #1851 : Home config directory [xdg-user-dirs]
...
Fixed migrating user config files.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-08 12:38:03 +03:00
Andrew Borodin
5ffcffbeb6
Optimization of history saving.
...
Now history is not saved if it was not modified and content of input
line is equal to history top entry. Thanks Francesco Cosoleto
<cosoleto at gmail dot com> for the original patch.
Also fixed a regression introduced in cff5925598
:
after CK_HistoryNext and CK_HistoryPrev actions in input line,
the input line content is not put to the top of history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-07 14:19:15 +04:00
Andrew Borodin
1a343a1a47
Type accuracy and some clean up.
...
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-07 14:19:15 +04:00
Andrew Borodin
166281c39a
Ticket #2545 : optimization of history saving.
...
(hist_next): get rid of direct access to the next histroy item.
(history_show): remove redundant check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-07-07 14:19:15 +04:00
Slava Zanko
0f249bd9b5
Fixed errors while connect to IPv6 hosts
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Slava Zanko
2044d8f853
custom_canonicalize_pathname(): Removed old-style path handling.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Slava Zanko
32a9f8257d
Deprecated parser now used just in Hotlist widget.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Slava Zanko
12af8e5db0
fixed relative symlink operations. Symlink now stay relative
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:57 +03:00
Andrew Borodin
ea4078e52e
Ticket #2361 : VFS URI reimplementation
...
Code cleanup:
* (vfs_set_raw_current_dir): remove redundant check.
* VFS: minor optimizations.
* Fixed type of mode argument of vfs_class:chmod method.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-07-05 16:09:23 +03:00
Slava Zanko
c8ae0a5aaf
Code cleanup
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko
91fe0d71bb
vfs_path_get_by_index(): added check for valid element index
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko
5fa1070225
Fixed memory leaks in folowing functions:
...
* mc_opendir()
* mc_chdir()
* vfs_release_path()
* check_panel_timestamp()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko
60123b7c99
Removed function vfs_s_get_path(); Function vfs_s_get_path_mangle() renamed to vfs_s_get_path()
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko
1beaecdf12
Added function mc_build_filename() for processing URL-paths as well
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:02 +03:00
Slava Zanko
1eb91d7921
fixed x_basename function for handle URL-like paths
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
04a4ed0ece
added vfs_path_element_valid() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
f7518c8d77
change name of user bindings file to mc.ext
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
bba132381e
vfs_path_to_str() now return URL string instead of old representation
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
2ec4cc59ab
Added URL-like path parser
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
39462b9b76
Reorder VFS parser to work with VFS parameters:
...
* Removed vfs_path_element_t->raw_url_str;
* Changed some VFS prefixes (colon now used when need to split VFS prefix and VFS parameters);
* Removed vfs_translate_url() functions and related code;
* added converter of VFS parameters to string representation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:01 +03:00
Slava Zanko
bd022573e5
Handle path /some/path/#vfsprefix:/path as /some/path#vfsprefix:/path
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
e6ec447585
Following prototypes of functions was changed in VFS-module API:
...
* archive_check
* archive_same
* open_archive
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
e9ed6a41cf
Added function vfs_path_url_split() for parse VFS parameters
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
3d1e2df9b7
Removed vfs_get_class() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
922114a1d0
Following prototypes of functions was changed in VFS-module API:
...
* archive_check
* archive_same
* open_archive
Added new functions:
* vfs_path_element_clone()
* vfs_path_clone()
* vfs_path_remove_element_by_index()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
c442e5e75f
Changed custom_canonicalize_pathname() function for handle URL:// style
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
d931785fd3
Added test for canonicalize_pathname() function
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
997876a109
Remove vfs_url_t structure (replace with vfs_path_element_t)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
3eafe7308a
Added serialization and deserialization for vfs_path_t object
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
e7bb47cc2d
Added ability to serialize/deserialize strings and config objects(mc_config_t)
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
be0f9dda56
mcconfig: make parameters in some functions as const mc_config_t *
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
f8c45706e1
Avoid memory leaks in vfs tests
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
e8d58f188d
Fixed segfault while trying create dir in r/o VFS'es
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:45:00 +03:00
Slava Zanko
cec54195e7
Changes in VFS-tests.
...
* added test for checking encoding in VFS-module
* fixed names of log-files for tests
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
ac939a1bea
Fixed path recoding in VFS modules
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
691c06ce30
removed vfs_path_t->unparsed variable
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
a5dc2de78b
Added vfs_change_encoding() and vfs_path_element_need_cleanup_converter() functions.
...
Changes for handling directory encoding.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
c0004807d4
vfs_path_element_t->encoding now handled in lib/vfs/path.c
...
Added testcase for testinh path encoding.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
cedad03833
Move vfs_get_encoding() to path.c and make as static function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
b0df841a4a
Removed vfs_path_t->unparsed_encoding.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
ebe519ef15
remove struct dirinfo definition
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
405cc98cea
VFS: Make functions vfs_canon_and_translate() and vfs_canon() as static in lib/vfs/path.c
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
8ea49095c3
Changed functions vfs_file_is_local() and vfs_file_class_flags() for handle vfs_path_t type
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
7745006b60
VFS: removed interface.h
...
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
c188153507
Add more tests for VFS
...
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
9e4dc03e9e
lib/vfs/direntry.c: vfs_s_inode_from_path() and vfs_s_get_path() now handle vfs_path_t
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:59 +03:00
Slava Zanko
9a28ce8c8d
Add more tests for VFS
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
6329976c89
VFS: fixed # sign in passwd or in path string
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
91f3d8f4fd
Added strrstr_skip_count() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
fc8a86766b
Add more tests for VFS
...
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
bf54195f07
added tests for get_vfs_class() function
...
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
Slava Zanko
41f2e27f8d
VFS: Use vfs_path_t in some interface functions
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:58 +03:00
Slava Zanko
3a1936aade
Added vfs_path_t structure
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +03:00
Slava Zanko
2c0ae5aa55
Moved interface functions from lib/vfs/vfs.[ch] to lib/vfs/interface.[ch]
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-23 14:44:57 +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
ccd42c0fab
(mc_config_new_or_override_file): create file w/o O_SYNC flag.
...
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
Slava Zanko
b473577525
Event system: added addition parameter event_init_data to mc_event_del() function.
...
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-06-21 16:13:10 +04:00
Andrew Borodin
3aa74a2320
Added event_group member to the Dlg_head structure
...
...to start use the new event engine in widgets.
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
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
05ae0b187d
Ticket #2459 : if active panel changed type from file listing to info, inactive panel is not become active.
...
How to reproduce:
1. Run mc.
2. Change both panels to listing modes.
3. Switch to the right panel.
4. Switch type of active right panel to info using menu.
Result: left panel is not active.
Expected result: left panel must become active.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-05-04 17:07:25 +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
291abae262
(str_choose_str_functions): small fix.
...
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