Commit Graph

11495 Commits

Author SHA1 Message Date
Slava Zanko
5eb1ada34e Ticket #2695: Fixed segfault while new file created in editor.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
aae68db301 Fixed creation of lock files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
be271db9f3 Changed function remove_encoding_from_path() for return vfs_path_t type
Also, fixed bug with non-changeable encoding inside archives.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
80d4a13daf fixup! Added tests for examine_cd() function. 2012-04-22 10:31:54 +03:00
Slava Zanko
e4054ad285 panels: Show archive name when entering to archive
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
03643360ad Fixed destination file name when file dialog with single operation is appear
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:54 +03:00
Slava Zanko
29f4c2bdf6 vfs_path: Fixed broken relative paths processing.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Andrew Borodin
de3d2b9061 Reimplemented list of operated files using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-04-22 10:31:53 +03:00
Slava Zanko
27b6ef7e43 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-04-22 10:31:53 +03:00
Slava Zanko
87c0c302a2 Changed src/filemanager/file.c to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
0e96c18858 Changed lot of functions in src/ directory
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
bd21f6d989 Share same code between update_xterm_title_path() and midnight_get_title() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
9dad3cf45c 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-04-22 10:31:53 +03:00
Slava Zanko
7f974fdbbb VFS: Added new function vfs_path_to_str_flags()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
ff85ae5400 Use vfs_path_t in execute.c and subshell.c.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
d590e13fb1 Changed do_cd() and do_panel() functions
...to handle vfs_path_t objects.

Changed panelized_panel_t.root type to vfs_path_t.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:53 +03:00
Slava Zanko
9a7750ca2f Added unit test for do_panel_cd() functions.
Check if empty directory is mean 'change current directory to home dir'.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
493a8ce96d Code refactoring: removed concat_dir_and_file() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
a83624cc75 Code refactoring
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d6eb009bd8 Changed internal viewer to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
95fdd25753 Changed internal editor to use vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d8f91d556a Changed lock_file() and unlock_file() functions
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
5480fe5f80 Changed treestore functions to handle vfs_path_t objects.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
fec5cd6c5d Added function vfs_path_cmp()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
d71e62c9fc Added vfs_path_cmp() ans vfs_path_ncmp() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
89e5604c9c Changed do_reload_dir() function
...to handle vfs_path_t objects.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:52 +03:00
Slava Zanko
a6e13a5756 Push/pop dirstack: changed type of saved items to vfs_path_t type.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
e239aaa307 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-04-22 10:31:51 +03:00
Slava Zanko
916ac05c4b 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-04-22 10:31:51 +03:00
Slava Zanko
5dafd4d809 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-04-22 10:31:51 +03:00
Slava Zanko
fdedfb5d3b 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-04-22 10:31:51 +03:00
Slava Zanko
133cf183b5 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-04-22 10:31:51 +03:00
Ilia Maslakov
4267c04b69 subshell.c: changed printf message into stserr to the vfs_print_message
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-04-22 10:31:51 +03:00
Slava Zanko
490af62655 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-04-22 10:31:51 +03:00
Slava Zanko
893ed22259 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-04-22 10:31:51 +03:00
Slava Zanko
6cde215e0e 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-04-22 10:31:51 +03:00
Slava Zanko
a337f84ded 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-04-22 10:31:50 +03:00
Slava Zanko
617359e871 Added unit-tests for mc_tmpdir() and mc_mkstemps() functions
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
eb5543f02f Moved functions mc_mkstemp() and mc_tempdir() to VFS module.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
d376b6ed40 Changed interface of function mc_open() for handle vfs_path_t object as parameter
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
82e07617ae Changed interface of function mc_symlink()
...to handle vfs_path_t object as parameter.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
890f1f9242 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-04-22 10:31:50 +03:00
Slava Zanko
a78f87d30d 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-04-22 10:31:50 +03:00
Slava Zanko
cb2ad816f6 changed interface of function mc_setctl() for handle vfs_path_t object as parameter
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
eaa71ed519 Removed split_dir_name() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
e51c9e50fe Changed interface of function mc_opendir()
...to handle vfs_path_t object as parameter.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:50 +03:00
Slava Zanko
32c6bde080 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-04-22 10:31:49 +03:00
Slava Zanko
a959d2843f added vfs_path_build_filename() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:49 +03:00
Slava Zanko
aecdc1a32e changed interface of function mc_chdir() for handle vfs_path_t object as parameter
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:49 +03:00
Slava Zanko
19201165a2 VFS core: vfs_s_free_inode() function have global visibility
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-04-22 10:31:49 +03:00