Commit Graph

10949 Commits

Author SHA1 Message Date
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
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 519246eccd Use GList to store directory content in vfs_s_inode.
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 6b09134a01 Merge branch '2516_dragonfly_bsd'
* 2516_dragonfly_bsd:
  Ticket #2516: Fix build failure on DragonFly BSD
2011-04-07 13:33:52 +04:00
Andrew Borodin 32bffa8890 Ticket #2516: Fix build failure on DragonFly BSD
DragonFly BSD doesn't provide MAXNAMLEN macro to define size of d_name
member of dirent structure. NAME_MAX is used if MAXNAMLEN is not
provided by OS.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-04-07 13:32:40 +04:00
Andrew Borodin 12eb8b62c4 Merge branch '2511_editor_alt_arrow_mark'
* 2511_editor_alt_arrow_mark:
  Ticket #2511: fix of column mark with alt-alrrow keys in mcedit.
2011-03-31 11:25:41 +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 78019b896b Merge branch '2520_ctrlg_closes_panels'
* 2520_ctrlg_closes_panels:
  (editcmd_dialog_raw_key_query): fix of result value.
  Fix of DLG_ACTION handling in 'VFS Setting' dialog window.
  Fix of DLG_ACTION handling in 'Chmod' command window.
  Fix of CK_Cancel handling in Tree widget.
  Fix of DLG_ACTION handling in 'Configure options' dialog window.
  Fix of DLG_ACTION handling in interactive help.
  Fix of DLG_ACTION handling in diff viewer.
  Fix of DLG_ACTION handling in viewer.
  Fix of DLG_ACTION handling in file panels.
  Ticket #2520: SIGINT generated by Ctrl-g pressing closes file panels.
2011-03-30 16:18:45 +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