Commit Graph

4871 Commits

Author SHA1 Message Date
Andrew Borodin
b0062fd8cd Refactoring of directory size calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 15:42:28 +04:00
Andrew Borodin
ad2ca88bb9 Handle "Skip" button in directory scanning status dialog.
Don't show total size, number and time values of file operations
if directory scanning was skipped before.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 15:42:27 +04:00
Andrew Borodin
f0d34a2500 Ticket #2101: allow skip directory scanning before file operations.
* (compute_dir_size_create_ui): add "Skip" button to the "Directory
  scanning" progress dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 15:42:27 +04:00
Andrew Borodin
27936a4587 Ticket #2493: handle regexp errors in file operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-06 15:21:25 +04:00
Slava Zanko
6777d5044f Code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 18:17:30 +03:00
Slava Zanko
6447c76cca Implementation of getting last editing/viewing position of file.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
278178093e Add support of reading parameters for external editor/viewer from main config.
for example, the config file may contain strings:

[External editor or viewer parameters]
    vim = %filename +%lineno
    mcedit = %filename:%lineno

And these external editors will open a file at the previously saved position.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
2a2bc56221 Add src/execute.c:execute_external_editor_or_viewer() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
08a825680b Code refactoring: split src/execute.c:execute_with_vfs_arg() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
f43b83e7ee Add tests for src/execute.c:execute_with_vfs_arg() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
d32fefee76 Ticket #2206: Add jump support to target line in some external editors
Added own wrapper for _exit() system call. Useful for testing.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:32 +03:00
Andrew Borodin
a11628da62 Ticket #2964: mouse doesn't select text in subshell in native console.
Steps to Reproduce:

1. Run mc in native console (not in X terminal emulator).
2. Press Ctrl+O to switch to subshell.
3. Try select anything with mouse.
Result: mouse does't select anything.

This bug was introduced in 68468a25ac
commit.

Solution: make mouse initialization after initializaton of subshell.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:26:25 +04:00
Andrew Borodin
8e53d1e423 Fix buttons placement in file find result window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:21:40 +04:00
Andrew Borodin
8fbdbb75de Ticket #2958: buttons in the 'Directory hotlist' window are placed incorrectly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:21:40 +04:00
Slava Zanko
f866709186 Concretize the usage of autocompliting in different input fields.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Slava Zanko
2d58735deb Extend QUICK_INPUT and QUICK_LABELED_INPUT macros for getting completion flags via parameters instead of using hardcoded value
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:29:15 +03:00
Ilia Maslakov
81cd5dd242 add option "Ask new file name" in the Configuration box
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2013-01-31 14:57:03 +04:00
Ilia Maslakov
6e5b50cb6f Ticket #2585 (Ask filename before create new file)
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2013-01-31 14:56:52 +04:00
Andrew Borodin
f7cbaca925 (insert_spaces_tab): fix floating point exception.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-23 11:13:24 +04:00
Andrew Borodin
e553caecce Ticket #2953: (edit_move_to_prev_col): fix floating point exception.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-23 10:57:18 +04:00
Slava Zanko
ee8aaf6181 Avoid compiler errors like: error: variable 'xxx' set but not used [-Werror=unused-but-set-variable]
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-01-17 15:21:35 +03:00
Andrew Borodin
3127e8d9ba Clarify usage of use_internal_edit variable
...and disable "Use internal edit" checkbox in case of build
without internal editor.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
c02fac4af7 Merge src/filemanager/option.[ch] to src/filemanager/boxes.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
6cd19ea6cb Remove irrelevant comments about file_date() function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:34 +04:00
Andrew Borodin
ae6e647845 (mc_global_t::shell): new member to store user's shell
...instead of global variable "shell".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
e35f044ccd (subshell_prompt): changed to GString.
(read_subshell_prompt): refactoring to ret rid of low-level memory reallocation.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
0e7810eb5f (read_subshell_prompt): return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
0e6addcb96 Ticket #2944: code cleanup before 4.8.8 release.
(mc_prompt): move from src/setup.[ch] to src/filemanager/midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-16 14:34:11 +04:00
Andrew Borodin
33cac494c0 WHLine: allow draw text over horizontal line.
* (hline_set_text): new function.
  * (file_progress_show_total): use hline_set_text to show processed
  files counter.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
75d165b7c7 Copy/move/delete progress dialog occupies at least 2/3 of screen width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
2176e5f283 Ticket #2076: make copy/move/delete progress dialog wider.
Initial step: get rid of hardcoded width of progress bar.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-01-14 16:23:17 +04:00
Andrew Borodin
8cf9ba1b5c Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-25 08:53:52 +04:00
Ilia Maslakov
4861d06073 Ticket #2914 (disable annoying aspell warnings about spelling language)
Added the aspell param 'spell_language' in ini-file.
    This allow set spelling language. spell_language=NONE - disable aspell support.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-24 13:23:18 +04:00
Andrew Borodin
9862323d11 src/filemanager/find.c: unify i18n resource (button name).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:37:49 +04:00
Andrew Borodin
68ee80abb8 Implement pause in copy/move/delete file operation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-21 13:37:44 +04:00
Andrew Borodin
2f74680628 (init_learn): fix discard of "const" qualifier from pointer target type assignment.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 16:38:06 +04:00
Andrew Borodin
5e070286b1 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 16:22:23 +04:00
Andrew Borodin
6c6ce83af7 Sync with gnulib 40f82767840187c20051ca99385f75a42f92de99.
mountlist: recognize more "dummy" file systems
* src/filenamager/mountlist.c (ME_DUMMY_0):
Add these dummy FS names to the list:
  - "debugfs" virtual filesystem for kernel debugging
  - "devpts" PTY slave filesystem
  - "devtmpfs" device filesystem on top of tmpfs/ramfs
  - "fusectl" control filesystem for FUSE
  - "mqueue" enumerates POSIX message queues
  - "rpc_pipefs" kernel <-> userspace bridge for NFS
  - "sysfs" is for exporting kernel objects
  - "devfs" device filesystem for Linux 2.4 and FreeBSD

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:36 +04:00
Slava Zanko
db2c31decc Add extra checks in macro engine.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 15:35:36 +04:00
Andrew Borodin
8a1971026d Ticket #2935: update uc1541 extfs plug-in up to version 2.5.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
d87a0bfe92 (editcmd_dialog_replace_prompt_show): fix string truncations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
e9f883a3cf Cleanup code related to GLib < 2.12.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
17cadc50ec Portability: use g_ascii_strtoll instead of strtoll, atoll and atof.
Set minimal version of GLib up to 2.12 because of g_ascii_strtoll.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
2eeb950439 Keep some edit window parameters during file reloading.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
d50d1d748d Fix editor crash in "Save as..." command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
368e250102 Ticket #2841: adjust i18n label sizes in learn key dialog.
Learn keys dialogue shows "smaller buttons" when localized key names
include special chars (as the "á" in "Avanzar página" for es_ES locale).
"%Ns" formats for g_snprintf are not reliable for multibyte encodings.
For larger buttons (> 16 characters), padding size must be zero.

Thanks David Martin for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Ilia Maslakov
f25feaab1f Disable the localized output of utilities such as - ls, git, etc..
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 15:35:35 +04:00
Andrew Borodin
82b1d7bff3 Parenthesis around some -1.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
24f0533432 src/filemanager/mountlist.c: use GLib functions to allocate/free memory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
eba12456eb Sync with gnulib 613bcb6205cf2b64d835c19074c5a7e7c6cb99eb
...and ab7a2b67b48deb4c253b3b6bd983690d71515265.

* src/filemanager/mountlist: do not classify a bind-mounted dir entry
as "dummy".

(ME_DUMMY_0): Rename from ME_DUMMY, but omit the "none"-testing clause.
(ME_DUMMY) [MOUNTED_GETMNTENT1]: New macro to encapsulate the exception
for bind-mounted directories.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
9903480096 FileOpContext::preserve: make gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
a5efdb67ce FileOpContext::dive_into_subdirs: make gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:34 +04:00
Andrew Borodin
3762269434 Don't create copy/move progress dialog for background operations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:34 +04:00
Pavel Vasilyev
d4f50f0be5 src/vfs/tar/tar.c: types accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Pavel Vasilyev
03fd500c2e src/vfs/cpio/cpio.c: types accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Pavel Vasilyev
f84bbd8583 vfs_s_subclass::linear_read: return ssize_t instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Pavel Vasilyev
8d71220350 (mcview_search_update_cmd_callback): add type cast for correct condition check.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Andrew Borodin
06e1d21322 (mcview_find): type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:13 +04:00
Andrew Borodin
25689a32bb (edit_find_word_start): type accuracy for word start.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:18:06 +04:00
Andrew Borodin
b10fc3ce59 Ticket #2888: code cleanup before 4.8.7 release.
(editcmd_find): remove incorrect type cast.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:18:06 +04:00
Ilia Maslakov
77c599be70 place cursor after inserted chars by 'block move' command
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 14:08:55 +03:00
Ilia Maslakov
7a5458fd9b place cursor after inserted chars by 'block copy' command
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-12-20 14:08:55 +03:00
Ilia Maslakov
d6a1de5898 added option "Cursor after inserted block" in the options dialog of editor
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 14:08:55 +03:00
Ilia Maslakov
027cc24f28 Ticket #319: place cursor after inserted chars
* Added 'editor_cursor_after_inserted_block' config option (default value is: FALSE)
* Cursor placed at end of inserted chars when extern file is inserted under cursor

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-12-20 14:08:36 +03:00
Andrew Borodin
60727b9b79 Clarify usage of AM_CPPFLAGS.
Use AM_CPPFLAGS not AM_CFLAGS for includes. GLIB_CFLAGS are CPPFLAGS, actually.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
7b184ddea4 PCRE_CFLAGS are CPPFLAGS, actually.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-18 16:27:49 +04:00
Andrew Borodin
33dbb1338e (copy_dir_dir): get rid of extra string duplication.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-29 14:45:18 +04:00
Andrew Borodin
ba6b7ce976 (copy_dir_dir): refactoring: get rid of goto dont_mkdir.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-29 14:45:18 +04:00
Slack
82cfece6ae Ticket #2924: attributes of existing directories are never preserved.
If superuser copies a directory tree (e.g. from a safe backup location
(with sane permission, owner, group, timestamp) over an existing tree,
any attributes are not preserved. All destination dirs retain all their
existing attributes instead of change attributes from source.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-29 14:45:18 +04:00
Slava Zanko
a51df499cd Added parameter quotation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-29 13:21:09 +03:00
Andrew Borodin
7b8e790de0 src/*/*.[ch]: fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-20 13:44:14 +04:00
Andrew Borodin
4e90c1a229 Internal menu structures are opaque now.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
2ec122bc05 Add useful macros for widget type cast.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
665d238ffa Unify widget and dialog message handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:14 +04:00
Andrew Borodin
497b69c106 Remove DLG_WANT_IDLE. Use W_WANT_IDLE instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:44:13 +04:00
Andrew Borodin
843dcd104e Rename Dlg_head to WDialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
0078874613 Rename default callbacks of widget and dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
0ccbe2c547 Unify some hotkeys.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
57d17c994b (editcmd_dialog_raw_key_query): adjust sizes and look'n'feel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
b24b5dd479 (real_query_recursive): refactoring of dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
3fed65e358 "Directory scanning" dialog: adjust look'n'feel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
45179f48e6 Center text in query owerwrite and delete dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
a91682a079 (file_mask_dialog): adjust width calculation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
f14cee4e18 Remove DLG_REVERSE flag.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
40ce25603e Build file operation dialogs in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
d139aa1de2 Build find file dialogs in normal order.
Adjust resize handling.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
a710591b4b Build "Background jobs" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
9845afe083 Build hotlist dialogs in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
c40b5475f5 src/filemanager/hotlist.[ch]: cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
b406fdceb9 Build "External panelize" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
ce922ea7df Build "Layout" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
d514d186dc Build "Advanced chown command" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
da98101f20 src/filemanager/achown.c: cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
3f10e7937a Build "Chown command" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
bf38bce6d9 Build "Chmod command" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
51eac41558 Build "Learn keys" dialog in normal order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
7b16dbf41f src/learch.c: cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
9348f70003 (tree_box): don't apply DLG_REVERSE flag.
Adjust resize handling.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
a39e3fe682 (spell_dialog_spell_suggest_show): fixed widget order in the dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
211a3ec502 (edit_about): reimplement using QuickDialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
322bf132d7 (QUICK_BUTTONS_OK_CANCEL): new macro for often-used dialog buttons.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
ff2d827300 Refactoring of panel format dialog.
(display_box): rename to panel_listing_box. Use QuickDialog engine.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
dfb793ddf3 Reimplement "SMB authentication" dialog using QuckDialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
298201d305 Drop old QuickWidget engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
dca06a6786 mcfilemanager: use new quick dialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
779f111f6d mcedit: use new quick dialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
2fee821a3e mcdiffviewer: use new quick dialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
083e02be31 mcviewer: use new quick dialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
c59a14d438 Associate label with input line and enable/disable them as pair.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
1206d156bf (widget_set_options): new function to set/reset widget options.
Adjust enable/disable widgets.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
c6ddd28366 Unification of widget and dialog callback functions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
05d7f3c84e Aggressive use WIDGET macro.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
2a95cb2ffd Ticket #2919: widget system improvements and unifications.
First step: derive dialog from widget.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:44 +04:00
Andrew Borodin
3bde17c5a6 src/main.c: indentation.
src/filemanager/midnight.c: likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:45:28 +04:00
Andrew Borodin
2940b7455d Fix of DOXYGEN docs: @return instead of @returns
...and other minor corrections.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Ilia Maslakov
ff22fa9ca0 src/filemanager/command.c: add DOXYGEN doc little little code cleanup.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-11-09 10:05:13 +04:00
Andrew Borodin
7c415f2ec5 (enter): use GString instead of hand-made memory (re)allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
1d3132c08f Clarify of sig_atomic_t usage (got from Mutt).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
82bb9c39da Define winch_flag as volatile sig_atomic_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
794145090d Fixups of SIGWINCH handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
f9b6abde52 Don't exit after migration of configuration files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
0ac261de1b Init file highlighting only in full mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
c45a27061b (exit_subshell): return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:12 +04:00
Andrew Borodin
07f36b9cf7 (fish_linear_abort): type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:12 +04:00
Ilia Maslakov
489c3e3242 (fish_file_store): remove unnecessary 'was_error' variable.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-11-09 10:05:12 +04:00
Andrew Borodin
2476f281de (fish_file_store): type accuracy to avoid counter overflow while copiyng huge files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:12 +04:00
Andrew Borodin
b968fe0df8 (ftpfs_file_store): type accuracy and simplify conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:12 +04:00
Yury V. Zaytsev
994c432dd5 Ticket #2888: code cleanup before 4.8.7 release.
src/filemanager/dir.c: refactored growing of dir_list into a separate
function.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-09 10:05:12 +04:00
Andrew Borodin
1fcf90401a (ftpfs_get_reply): fix condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-23 15:18:47 +04:00
Andrew Borodin
56b71ae696 Fixes of indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-22 10:29:43 +04:00
Andrew Borodin
6c94ef16ec Refactoring of endless loops and some type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:52 +04:00
Andrew Borodin
b2f97443e2 Refactoring of subshell support.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:47 +04:00
Slava Zanko
ba0cef24cb make internal library for testing purposes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:46 +04:00
Slava Zanko
7668c09879 remove src/main.h file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:46 +04:00
Slava Zanko
80011ad7cb Move global variables to an appropriate place
...and move update_xterm_title_path() and title_path_prepare()
from src/main.c to src/filemanager/layout.c

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:12 +04:00
Slava Zanko
6d4c3828af move do_load_prompt() and load_prompt() from src/main.c to src/filemanager/layout.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:11 +04:00
Slava Zanko
d6478b8b41 move do_cd from src/main.c to src/filemanager/panel.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-10-21 18:19:11 +04:00
Andrew Borodin
ede5d55197 mcedit: type accuracy in block operation routines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:11 +04:00
Andrew Borodin
8ee5c7247c Fix of sys/ioctl.h includes: use HAVE_SYS_IOCTL_H guard.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:11 +04:00
Andrew Borodin
9cfff5ccbf src/filemanager/Makefile.am: cleanup source file list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
0ffb5b190c Clarify of i18n initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
62d14bd140 Rename _syntax_marker to syntax_marker_t and reimplement it using GSList.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
ee1f657994 (compare_word_to_right): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
576412634f Fix types for line numbers and byte offsets in syntax highlighting engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
962259a224 Many editor functions: take editor as constant object.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
7f7a75f988 (get_first_editor_line): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
8883273bdd (edit_get_syntax_color): return color directly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
ef0dd43430 Rename syntax_rule to edit_syntax_rule_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
3c69a2cafb (book_mark_clear): return gboolean instead of int.
(book_mark_query_color): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
15446985bf Rename _book_mark to edit_book_mark_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
96e463086b (edit_delete): take gboolean instead of int.
(edit_backspace): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
8b0062ad8a (edit_block_move_cmd): minor cleanup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Ilia Maslakov
01bf58e688 mcedit: fix block movement.
steps to reproduce:
1) create text
111111111111111111
222222222222222222
333333333333333333
444444444444444444
555555555555555555

2) select text from line 2 to line 4
3) move cursor to line 3
4) press F6

The block was moved but should't.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-10-20 15:39:44 +04:00
Andrew Borodin
d27a4f86ea Ticket #2888: cleanups in master branch.
Check perl, python and ruby programs and substitute them in various files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:39:44 +04:00
Andrew Borodin
d82757d233 Ticket #2917: Makefile.ams cleanup: remove unused AM_CPPFLAGS.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-20 15:24:30 +04:00
Andrew Borodin
be6a99f910 src/filemanager/mountlist.c: fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 14:45:39 +04:00
Andrew Borodin
7298a32e0f (get_fs_usage): avoid compile warning about mixed declarations and code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 11:52:52 +04:00
Andrew Borodin
d53dc96704 Sync with gnulib ffe10f3d20c2eb77efd56b68f2c22b2a810c289d.
fsusage: port back to Solaris

* src/filemanager/mountlist.c (get_fs_usage): Fix busted logic causing
compile-time error (fsd not declared) on Solaris 10.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 11:52:52 +04:00
Andrew Borodin
be2f25862b Sync with gnulib 2ab2617ee340ff35a9a4c713004fb302868d41b0
* src/filemanager/mountlist.c [STAT_STATVFS && (__linux__ && (__GLIBC__||__UCLIBC__))]:
Undefine STAT_STATFS2_FRSIZE to exclude code not used in this case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 11:52:52 +04:00
Andrew Borodin
37873e6df4 Sync with gnulib b1fac377605c0eef8844fc8d3818d360f37d6fa4:
fs usage: fix block size returned on older Linux 2.6.

* src/filemanager/mountlist.c: Fall back to (struct statfs).f_frsize
which is available since Linux 2.6.
* m4.include/fsusage.m4 (STAT_STATFS2_FRSIZE): Always define
when the member is available so it can be used as a fallback.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 11:52:52 +04:00
Andrew Borodin
4db9168a93 Ticket #2906: crash on Solaris while trying to copy a file.
Sync with gnulib c25bdbae48977a527dff69150f59fb0746d31b51:
fs usage: check for GNU/Linux statvfs problem dynamically.

* src/filemanager/mountlist.c [STAT_STATVFS && __linux__ && (__GLIBC__||__UCLIBC__)]:
Define STAT_STATFS2_BSIZE too, since in this case the code now
checks dynamically whether statvfs is reliable, falling back on
Linux-style statfs otherwise.
(statvfs_works): New function, for dynamically testing statvfs.
(get_fs_usage) [STAT_STATVFS]: Use it.
* src/filemanager/filegui.c (filegui__check_attrs_on_fs): apply the same
statvfs_works function.
* m4.include/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Remove static check for
statvfs on GNU/Linux hosts, since it's now done dynamically.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-12 11:52:52 +04:00
Andrew Borodin
9af54886d6 Ticket #2910: enter into symlink to commpressed patch shows empty patch.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-02 18:25:22 +04:00
Andrew Borodin
aa39bb48b2 Fix i18n of file operation dialog titles.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-27 17:17:03 +04:00
Andrew Borodin
99ef9f6cde Add info about ext.d directory to output of 'mc -F' command.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-27 17:17:03 +04:00
Ilia Maslakov
e6111f1d99 Ticket #2660 (mcedit: reset selection after paste)
mcedit reset selection after the text pasted (only in non-persistent selection mode)

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-25 13:22:26 +04:00
Ilya Molchanov
47f7c1478c Ticket #303 (don't indent blank lines)
don't indent blank lines.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-17 18:42:18 +04:00
Andrew Borodin
d38a0e345a Don't close file and pipe that were not opened.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-11 16:39:26 +04:00
Andrew Borodin
a77f15a1e4 Ticket #2873: diffviewer cannot open file if name contains '$'.
Escape '$' to avoid variable substitution in shell invoked in popen(3) call.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-11 16:39:20 +04:00
Andrew Borodin
28cd54da5a Ticket #2881: (edit_move_forward3): fix two-columns extra offset of cursor
...after tab character.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-11 10:14:48 +04:00
Slava Zanko
b4a10d82cc code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-09-10 15:15:02 +03:00
Ilia Maslakov
55c8f041da fixed doxygen documentation
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +03:00
Ilia Maslakov
fa7a8dcbeb removed obsolete params from edit_push_undo_action/edit_push_redo_action
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +03:00
Yury V. Zaytsev
fbc013421c Ticket #2861: additional error handling in edit_save_block().
If edit->column_highlight is on and the disk is so full that the editor
is unable even to write the magic (r <= 0), then subsequent if (len)
check might fail, since the value of len is undefined.

The solution is to initialize len with a non-zero value, so that the
function properly returns an error value in all cases (adding an
explicit return 0; is also possible, but then one must take care of
closing file descriptors, which is less convenient).

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2012-09-10 14:29:53 +03:00
Andrew Borodin
8b382756bf Use g_strndup() instead of g_strdup()
...to ret rid of extra calculation of string length.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:53 +03:00
Adam Young
5e1ae44eca (get_absolute_name): missing finish NULL in vfs_path_append_vpath_new() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:53 +03:00
Andrew Borodin
45a4197fa6 (edit_do_undo): cleanup of labeled statement usage.
(edit_do_redo): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:53 +03:00
Andrew Borodin
ce0e129891 Fix mouse event handling in menu that overlaps buttonbar.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:53 +03:00
Andrew Borodin
d7482275c3 mcdiffview: code cleanup and cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-10 14:29:52 +03:00
Andrew Borodin
6c249ec0f2 Refactoring of many conditions.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 13:19:19 +04:00
Andrew Borodin
5bf69875dc (edit_do_search): refactoring of search loop condition.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 13:19:19 +04:00
Andrew Borodin
37054596f6 Avoid double checks of bookmarks in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 13:19:19 +04:00
Ilia Maslakov
1b1071cdac Ticket #2876: code cleanup before 4.8.6 release.
mcedit: better support of --disable-charset.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 13:19:19 +04:00
Andrew Borodin
513d30e5a1 Allow create directory with name '~' (tilda).
Use escaping for that (as in shell): \~.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 10:30:28 +04:00
Andrew Borodin
85ed2bd331 Reimplement support of use ~ as home directory in hotlist.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 10:30:28 +04:00
Slava Zanko
e2fb1c8dd3 Ticket #2832: Fixed mcedit: unable to save changes in "Safe save" mode
If mcedit is configured to use "Safe save" I'm unable to save changes to existing file.
Same problem is for editor_option_save_mode=2 (backup mode)
Saving to new file works.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-09-05 14:39:58 +03:00
Roman 'gryf' Dobosz
198a10ca7d fixes following issues:
* F3/F4 on 'del' and 0-length files works, however it is impossible to change 'del'
   files (cached content can be confusing)
 * Koala files and other with non-ASCII characters are supported (implemented directory
   reading routine in pure python - for now only D64 format is supported)
 * Added workaround for filenames with space at the beginning (however, as it was stressed
   before, it is more generic issue than this script. Maybe it is good idea to use pcre
   instead of iterating and splitting?)
 * minor bugfixes and code cleanup

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-09-05 14:29:53 +03:00
Slava Zanko
43e4938a09 Ticket #2864: New implementation of uc1541 VFS
Due to date formatting, uc1541 extfs plugin is unusable, even tough the date formatting,
which is the one cause of the problem is coherent with the attached documentation (MM-DD-YYYY hh:mm).

Another problem with uc1541 script is connected rather with legal characters used in filename
rather than with script itself - in PET ASCII it is perfectly fine to use slash "/" character
in filenames, and as a side effect all files containing slash inside d64 image are represented
as directories on MC.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-09-05 14:29:53 +03:00
Andrew Borodin
028853b567 Adjust i18n stuff in editor menu.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-03 10:07:30 +04:00
Ilia Maslakov
7d34775231 fixed the doxygen documentation.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com
2012-08-30 17:10:05 +04:00
Slava Zanko
405007bca1 Added doxygen comments
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-30 10:45:02 +04:00
Slava Zanko
e2b53f7d21 Added diff_place_t enum.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-30 10:45:02 +04:00
Slava Zanko
872f9daa26 Added action_direction_t type
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-30 10:45:01 +04:00
Gergely Szasz
d8aa98b7d4 Ticket #2863 (mcdiff bidirectional merge enhancement)
Added feature for the mcdiff for the bidirectional merge.
    With F15 mcdiffviewer merge left panel to right panel direction.

    original patch by Gergely Szasz <szaszg@hu.inter.net>

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

added bind "MergeOther" into mc.keymap.default, mc.keymap.emacs.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-08-30 10:43:20 +04:00
Andrew Borodin
30313679b4 Fix of memory leak in TreeStore::check_name destruction.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-29 10:23:52 +04:00
Andrew Borodin
fa27aaf018 Ticket #2862: fix syncronization with filelist and tree panels
...in case of rename and delete directories.

Steps to reproduce the problem:
  * Choose "file listing" mode for one panel and "directory tree" mode for the other.
  * Perform all operations on the "file listing" panel.
  * Create a new directory -> tree view will update correctly.
  * Perform an operation, which changes this directory like rename/delete.
  * Deleted directory will still show up on the "directory tree" view.
Renamed directory will show up with the new name, but the old name will also stay there.

Minor cleanup: remove extra parenthesis.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-29 10:23:52 +04:00
Slava Zanko
c29a5a594d Avoid compiler errors about comparsion signed and unsigned variables
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-27 16:27:43 +04:00
Ilia Maslakov
1326197d1b (is_aligned_on_a_tab): return gboolean instead of int. Minor optimization.
(right_of_four_spaces): likewise.
(left_of_four_spaces): likewise.

Simplifying expression for easy code support.

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>
2012-08-27 16:27:43 +04:00
Ilia Maslakov
ad0f58e51e Use off_t instead of long for all variables related to position in file:
...offset, cursor position, etc.

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>
2012-08-27 16:27:37 +04:00
Andrew Borodin
72f50b458b Use long for line numbers and columns.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
d07af4a374 (edit_find_word_start): return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
6040d5c17a (edit_save_cmd): return gboolean instead of int.
(edit_save_as_cmd): likewise.
(edit_save_confirm_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
7d2975a53e (edit_copy_to_X_buf_cmd): return gboolean instead of int.
(edit_cut_to_X_buf_cmd): likewise.
(edit_paste_from_X_buf_cmd): return gboolean.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
70528dc30a (edit_save_block): return gboolean instead of int.
(edit_save_block_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
2453f82bbd (editcmd_dialog_raw_key_query): take gboolean instead of boolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
32d32996fd (edit_mark_cmd): take gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:24 +04:00
Andrew Borodin
30e185bb69 WEdit::caches_valid: change int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:23 +04:00
Andrew Borodin
d3b7b5987b (is_in_indent): refactoring, return gboolean instead of int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:23 +04:00
Andrew Borodin
dc9df84693 Ticket #1977: type accuracy of WEdit members and mceditor functions.
(line_is_blank): return gboolean instead of int.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-27 16:16:23 +04:00
Slava Zanko
64af4886d6 Ticket #2835: Fixed duplicate entities in panel with 'tree view' mode
Steps to reproduce:

 * run mc
 * go to 'F9 -> left/right panel -> Tree'

Expected result: unique directory names.

Actual result: duplicate directory names
(one name with leading slash, second directory name without leading slash).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-22 16:53:16 +03:00
Ilia Maslakov
73c85ed015 Ticket #2859 (mcedit ctags fix)
How to reproduce:

    on sources: ctags -R .
    with tags in current dir open any file (needn't be C source or headers)
    Alt- (i.e. alt minus or Esc '-')

Current result: sigsegv

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-08-21 13:07:54 +04:00
Slava Zanko
105ac777e1 Ticket #2856: Fixed mceditor 4.8.4 segfaults when aspell dictionaries aren't installed
Steps to reproduce:
 * compile mc with aspell support
 * remove all aspell's dictionaries
 * run mc and try to open any file in the internal editor
 * close the error dialog
 * try to exit from editor

Expected behaviour: a file panels should be shown
Actual behaviour: the segfault here.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-05 19:39:41 +04:00
Andrew Borodin
e31e41e04a Ticket #2854: panel was not refreshed if panel history is called using mouse.
If call panel history using mouse (click on [^] icon on panel top frame)
and then select any path from history, panel was not refreshed to show
actual file list in the new current directory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-05 17:22:39 +04:00
Slava Zanko
b71f35ee60 Implement case insensitive for type keyword.
type/i is used now for case-insensitive type patterns.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-03 15:16:18 +04:00
Andrew Borodin
81c3d80f4b Implement case insensitive for shell keyword.
shell/i is used now for case-insensitive shell patterns.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-03 15:16:17 +04:00
Andrew Borodin
cbcae18836 Implement case insensitive for regex keyword.
regex/i is used now for case-insensitive regular expressions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-03 15:16:17 +04:00
Andrew Borodin
97cd63b9fd Ticket #2250: implement case-insensitive patterns in mc.ext.
(regex_command): minor cleanup and refacroring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-03 15:16:17 +04:00
Andrew Borodin
e39c697df4 Ticket #2853: standalone mcedit doesn't load saved file position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-08-03 10:56:32 +04:00
Andrew Borodin
98564b91a1 Allow define keymap file without .keymap extension
...in the command line, environment variable and configuration file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
908e747861 Optimization of ini files load.
Some ini files (keymaps, skins) are loaded in read-only mode. For those
files, we don't need load and keep comments.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
99ead577f7 Ticket #2848: fixup of user-defined keymap load.
Modify algorithm of keymap files load:
1) Unconditionally load /usr/share/mc/mc.keymap
2) Unconditionally load /etc/mc/mc.keymap
Then load one of following user-defined keymaps, stop on success:
3) set via --keymap command line option
4) set via MC_KEYMAP environment variable
5) set via keymap key in config file
6) ~/.config/mc/mc.keymap

Fix of double load of keymap file if name is same as name of
system-wide keymap file.

Update man pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-31 14:50:11 +04:00
Andrew Borodin
e2f30017a0 Ticket #2858: segfault when viewing HTML files with "mc -v".
(expand_format): don't try expand format and return empty line
for modes that are not used formatted variables.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-30 10:14:46 +04:00
Slava Zanko
7ddc29649b Ticket #2838: Fixed 'Enter' action on a rpm file containing space character in filename
Test case:
 * cp /path/to/any-file.rpm '/tmp/a n y - f i l e.rpm'
 * run /usr/bin/mc, go to /tmp
 * Press Enter on 'a n y - f i l e.rpm' file

Expected result: mc should be entered to RPM package as in directory

Actual result: gor errors:
Inconsistent extfs archive
error: open of /tmp/a\ failed: No such file or directory
...
error: open of e.rpm failed: No such file or directory
-r--r--r-- 1 root root 0 Jun 29 15:12 ERROR

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-19 11:17:16 +03:00
Andrew Borodin
acdac76a49 Revert "Try fix of compile warnings about assigned but unused variables"
This reverts commit 6505f7d6fa.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-18 12:03:31 +04:00
Andrew Borodin
79b44e6be2 (mcview_moveto_eol): comparison of unsigned expression < 0 fixup.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
b37af47023 Makefile.ams cleanup.
Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Slava Zanko
94bd4b1f78 Code indentation.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:04:05 +04:00
Slava Zanko
6505f7d6fa Try fix of compile warnings about assigned but unused variables
...as returned values of functions declared with attribute
warn_unused_result [-Wunused-result].

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-17 17:04:05 +04:00
Andrew Borodin
23c95d36ac Code cleanup: removed unused variables amd removed unnedeed code.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
71ebcc5896 (exec_extension): ret rid of double filename conversion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
fec326f641 Tweak of select codepage code in case of --disable-charset
...in mceditor, mcviewer and mcdiffviewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Ilia Maslakov
973aae2b5e Fix of 'External panelize' dialog: update of 'Command' field content after mouse click.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-07-17 17:04:05 +04:00
Andrew Borodin
40d6e96471 Fix of f13 key handling.
ViewFile doesn't have the default key, and f13 is key for ViewRaw
which is handled in panel not.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Pavel Vasilyev
2c4562d759 Ticket #2538: mcviewer: unused result of str_term_width1().
And reduce size of buffer used to show file size.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Slava Zanko
16a624db07 src/filemanager/mountlist.c: apply mc code indentation policy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Andrew Borodin
e3b36c8b3d Ticket #2845: code cleanup before 4.8.4 release.
Sync with gnulib 06b335ade65c8fe60fee8b9e18b670bb54ed924a:

Write "Mac OS X" instead of "MacOS X".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-17 17:04:05 +04:00
Ilia Maslakov
1d4ca9608a Ticket #2788 (aspell support)
Add aspell support for internal editor.
The aspell library is dinamycally loaded.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-07-12 16:00:45 +04:00
Andrew Borodin
562ef41b15 Ticket #2842: change hotkey for Normal search mode.
In Search dialog in mcedit M-n hotkey was used for normal search mode.
Therefore, M-n as HistoryPrev in the input line was in accessible.

Change hotkey for normal seach mode to M-r. Use this hotkey for normal diff
mode in mcdiffviewer to unify i18n resources.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-08 16:27:48 +04:00
Andrew Borodin
3786051314 Add SFTP to the list of supported VFSes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-05 10:34:30 +03:00
Slava Zanko
8f15940f50 SFTP connections are shown now in 'Active VFS connections' list.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-07-05 10:34:30 +03:00
Andrew Borodin
4841bc608a Fixed reget support in SFTP.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-05 10:34:30 +03:00
Andrew Borodin
3cf76f69bf Ticket #2825: obtain FS name from stat info: sync with coreutils.
src/filemanager/filegui.c does not compile on Solaris due to missing macros.
AVE_STRUCT_STATVFS_F_BASETYPE and HAVE_STRUCT_STATVFS_F_FSTYPENAME macros
are not set or even defined in config.h. configure scrips does not even
check for those members.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-07-02 20:50:19 +04:00
Slava Zanko
614d7f6a08 Fixed the filename escaping issues.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-29 13:14:29 +03:00
Andrew Borodin
af2fe31ff3 Ticket #2829: loss of data on copy to full partition.
While copy/move file, the ENOSPC value of errno wasn't handled.

If destination file isn't comlete because of full partition, source file
is kept and destination one is removed unconditionally.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-26 16:19:22 +04:00
Andrew Borodin
e7fb3526f3 Core, mceditor, mcviewer and mcdiffviewer code tweak and cleanup
...in case of build with --disable-charset option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-25 16:58:57 +04:00
Andrew Borodin
315c499c09 Ticket #2827: tweak and cleanup of code in case of --disable-charset option usage.
First step: tweak vfs-related code.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-25 16:56:11 +04:00
Slava Zanko
da03697e84 Ticket #1535: SFTP support
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-21 14:29:32 +03:00
Andrew Borodin
bf1924e7ff Set fullscreen layout as previous editor look'n'feel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:32:52 +04:00
Andrew Borodin
84aa04fa6e Open several files in mc editor from command line.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
109f07465e Show top opened file in screen list.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
ba79784948 Add icons to close window and toggle window state using mouse.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00