Commit Graph

4695 Commits

Author SHA1 Message Date
Andrew Borodin
77af739bdd (edit_complete_word_cmd): make correct charset conversion
...before insert autocompletion result.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-28 16:50:22 +04:00
Andrew Borodin
7fe85d0bd8 Ticket #2957: broken autocompletion in mcedit
...if system and file charsets are different.

Initial step: refactoring: do actual completion word substitution
outside of editcmd_dialog_completion_show().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-21 09:27:08 +04:00
Gergely Szász
b8208b0514 Ticket #2976: magic mode is broken in mcview.
The bug:
  If we open a file with F3 from panels, then mc uses "file extension"
  style open (e.g. archive.sh) and Format/Raw switching is O.K.

  If we open file in "Raw" mode, or use quick view, mc opens files
  without "file extension" helpers. Format/Raw switching is broken.

  In mcview_load() we check magic_mode and detect "compressed" files.
  If magic mode is on and file is "compressed" we free the current vpath
  and generate a new vpath with "decompress magic", but nothing else.
  So, the file name disappear and we see the raw content.
  After user press F8, mcview reloads the file. Now filename is the "new"
  magic filename. mcview_load() open the file with the decompress "helper"
  (using sfs). We see the uncompressed (parsed) content.
  After user press F8, nothing happend, because original file name is lost.

The solution:
  Remove the old vpath destruction.
  Open the file with "uncopress magic" if magic_mode is on and file is
  "compressed".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-20 17:01:38 +04:00
Andrew Borodin
68609b79b0 Code indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-12 14:05:10 +04:00
Andrew Borodin
2254b24008 Refactoring: use GString instead of "struct selection".
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:51 +04:00
Andrew Borodin
18cc9ac0dd (edit_translate_key): move from editkeys.c into editwidget.c
...and remove editkeys.c since it is empty.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
a85fc3367e Sync with gnulib 62bb7a8bf95807d6339e1e17fc0d21c319b280a2.
* src/filemanager/lib/mountlist.c: port to HP NonStop.
(hasmntopt) [!HAVE_HASMNTOPT]: New function.
(MNT_IGNORE) [MNTOPT_IGNORE]: Use it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
b3bc856974 Adjust look'n'feel of editor options dialog window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
6787221c15 (overwrite_query_dialog): adjust dialog size.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
30959e0b7d Clarify widget redraw in runtime.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
f1316549a2 (edit_insert_over): move from src/editor/editcmd.c into src/editor/edit.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
17ceb233b0 (edit_insert_column_of_text_from_file): refactoring:
* move from src/editor/editcmd.c into src/editor/edit.c and make static;
  * rename to edit_insert_column_from_file;
  * make some refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
ef35db06d2 (edit_get_byte): refactoring: use edit_get_byte_ptr().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
556192bd4a (init_panelize): support --disable-nls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
c52003ec43 More use SELECTED_IS_PANEL define.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
f6a5241e18 (mcview_scroll_to_cursor): make static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
2f25803ce2 Sync with gnulib 47f4ca8fe9506254200028c8a8c5fffbf1bf1161
Don't consider "devtmpfs" as dummy.

* src/filemanager/mountlist.c (ME_DUMMY_0): Remove "devtmpfs"
as there is storage associcated with it.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
0d26829289 (mc_defines_destroy): use g_strfreev.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Slava Zanko
c984447f8e Rename vfs_path_cmp() to vfs_path_equals()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-03-09 16:04:18 +04:00
Andrew Borodin
8454f12f8f Ticket #2954: fix typo: occured -> occurred.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
3ecfeb04da Get rid of g_return_* macros in file operation routines
...since they produce warnings about non-created UI and clutter screen
up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
bbf84a02e4 (check_progress_buttons): redraw file progress dialog
...after step from "Suspend" state to "Skip" one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:18 +04:00
Andrew Borodin
c521ca12d5 Don't close the file progress dialog after press on "Skip" button.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:17 +04:00
Andrew Borodin
96d8539e3a While scanning directories, print directory counter and size
...in addition to directory name.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 15:42:28 +04:00
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