Commit Graph

4871 Commits

Author SHA1 Message Date
Andrew Borodin
32ffd98e87 Refactoring: move members from WEdit to edit_buffer_t and rename related functions:
WEdit::last_byte -> edit_buffer_t::size
WEdit::total_lines -> edit_buffer_t::lines
WEdit::curs_line -> edit_buffer_t::curs_line

edit_count_lines() -> edit_buffer_count_lines()

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:03 +04:00
Andrew Borodin
253d27b1a3 (get_paragraph): refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:03 +04:00
Andrew Borodin
c5d35ac93b A lot of type accuracies.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
c466b18f67 (edit_indent_width, edit_insert_indent): move to wordproc.c and make static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
ca26181f5d Rename edit_buffer_t members.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
7facc1da05 Use GPtrArray to store editor buffers.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
60fe43d932 (edit_cursor_move): refactoring using editor buffer API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
ed8c80f48d New editor buffer API to delete character at cursor position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
e335bba08c New editor buffer API to insert character at cursor position.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
706257a47d (edit_buffer_write_file): refactoring: return number of written bytes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
64760b56c5 (edit_buffer_write_file): new editor buffer API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
e6ff98d239 (edit_buffer_read_file): refactoring: return number of read bytes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
fc8044e178 (edit_buffer_read_file): new editor buffer API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
cd9a56109d Refactoring editor buffer API of bytes/symbols get.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:02 +04:00
Andrew Borodin
e056726606 Refactoring of init/clean editor buffer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:07:16 +04:00
Andrew Borodin
f56de22de5 Start of edit buffers refactoring.
Move buffers to separate class.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:07:16 +04:00
Andrew Borodin
23c2df198c (edit_move_updown): avoid extra search of multi-byte character start.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:07:16 +04:00
Andrew Borodin
f3dc8142e8 Ticket #1743: remove limit of file size in mcedit.
Initial commit: refactoring:
  * (edit_load_file_fast): always load whole file.
  * (edit_load_file): don't ignore result of edit_load_file_fast().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:07:16 +04:00
Egmont Koblinger
913a984743 (find_rotate_dash): invert the boolean argument
...to be consistent with the new rotate_dash() behavior and to be
intuitive.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-02 20:53:00 +04:00
Andrew Borodin
aeb8933543 Ticket #2163: rotating dash is not removed when mc finishes reading the directory
...or when other long aperation is finished.

(rotate_dash): add argument to show/hide dash. Move dash to the corner
of the right/top panel from corner of the screen.

Thanks Egmont Koblinger for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-02 20:53:00 +04:00
Andrew Borodin
45d8b20ad9 --with-edit: rename to --with-internal-edit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-02 15:29:35 +03:00
Victor Ananjevsky
6a83ddacd3 Fix bug with segfault when we tried to create new file in an external editor (by pressing shift-F4)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-02 15:29:35 +03:00
Slava Zanko
9d081bec5a Ticket #3020: segfault on creating new file in external editor
Fixes for compiling code without warnings and errors when the --disable-editor option is specified

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-02 15:29:35 +03:00
Andrew Borodin
1bb36fd589 Don't adjust viewer parameters twice after search in the hex mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 14:30:00 +04:00
Andrew Borodin
24d746ad2b Ticket #2706: hex viewer: continue search doesn't work.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 14:30:00 +04:00
Andrew Borodin
eb917257b1 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:33:03 +04:00
Andrew Borodin
48abe8735f Rename functions:
init_widget -> widget_init
create_dlg -> dlg_create
init_dlg -> dlg_init
run_dlg -> dlg_run
destroy_dlg -> dlg_destroy

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
0adf569b54 (dlg_overlap): rename to widget_overlapped()
...and move to lib/widget/widget-common.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
c7da120588 (dlg_replace_widget): rename to widget_replace()
...and move to lib/widget/widget-common.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
1672fa44dd (dlg_widget_active): rename to widget_is_active()
...and move to lib/widget/widget-common.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
405143ba9f (mcview_ok_to_quit): move to actions_cmd.c and make static.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
d5b35a7329 WTree: fix double-click handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Slava Zanko
d2eac2f5af Code reorganization and fixes around the vfs_path_as_str() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-28 09:21:16 +04:00
Andrew Borodin
32bc72a1d7 (vfs_path_as_string): clarify return value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Andrew Borodin
c45e109515 Fix draw of tree mini-status.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Andrew Borodin
d9b41df7a1 Ticket #2071: a bit cleanup of getting profile name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Andrew Borodin
e066a25cc5 Ticket #2164: clarify cursor position in mcviewer.
When viewing a file, the cursor's position is different in the slang
and ncurses builds.

With slang, the cursor is in the upper right corner, on the percent sign.

With ncurses, the cursor wraps around to the beginning of the next line,
that is, the top left corner of the actual file contents viewing area.

In this commit, cursor is moved to upper right corner unconditionally
after print of percentage value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Andrew Borodin
805bb61c2a Ticket# 2990: prepare to 4.8.9 release.
(mcview_load): clarify error message.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:16 +04:00
Slava Zanko
90209d3097 Code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-19 22:56:55 +03:00
Andrew Borodin
fc34675093 src/vfs/sftpfs/vfs_subclass.c: add missing includes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-18 12:52:18 +03:00
Slava Zanko
cb08c1d0bf Fix: sftp: password ask too often if hostname was bring from ~/.ssh/config file
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-18 12:52:18 +03:00
Andrew Borodin
f2c94d53d2 Ticket #2923: broken aliases in SFTPFS.
(sftpfs_correct_file_name): fix handling of tilde-starting file names.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-18 12:52:18 +03:00
Veres Lajos
805703523d Misspellings fixes by https://github.com/vlajos/misspell_fixer
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-15 11:10:41 +04:00
Slava Zanko
4b1f94e873 Direct commit in master: fix bug with a directory deletion
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-12 15:15:57 +03:00
Slava Zanko
56520fda0f Ticket #3016: Segfault while entering into extfs archive
Current master (4.8.8-49-g6b64835) segfaults while entering into any extfs archive (zip, rar, etc).
Bad commit is 2640b21bb9.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-12 12:01:33 +03:00
Andrew Borodin
74ed317f35 Cleanup: remove unused 'prompt_pos' variable.
(do_subshell_chdir): remove 'reset_prompt' argument because of removed
'prompt_pos'.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-08 18:06:55 +04:00
Andrew Borodin
f6684c638d Ticket #3001: fix read and update of subshell prompt.
The bug was introduced in e35f044ccd.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-08 18:06:54 +04:00
Andrew Borodin
7b5b41147d Ticket #3000: incorrect file size is reported in copy/move overwrite query dialog.
(overwrite_query_dialog): adjust file size.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 12:11:14 +04:00
Boris Savelev
426f114a93 Remove LC_ALL from info_size.
INFO file generate without LC_ALL e.g. in current locale. Size must be computed with same locale, otherwise INFO file will be chopped of
2013-06-03 14:21:03 +03:00
Andrew Borodin
6b0ee515ad mceditor: last_bracket: make member of WEdit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Andrew Borodin
e7dc599e42 Use "'" instead of "`" for messages and comments quoting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Andrew Borodin
d0955f3793 Search callbacks should return mc_search_cbret_t not int.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:03 +03:00
Andrew Borodin
f89d862241 Minor otimization of syntax highlightimg engine:
ret rid of extra copying of WEdit::rule.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
7b574f1dbc (compare_word_to_right): use correct upper boundary of scanned text. 2013-06-03 14:21:02 +03:00
Andrew Borodin
412095a562 option_whole_chars_search: unsed variable. Remove it and related code.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
1e985bc7df (edit_update_screen): fix of editor frame drawing.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
b9c0b56928 src/editor/editcmd.c: remove unneeded include layout.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
57bb2b87c2 (edit_about): update year.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
6d31d85f0d Use tty_draw_box instead of draw_box() to draw frames.
* (draw_box): remove.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
a35ee6aebc (smbfs_fake_share_stat): don't access to free'd memory.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:01 +03:00
Slava Zanko
2640b21bb9 Remove vfs_path_to_str() function for avoid often memory allocations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 14:21:01 +03:00
Andrew Borodin
31bacf56c9 Use G_N_ELEMENTS macro to calculate of array size.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 10:58:14 +03:00
Andrew Borodin
9f80eda26e WEdit::labels is unused. Remove.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 10:58:14 +03:00
Slava Zanko
80c8d58003 remove the include duplicates from source files
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-03 10:58:14 +03:00
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
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