Commit Graph

4707 Commits

Author SHA1 Message Date
Andrew Borodin
6d172837f0 (subshell_name_quote): use GString for string forming.
(do_subshell_chdir): changed related to modified subshell_name_quote().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 10:58:13 +03:00
Andrew Borodin
923d379d5a Code indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-04-12 09:40:55 +04:00
Andrew Borodin
02265113cd Merge branch '2968_viewer_next_prev_mode'
* 2968_viewer_next_prev_mode:
  Fix mode switch after CK_FileNext/CK_FilePrev.
  (regex_command_for): new function to use regex_command in already created viewer/editor
  (exec_extension): rename variable.
  (exec_extension_view): refactoring: remove temporary file in exec_extension().
  Ticket #2968: mcviewer: broken Raw/Parse and Format/UnformatRaw/Parse and Format/Unformat
2013-04-12 09:14:12 +04:00
Andrew Borodin
d70f6b5b63 Fix mode switch after CK_FileNext/CK_FilePrev.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-04-05 19:16:41 +04:00
Andrew Borodin
4d0f17e79a (regex_command_for): new function to use regex_command in already created viewer/editor
...and related changes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-04-05 19:16:38 +04:00
Andrew Borodin
bd8ad7e94b (exec_extension): rename variable. 2013-04-05 19:15:31 +04:00
Slava Zanko
4404af92c0 Ticket #2980: Add missing doc/hints french translation
Hints was split by paragraph (by double new line symbol instead of single newline symbol)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-04-02 11:07:42 +03:00
Andrew Borodin
5c01fea888 (exec_extension_view): refactoring: remove temporary file in exec_extension().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-30 12:20:39 +04:00
Andrew Borodin
b7d42cc1e5 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-29 19:06:27 +04:00
Andrew Borodin
41d5ee716e (editcmd_dialog_completion_show): adjust dialog position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-28 16:53:04 +04:00
Andrew Borodin
4b9e5f50b1 (edit_complete_word_cmd): don't get bytes directly from editor buffer.
(edit_get_match_keyword_cmd): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-28 16:53:04 +04:00
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
4495957319 Ticket #2968: mcviewer: broken Raw/Parse and Format/UnformatRaw/Parse and Format/Unformat
...after CK_FileNext/CK_FilePrev.

Initial commit: refactoring of mcview_t typedef.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-24 13:37:11 +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