Commit Graph

1233 Commits

Author SHA1 Message Date
Slava Zanko
0d489acd58 cppcheck: reduce variable scope.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
a3b8a2f005 Use UTF8_CHAR_LEN instead of a magic number
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
bd69b8dd31 Suppress cppcheck errors
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-25 13:47:39 +04:00
Slava Zanko
a57d45d590 Ticket #3098: vfs_path_from_str_flags() doesn't support VPF_STRIP_HOME
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-11-08 16:57:42 +03:00
Andrew Borodin
09f1818bed Ticket #3018: broken directory completion.
In the command line, the subdirectory completion in current directory
isn't performed if stub isn't starting with './'.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 21:23:43 +04:00
Andrew Borodin
c7b7a299e3 Ticket #3084: (dlg_init): fix order of messages sent to widgets during dialog initialization.
If checkbox is the first focusable widget in a dialog, it taken the MSG_DRAW
message after MSG_FOCUS one and therefore wasn't highlighted.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:59:26 +04:00
Andrew Borodin
5a61ac80d0 Refactoring of WInput history.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00
Andrew Borodin
de94164cb5 Remove WInput::field_width. Use Widget::cols instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00
Andrew Borodin
e16e33a186 (input_update): don't do anything if widget is unowned or is in inactive dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00
Andrew Borodin
d8bb31c665 Ticket #3076: copy/move doesn't work if num_history_items_recorded=0.
How to reproduce:
1. Set num_history_items_recorded=0 in my $HOME/.config/mc/ini
2. Run mc.
3. Press F5 to copy and then enter.
Result: nothing happens.

Solution: refactoring of initial text usage in input line.
Use def_text to fill WInput:buffer when WInput is created.
Then overwrite WInput::buffer content from history if history usage
is enabled.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-11-07 15:53:53 +04:00
Andrew Borodin
5a04c1ede2 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:27:24 +04:00
Andrew Borodin
6a05f30ecf Clarify usage of SA_RESTART.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:09 +04:00
Andrew Borodin
c058e92586 Remove input_set_origin(). Use widget_set_size() instead.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
b0a793c420 (input_destroy): don't call input_free_completions() twice.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
61dc030772 More tests for canonicalize_pathname().
(custom_canonicalize_pathname): fix wrong condition. Remove redundant
break.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
e78b1fdf66 Remove redundant checks for g_strdup().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
034e973fbf (vfs_translate_path): return const char *.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
a6b3cc8f24 Typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:08 +04:00
Andrew Borodin
200cb115ab (widget_init): init pos_flags member to WPOS_KEEP_DEFAULT.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:14:07 +04:00
Andrew Borodin
0a784f4d2e (mc_search_regex__process_append_str): minor optimization and cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
fbdf3adfbf (mc_search__cond_struct_new_regex_accum_append): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
d119439a1c (mc_search__conditions_free): use g_ptr_array_foreach().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:12:08 +04:00
Andrew Borodin
00f6272364 (mc_search__cond_struct_new_regex_hex_add): refactoring to get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb2f5d35f3 (mc_search__run_regex): optimization
...for case where there is no MC_SEARCH_CB_INVALID or MC_SEARCH_CB_SKIP
return codes (for search from file manager), so we can copy line
at regex buffer all at once.

Thanks Sergey Naumov <sknaumov@gmail.com> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:05 +04:00
Andrew Borodin
bb142bf47f (lookup_key): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
546e89f611 (vfs_path_tokens_get): minor refactoring: replace while() by for().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
f3bdcb186b (mc_skin_colors_old_configure_one): cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Andrew Borodin
26fbddf6f4 (vfs_path_tokens_count): refactoring: get rid of extra memory allocation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-04 09:11:04 +04:00
Egmont Koblinger
930f683019 Handle newline and tab with shift/ctrl modifiers correctly.
MC already has its own half-ready trick: when pasting with Shift-Insert,
using the X11 extension, the newline ("Enter" as mc calls it) with the
Shift modifier pressed gets converted to a "Return", and in the editor
the Return character inserts a non-indenting newline. This makes pasting
better in terminals not supporting bracketed paste, however, it has some
problems that this commit addresses:

  * Shift+newline gets this special treatment, but Ctrl+newline gets
    dropped. Hence e.g. when pasting in Gnome-terminal with Ctrl+Shift+V
    all the newlines will be missing. This commit adds the same
    non-indenting newline behavior to Ctrl+Newline and Ctrl+Shift+Newline.

  * The code forgets about Tab that also needs special treatment:

    - Most terminals send \e[Z on Shift+Tab, this is not handled by MC
      at all, moreover it causes a hang for about a second. This commit
      teaches this sequence to MC. This is especially useful when no X11
      is available, because there Ctrl+Tab is identical to Tab, so the
      backwards tab feature is not available. With this commit Shift+Tab
      becomes a backwards tab too on all terminals that emit \e[Z.

    - When pasting to the editor, Shift+Tab, Ctrl+Tab and Ctrl+Shift+Tab
      should all insert a tab for the same reason mentioned at the newline.

    - It would look inconsistent in the keymap files to have logical code
      such as "backtab" instead of "shift-tab" and friends, hence get rid
      of KEY_BTAB and use KEY_M_SHIFT | '\t' instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Egmont Koblinger
8f35c90b94 Ticket #2661: support enable bracketed paste of xterm.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-10-03 11:41:58 +04:00
Slava Zanko
0b0f7e3975 Refactoring: use define DEFAULT_CHARSET for "ASCII" charset.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-21 13:35:59 +04:00
Andrew Borodin
941a1eac1d Search: better support of --disable-charset
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-21 13:35:56 +04:00
Andrew Borodin
66da276200 Ticket 3069: fix of case-sensitive search
...if file encoding and locale are different.

Example: locale is KOI8-R, file encoding is UTF-8. Note: those encodings
are not same.

File content is following (in Russian):

йцукен
Йцукен

The difference is in first line char only: Й (lowercase letter) and й
(uppercase letter).  The search of Ê gives the result Й independently of
case sensitivity. й isn't found.
If switch "All charsets" on, nothing is found.

The main idea of fix is modification of search API to allow set of search
pattern charset and use if within search engine.
Old API:
mc_search_new (pattern, pattern_len);
New API:
mc_search_new (pattern, pattern_len, pattern_charset);

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-09-21 13:35:31 +04:00
Slava Zanko
8a28d3bac4 Rename type file_entry to the file_entry_t.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-09-19 16:22:30 +04:00
Andrew Borodin
511850e52b (hline_callback): fix of MSG_INIT and MSG_RESIZE messages handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-08-02 21:58:45 +04:00
Andrew Borodin
b451e8d13d (menubar_new): add 3rd 'visible' argument.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-08-02 21:58:45 +04:00
Andrew Borodin
f9eed1fcef Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:15:29 +04:00
Veres Lajos
dfbb2c9430 Typo fixes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:15:24 +04:00
Slava Zanko
857fe38e87 Fix panel recoding
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-23 14:15:24 +04:00
Andrew Borodin
9e5d51df95 Ticket #3043: broken NCurses detection.
HAVE_NCURSESW_CURSES_H included the wrong header.

Partially revert 80c8d58003
for lib/tty/tty-ncurses.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:15:24 +04:00
Andrew Borodin
ab3f53fbbe Add DIR_IS_DOT and DIR_IS_DOTDOT macros
...to detect "." and ".." directories, respectively.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:15:24 +04:00
Andrew Borodin
17aef88637 lib/strutil/strutilutf8.c: cosmetics and minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:01:05 +04:00
Andrew Borodin
7ee58f73ff lib/strutil/strutil8bit.c: cosmetics and minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:01:05 +04:00
Andrew Borodin
9e4d279885 lib/strutil/strutilascii.c: cosmetics and minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:01:05 +04:00
Andrew Borodin
5b91108b3c lib/strutil/strutil.c: cosmetics and minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-23 14:01:05 +04:00
Slava Zanko
0013adeeba Ticket #2992: mc fails to link when system lib does not contain strverscmp
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-07-09 13:44:51 +03:00
Amadeusz Sławiński
33c47b5734 Ticket #3025: race condition when creating temporary directory.
When there's no mc-tmpdir and a user tries to start two mc sessions
simultaneously, sometimes (in one out of ten attempts on my machine) one
mc session emits the following error message:

Cannot create temporary directory /tmp/mc-lars: File exists (17)
Temporary files will be created in /tmp
Press any key to continue...

Steps to reproduce:

# rm /tmp/mc-$(whoami) -rf
# uxterm -e mc & uxterm -e mc

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 20:58:41 +04:00
Andrew Borodin
ccf82ada12 Add functions to transform string to unsigned integer:
* (xstrtoumax): from gnulib.
 * (parse_integer): from coreutils (dd.c).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-07-05 09:09:03 +04:00
Andrew Borodin
de2a934b37 lib/search/search.c: cosmetics.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 13:20:08 +04:00
Andrew Borodin
4f16d7e8f0 Ticket #3026: Find File: "All charsets" options don't work.
(mc_search_prepare): use cp_display not cp_source to convert text to all
available charsets.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 13:20:08 +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
970cfd881a (dlg_mouse_event): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +04:00
Andrew Borodin
01c5cf66a5 (dlg_default_callback): get rid of extra type cast.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-28 09:21:17 +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
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
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
André Barros
9699d5dd69 Ticket #3011: mc under x11 problems with mouse or hang due gpm
mc may not detect the gpm mouse under X11 on many x terminals when running together with tmux or screen.

On some cases it can even hang.

It's a small patch to the gpm maintainer to improve its checking.
Seems there is a need also to a small change on mc.

Now everything is working perfectly.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-06-10 20:08:56 +03:00
Andrew Borodin
5b1982a6bb (strip_ctrl_codes): type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-08 18:06:55 +04:00
Andrew Borodin
d83902e7fc (size_trunc_len): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 13:06:51 +04:00
Andrew Borodin
ceff7c5922 size_trunc_len() generates incorrect result in some cases.
Revert "(size_trunc_len): support automatic maximum unit for specified size."
This reverts commit ef94b84eaf.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-07 12:12:34 +04: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
3662b84ba1 (vfs_get_encoding): optimization and enhancement:
* get rid of extra memory duplication;
  * support of recursive search of correct encoding;
  * add tests.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-06-03 14:21:02 +03:00
Andrew Borodin
6b90a1468a (button_set_text): update value of WButton::hotpos.
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
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
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
Denys Vlasenko
664e7d31b6 When we see an unknown sequence, it is not enough
to drop already received part - there can be more of it
coming over e.g. a serial line.

To prevent interpreting it as a random garbage,
eat and discard all chars that follow.
Small, but non-zero timeout is needed to reconnect
escape sequence split up by a serial line.

Before this change, Ctrl-Alt-Shift-Right_Arrow generates "1;8C"
bogus "input" in MC on my machine; after the change,
nothing is generated.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-05-23 11:42:02 +03:00
Denys Vlasenko
ecd3b62b8e This change prevents misinterpreting an unknown ESC sequence's
tail as a garbage input. To reproduce, run "sleep 3" and
hold down Down_Arrow key until sleep runs.
With debugging log enabled, the following can be seen:

entered get_key_code(no_delay:0)
 c=tty_lowlevel_getch()=27
 push_char(27) !0
 c=xgetch_second()=91
 push_char(91) !0
 2 c=tty_lowlevel_getch()=66
 push_char(66)
 seq_buffer[0]:27   <---- the saved Down Arrow sequence "ESC [ B"
 seq_buffer[1]:91
 seq_buffer[2]:66
 seq_buffer[3]:0
pending_keys!=NULL. m=-1
d=*pending_keys++=27
d=ALT(*pending_keys++)=ALT(91)=8283
^^^^^^^^^^^^^^^^^^^^^^^ we misinterpret "ESC [ B" as "ESC ["
return correct_key_code(8283)
entered get_key_code(no_delay:0)
pending_keys!=NULL. m=-1
d=*pending_keys++=66
^^^^^^^^^^^^ we think user pressed "B"
return correct_key_code(66)

With this patch, no bogus "input" is generated.

Longer unknown sequences need an additional fix, coming next.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-05-23 11:42:02 +03:00
Denys Vlasenko
77cfaf03cb Ticket #2988: When an unknown key is pressed, it is interpreted as garbage.
keyboard input: simplify code, no logic changes

This change slightly simplifies and rearranges the code
in get_key_code(), reduces indentation levels there,
adds a few comments. The logic remains the same.

This is a preparatory patch for subsequent changes.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-05-23 11:41:25 +03:00
Andrew Borodin
f23f0613ec Ticket #2991: fix redraw of WLabel after text change.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-04-08 15:46:39 +04:00
Andrew Borodin
705afe88c0 (mc_config_new_or_override_file): minor optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:51 +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
ef94b84eaf (size_trunc_len): support automatic maximum unit for specified size.
Fix typos.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-09 16:04:19 +04:00
Andrew Borodin
9b0b017201 (input_update): minor optimization: don't call str_term_width2() twice.
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
e29d98336b Ticket #2971: mouse click below non-droppeddown menubar activates menu box.
How to reproduce:
1. Switch the "Drop down menus" option off.
2. Press F9 to activate menubar. Menu is not dropped.
3. Click somewhere below menubar, on one of the files in the directory
listing.

Buggy behavior: the corresponding "Left" or "File" etc. dropdown is
opened, and the mouse button is released, menu item under the mouse
cursor is activated.

Correct behavior: clicking with the mouse somewhere other than the
active menubar doesn't open dropdown menu, instead removes the focus from
menubar and acts on the actual item under the mouse pointer (such
as a filename in the panel).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-03-05 16:51:52 +04: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
e50c3f8475 mc_config_get_string(): if default parameter is NULL, then no any config entities will be created
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
5b63c39459 mc_config_get_string_raw(): if default parameter is NULL, then no any config entities will be created
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
808988b1f1 Add lib/strutil/replace:str_replace_all() function.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:40:37 +03:00
Slava Zanko
2406284762 Add function lib/utilunix.c:my_systemv_flags()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
c2f030f2e8 Add new functions:
* int my_systeml (int flags, const char *shell, ...);
 * int my_systemv (const char *command, char *const argv[]);

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-16 17:39:33 +03:00
Slava Zanko
1535d12d43 Code refactoring: my_system was split by few functions.
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
b66a1e0592 Code indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:42:27 +04:00
Slava Zanko
5445133766 mc_search__translate_replace_glob_to_regex(): Avoid warnings
...if function is called with 'const char *' argument.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-14 14:30:38 +04:00
Andrew Borodin
d8340c30da Ticket #2626: special chars are not escaped in autocompletion of filenames.
Test case:
1. Create a file with name that contains some special chars:
   touch attachment.cgi?id=564208
2. Press F6.
3. Press a. Now only the 'a' letter is in input line.
4. Press Esc Tab Enter.
5a. Input line is filled by 'attachment.cgi?id=564208'...
5b. but 'attachment.cgi\?id=564208' is expected.
6. Add 'patch_' before file name:
   'patch_attachment.cgi?id=564208'.
7. Press Enter.
8a. Result: 'patch_attachment.cgiattachment.cgi?id=564208id=564208'.
8b. Expected result: 'patch_attachment.cgi?id=564208'.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-14 14:30:38 +04: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
Slava Zanko
0f9ca096a3 Code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-13 14:24:45 +03:00
Slava Zanko
7e115b3024 Code refactoring: removed unneeded 'go to' label.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-13 14:18:57 +03:00
Egmont Koblinger
1515c9f152 Ticket #2956: Newer protocol for extended mouse clicks.
A followup extension, "SGR 1006" was invented by xterm, to overcome some
of the shortcomings of the previous one. It is becoming as widespread as
the previous one, and is likely to soon overtake it in popularity.

Note that most of the patch is just the removal of the huge complexity
introduced by the previous one. The previous extension didn't have a
unique prefix which made the whole parsing logic extremely complicated.
The new extension does have a unique prefix, so parsing becomes a piece
of cake. The code becomes much cleaner and much easier to maintain.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-13 14:18:57 +03:00
Andrew Borodin
0608af276e lib/widget/input_complete.c: minor refactoring and optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-04 15:48:21 +03:00
Slava Zanko
f7109ab46b Fix for input completions with spaces in names.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:48:21 +03:00
Andrew Borodin
c308d5ed21 lib/widget/input_complete.c: refactoring:
* (filename_completion_function): use GString to ret rid of hand-made
  low-level memory allocation.
  * (variable_completion_function): likewise.
  * (hostname_completion_function): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2013-02-04 15:48:21 +03: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
Slava Zanko
9935acea33 Ticket #55: savannah: tab completion vs. spaces and escaping
* Split big functions.
* Add unit tests

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2013-02-04 15:29:15 +03: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
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
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
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
161a5af516 Ticket #2111: allow pause in copy/move/delete file operation.
Initial step: if button callback retuns zero, don't close the dialog after
button press.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-21 13:37:39 +04:00
Andrew Borodin
5e070286b1 Indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 16:22:23 +04:00
Andrew Borodin
30dbb79655 (del_widget): fix memory leak.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
0e5b483974 Portability: rename some str_class members
...to avoid conflict with global names.

On HP-UX, inttypes.h includes ctype.h through other dependencies, ctype.h
defines macros for various functions and these macros clash with entries
of "struct str_class".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Mikulas Patocka
b475e31255 Portability: ESC_CHAR is defined in /usr/include/langinfo.h in some systems
...so undefine it to avoid warning.

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
e574972d58 Fix crash when user menu is called in editor with no filename.
(mc_search): immediately return FALSE if str is NULL.
(mc_search_run): immediately return FALSE if user_data is NULL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:35 +04:00
Andrew Borodin
3fc490ea12 (add_widget_autopos): don't access to NULL widget.
(del_widget): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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
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
fafd75c807 lib/vfs/direntry.c: types accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Andrew Borodin
848318f95f lib/vfs/vfs.h: indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:35:18 +04:00
Andrew Borodin
1f1be9ac93 lib/tty/color.c: use unsigned type for conversion between integer and pointer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:18:06 +04:00
Andrew Borodin
04942e5f2b (str_iscombiningmark): return gboolean instead of int
...and related changes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-12-20 15:18:06 +04: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
281209c79d lib/widget/*.[ch]: fix indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-20 13:27:10 +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
cab525049f (query_dialog): center label horizontally.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:47 +04:00
Andrew Borodin
bafc778ee7 Horizontal centering of multi-line label: center each line independently.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
96795565f5 (query_dialog): add horizontal line.
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
03829a7e6e Don't apply DLG_REVERSE flag to the listbox window
...since this dialog contains single widget.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:46 +04:00
Andrew Borodin
612c32349d (quick_widget_t): add pos_flags member.
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
298201d305 Drop old QuickWidget engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
581cb4b38e (fg_input_dialog_help): use new quick dialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
e97ac7507a New QuickDialog engine.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-11-19 21:42:45 +04:00
Andrew Borodin
706c966af8 (groupbox_set_title): new function.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
8623039fe8 (groupbox_new): ignore empty string as title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
e009cd9ea9 (create_dlg): ignore empty string as title.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
d4b95ea14d (button_set_text): don't forced redraw the entire dialog.
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
e6f467c875 Add flags to place widgets with horizontal and vertical centering in dialog.
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
8b9fc35b95 WHLine: adjust initialization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-19 21:42:45 +04:00
Andrew Borodin
dc5c49a395 WInput: handle WIDGET_RESIZED.
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
dc62fdf5bd lib/mcconfig/paths.c: indentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:35:46 +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
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
3f8e561e17 Tweak sources for --with-x/--without-x option.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:13 +04:00
Andrew Borodin
d1fb83358d lib/strutil/strverscmp.c: add missing include of config.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-11-09 10:05:12 +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
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
ea2c57dbd6 Optimization of SIGWINCH handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-10-21 18:19:06 +04:00
Andrew Borodin
8b3ed9bfdc (mc_mkstemps): use g_mkstemp() to generate name of temporary file.
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
f3cc7de694 Ticket #2898: fix broken path completion on paths starting with ~/.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-27 14:25:18 +04:00
Ilia Maslakov
55c8f041da fixed doxygen documentation
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2012-09-10 14:29:53 +03:00
Andrew Borodin
8e224507c1 (str_utf8_normalize): ret rid of extra memory allocation.
(str_utf8_casefold_normalize): likewise.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
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
Andrew Borodin
4a0004f6c2 Ticket #2874: enter on directory named '~' goes to the home one.
Revert "Support of use ~ as home directory in hotlist."
This partially reverts commit dd9c7516a3.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-09-06 10:30:28 +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
Slava Zanko
949d257f37 Ticket #2791: Fixed: cannot Copy/Move files with filename encoding change
Steps to reproduce:
 * run mc
 * change encoding one of panels to any different from system encoding
 * try to copy any file to panel with changed encoding

Expected result: files should be copied.

Actual result: error box here.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-08-29 13:30:28 +03: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
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
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
14a4eefc43 Fix typos.
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
Slava Zanko
c277ac5b6f Ticket #2834: Fixed bug 'FTBFS with --disable-vfs'
Steps to reproduce:
 * ./configure --disable-vfs
 * make

Expected result: project should be builded successfully.

Actual result:
build stopped with errors:
lib/vfs/interface.c: In function 'mc_chdir':
lib/vfs/interface.c:714: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:716: error: 'struct vfs_s_super' has no member named 'path_element'
lib/vfs/interface.c:717: error: 'struct vfs_s_super' has no member named 'path_element'

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-29 12:45:57 +03: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
4fa4e7568d Skin support for window frames.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
2bb6cb2a32 Add toggle fullscreen mode of editor windows.
Initially, window is created in fullscreen mode.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:26:10 +04:00
Andrew Borodin
3b72e4275b Switch windows using keyboard.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:25:46 +04:00
Andrew Borodin
1c33972ee5 Add CK_Close action to close current open file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:25:40 +04:00
Andrew Borodin
b50f4f07e5 Allow move and resize edit window using keyboard.
Add "Window" menu entry in editor main menu to handle editor windows.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 22:25:16 +04:00
Andrew Borodin
1f45b0822e Menubar: ignore GPM_UP event.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 16:46:35 +04:00
Andrew Borodin
39d128e659 Accuracy use of arguments of dlg_move and widget_move macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 16:05:12 +04:00
Andrew Borodin
8b4f020abd Ticket #2833: url with port was stored wrong in history.
"sh://admin@192.168.1.119:55522" was stored as
"sh://admin@192.168.1.119@192.168.1.119".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-20 15:56:56 +04:00
Andrew Borodin
c813d1baad Handle history of input line.
Added pointer to the current history item and use to walk in history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2012-06-11 15:02:19 +04:00
Slava Zanko
a2a01d94e9 Ticket #2821: Fixed defect: ftp to a second site does not work
Steps to reproduce:

 * cd  ftp://ftp.gnome.org/
 * Run "cd" in the panel where the remote site is open
 * cd  ftp://ftp.kernel.org/

Actual result: The directory content from ftp.gnome.org FTP-server.
Expected results: The directory content from kernel.org FTP-server.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2012-06-06 12:07:54 +03:00