Commit Graph

10960 Commits

Author SHA1 Message Date
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
fcfa76be3d Merge branch '2541_save_setup'
* 2541_save_setup:
  (mc_config_new_or_override_file): create file w/o O_SYNC flag.
  (save_setup_cmd): remove home directory and password
  Optimization of history load.
  Optimization of history save.
  Event system: added addition parameter event_init_data to mc_event_del() function.
  Added event_group member to the Dlg_head structure
  (history_save): new function to save widget history
  "Layout" dialog window: remove "Save" button
  src/filemanager/option.c: minor optimization and includes clean up.
  "Panel options" dialog window: remove "Save" button
  "Configure options" dialog window: remove "Save" button
  Ticket #2541: MC saves configuration many times.
2011-06-21 16:15:43 +04: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
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
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
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
417d5504c1 Merge branch '2544_search_trim_leading_spaces'
* 2544_search_trim_leading_spaces:
  Ticket #2544: search dialog trim spaces
2011-05-31 18:57:40 +03: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
23308648e4 Merge branch '2312_lost_panelize'
* 2312_lost_panelize:
  Ticket #2312: panelize content is lost when doing F5/F6/F8 on a file on the other panel.
2011-05-30 17:30:56 +04: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
d74d0b74e3 Merge branch '2556_do_not_mark_files_on_other_panel'
* 2556_do_not_mark_files_on_other_panel:
  Ticket #2556 (incorrect files mark by mouse)
2011-05-28 11:20:43 +00: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
Andrew Borodin
2ed2895cd1 Merge branch '2552_deb_extfs_perl'
* 2552_deb_extfs_perl:
  Added locale setting before calling dpkg to fix "link to" parsing on non-C locales
  Ticket #2552: Browsing *.deb files is broken with latest Perl
2011-05-17 15:50:54 +04: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
5b85bfb5e0 Merge branch '2459_inactive_panel'
* 2459_inactive_panel:
  Ticket #2459: if active panel changed type from file listing to info, inactive panel is not become active.
2011-05-17 15:08:27 +04: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
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
Andrew Borodin
330e3c60bc Dlg_head::parent is unused. Removed.
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
2758599bc2 Merge branch '2535_ftp_segfault'
* 2535_ftp_segfault:
  Check whether VFS provides an open_archive() method.
  Ticket #2535: segfault in FTP VFS
2011-04-12 15:57:50 +04:00
Ilia Maslakov
5acb75c6cd Check whether VFS provides an open_archive() method.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-04-12 12:53:49 +04:00
Andrew Borodin
1796c8536a Ticket #2535: segfault in FTP VFS
...because of uninitialized pointer usage. The bug was introduced
in 68628184b1 commit.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-12 12:31:55 +04:00
Jan Engelhardt
d78cbcac15 Ticket #2524: added mc-4.6 skin.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-09 18:20:36 +04:00
Slava Zanko
f2d8804b5a Comments from po-files now removed automatically after make "update-po" command
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-04-08 11:30:07 +03:00
Andrew Borodin
c18564dcf5 Merge branch '2501_vfs_split'
* 2501_vfs_split:
  CPIO VFS: Use GSList to store inodes.
  Don't handle VFS timestamps for dirs opened in panels.
  local.c: added copyright notice.
  Renamed struct vfs_s_fh to vfs_file_handler_t
  vfs_s_super and vfs_s_fh now don't contain members specific to any vfs.
  sfs.c: reimplemented cached file list using GSList.
  Use GSList to create the list of no-proxied FTP hosts.
  Use GList to store directory content in vfs_s_inode.
  Ticket #2501: continue split of VFS core library and VFS plugins.
2011-04-07 13:46:42 +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