Commit Graph

4186 Commits

Author SHA1 Message Date
Slava Zanko
62207c8d4d Use events for operate with clipboard (copy/paste to external clipboard, save/load to file)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
c2dfb82f61 Use events for update panels
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko
3634716374 Moved input_map, listbox_map and dialog_map variables to 'lib' subdirectory.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
0f93e313df src/background.c: added some forgotten va_end() calls
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
c58365fa64 Move check_for_default() function from lib/util.c to src/util.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
7dad2df6a8 Moved initialization of mc_global.share_data_dir and mc_global.sysconf_dir to library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
e784cf65a5 Move src/filemanager/complete.c to lib/widget/input_complete.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
5a458c702d Use events to show VFS messages.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
746653fda2 Removed mc_main_error_quark() function
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
4005b7924e Use events to check timestamp of panel directories
...instead of direct access to panels in VGS GC.

Inlcudes clean up.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:51 +02:00
Slava Zanko
6016620f42 Remove backlinks from lib to src - move global variables(used in lib) to mc_global structure (see lib/global.c)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:50 +02:00
Slava Zanko
6c5f5bf768 VFS structure changes:
* moved from lib/vfs/mc-vfs to lib/vfs;
  * split by directories for VFS-plugins and moved to src/vfs;
  * lib/vfs/vfs-impl.h was merged into lib/vfs/vfs.h.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:48:26 +02:00
Slava Zanko
d512649b33 Prepare to initialize application events.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:46:41 +02:00
Andrew Borodin
5ef6375120 Symbolic names of keymap sections are defined.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
b3d0a9237b Change hardcoded definitions of default keymap.
Now default key bindings are hardcoded as strings like values in keymap
file. Such presentation of key bindings allows simplify keymaps merge
when new bindings are added, replaced or removed old ones during MC
initialization.

Previously, to rebind some keys, used must redefine the entire section
where that bindings are in. New merge algorithm doesn't require the
redefinition of entire section in user's keymap file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
6484b1dce7 Allow remove key with empty value from target config.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
35b429f625 Prepare to merge default and user-defined keymaps.
default_main_map and default_main_x_map renamed to
default_main_keymap and default_main_x_keymap respectively to unified
variable names.

Editor: setup keymaps only once for all editors.
Viewer: share single keymap array for all viewers.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
4fbdbd4456 Added --nokeymap command line option to disable load keybindings from file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-20 19:26:08 +03:00
Andrew Borodin
722121a575 Define keybind numbers using enum.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
1374340aa2 Fixup of shift-arrow mark in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
50de02cfe4 Unification of keybinding names.
Most of keybind names are changed to unify that names.
Details see in doc/keybind-migration.txt file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Andrew Borodin
68a8745f6d Ticket #2511: simplification and unification of keybinding names.
Added doc/keybind-migration.txt file to describe new keybinding names
used in mc.keymap.* files in 4.8.x series.
Cosmetics: reordering of keymap section declarations to provide identical
order totally in the source tree.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-20 19:26:08 +03:00
Ilia Maslakov
4015e14aff Ticket #2512 (fixup for usermenu)
Fixed user menu behaviour. MC hangs if menu entry contains the 'read' command or something like that.
    bug introduced in the Ticket #323 (changeset: 0cfbe19d96).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-17 16:12:12 +00:00
Ilia Maslakov
ecd8ca2292 mark inserted from file
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-17 08:50:52 +00:00
Ilia Maslakov
dc6bd875c4 Ticket #2504 (Verical block is unmarked after copy/move)
Now mark of vertical block is not reset after copy/move. This make easy many copies/movements.
    Do nothing if cursor is in first line of selection.
2011-03-17 08:50:52 +00:00
Slava Zanko
bdf5543950 Direct commit: fixed visibility scope for global variable GArray *macros_list
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-04 11:53:30 +02:00
Ilia Maslakov
b642e2e1e1 added check for instruction "#interactive" in the script.
if the external script contain #interactive then do show prompt.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
b58e7e64fc Fix cursor position after execution of external script.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
d31116328a Changed engine of external macros execution
Now "EditPipeBlock (X)" action tries execute the
~/.local/share/mc/mcedit/macros.d/macro.X.sh script.
To bind action EditPipeBlock (X) to the any hotkey you need add this binding
into ~/.local/share/mc/mc.macros file like following:

[editor]
ctrl-Q=EditWordLeft:-1;EditWordRightHighlight:-1;EditPipeBlock:3;
ctrl-W=EditPipeBlock:1;

This means that "ctrl-W" hotkey initiates the EditPipeBlock (1) action,
editor handler translates this into execution of
~/.local/share/mc/mcedit/macros.d/macro.1.sh shell script.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-03 20:48:30 +00:00
Ilia Maslakov
83177cfc16 added a new action "Record and Repeat commands", added menu entry (Record/Repeat actions) for this.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>

some fixes

Signed-off-by: Slava Zanko <slavazanko@gmail.com>

and one more fix

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-03 20:45:07 +00:00
Ilia Maslakov
6066713f77 Removed unneeded menu entries.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-03-02 11:16:55 +00:00
Ilia Maslakov
8e22a16430 Added lookup_key_by_code, now parameter is string.
For example: "ctrl-w=action:code;action:code;action:code;"

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-02 11:16:54 +00:00
Ilia Maslakov
8509b74f73 Ticket #323 (reimplimented editor macros)
Reimplemented editor macro engine:

    * added string binding "InsertChar" for action - "CK_Insert_Char"
    * added keybind_lookup_actionname - found action name by numeric constant
    * replaced struct macro to struct macro_action_t
    * added struct macros_t for describe editor scripts
    * rewritten edit_load_macro_cmd, edit_execute_macro
    * renamed edit_save_macro_cmd into edit_store_macro_cmd (WEdit * edit);
    * dropped Wedit properties: macro_i, macro_depth, macro[MAX_MACRO_LENGTH]
    * added GArray *macros_list to the store macroses of mcedit
    * added edit_get_macro

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-02 11:16:44 +00:00
GoTaR
795b3a76f0 Ticket #1668: Screen and input corruption under xterm [non-UTF]
The problem:
    viewing binary files contain char 0x9A leads to massive screen corruption and Search
    dialog pops up with 1;2c search string (multiple times depending on actual screen contents).
    So it looks like the file 'presses' F7 or / and shift-right_arrow for every specified
    character combination occurrence. In case of bigger files it's impossible to exit from
    such viewer, as search dialog keeps popping up after closing.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-01 15:24:38 +03:00
Andrew Borodin
41758cc0e4 Ticket #2462: "Search for content" checkbox is disabled by default.
"Search for content" checkbox in 'Find File' dialog should be enabled by default.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-24 10:23:20 +03:00
Ilia Maslakov
4e97991714 code indentation
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-17 21:46:20 +00:00
Ilia Maslakov
afed48a44a Ticket #2499 (action to the mark current word)
added action CK_Mark_Word to the mark current word
    changed double-click the mouse handler of the editor

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-17 21:38:06 +00:00
Ilia Maslakov
cfad4d685b Ticket #2500 (incorrect the word boundary detection)
fixed detection of the word boundary (added '{', '}' as end of the word).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 22:17:15 +00:00
Ilia Maslakov
9f0d38520a replaced call mc_config_del_param to mc_config_del_key
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 22:09:41 +00:00
Andrew Borodin
cfd0e8d3fc Handle ignore dirs directly in 'Find file' dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-16 21:59:55 +03:00
Andrew Borodin
7fa3dfc649 Added counter of ignored dirs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-16 21:58:59 +03:00
Andrew Borodin
90e3933e89 Ticket #2275: find files: support of relative dirs in ignore_dirs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-16 21:58:59 +03:00
Ilia Maslakov
7651b5dd30 Ticket #2483 (editor: improvement word left/right)
now the cursor jump more intuitive after actions "word left"/"word right".
    It will be stop before BOL, BOF

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-13 08:30:19 +00:00
Andrew Borodin
20788b9bde use_mouse_p: moved definition from src/filemanager/midnight.c to lib/tty/mouse.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
fe60e4c89b find.c (search_content): type accuracy of return value.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
5b9a7dd43f (mc_config_del_param): renamed to mc_config_del_key.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
ac8e519854 Remove extra checks before call of g_strfreev().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:56 +02:00
Andrew Borodin
1ceb2494e4 Fixup compile with --disable-charset.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-05 16:54:55 +02:00
Slava Zanko
8c4eb1bae8 Two small typos in strings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-02-05 16:54:51 +02:00
Ilia Maslakov
afb498de3a Ticket #2456 (Incorrect restore selection after UNDO)
fixed incorrect restore selection after UNDO

    test case:
        1. mcedit new_empty_file
        2. type in 0123456789
        3. F3 5*left F3 - digit '4' is not marked at this point
        4. backspace, ctrl-u - digit '4' is marked now
        5. left, 2*del, 2*ctrl-u - digits '4' and '5' are not marked

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-04 18:32:13 +03:00
Ilia Maslakov
9b5de3c96b direct commit: utf8 fixup
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-03 17:14:48 +03:00
Ilia Maslakov
f42e10ab1d Ticket #2484 (segfault after getting previous char)
fixed segfault after getting the previous char in utf8, if previous char's
    are: 0xB1, 0xB3, 0xB6, 0xBF, 0xBC.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-02-03 09:50:15 +03:00
Andrew Borodin
e3cbdfad04 Ticket #2489: colors of bold and selected text in viewer cannot be set in the command line
...using --colors option.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-02-02 14:55:06 +03:00
Andrew Borodin
09021fd954 Reorganization of "Show mini info" option.
"Show mini info" checkbox was moved from the "Layout" dialog window
to the "Panel options" one. Documentation was updated.
The show_mini_info global variable was transformed to the member
of panels_options_t structure.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Andrew Borodin
f13778d94f torben_fj_mode options was moved from [Midnight-Commander] section to [Panels] one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Andrew Borodin
5341a6b53f Ticket #2305: drop backward compatibility for global panels options.
Drop backward compatibility for global panels options. These options
are read form [Panels] section, if this section exists. If this section
is abscent, default values are used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-30 12:23:32 +03:00
Slava Zanko
8af4c9ca7f menu file now searched also in mc_sysconfig_dir directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:44:04 +02:00
Slava Zanko
c8982e822c Updated docs (man pages and comments in source code)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko
f31863a80a Renamed variables mc_home to mc_sysconfig_dir and mc_home_alt to mc_share_data_dir for more sence
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-20 17:38:27 +02:00
Slava Zanko
acbe048486 Ticket #1851: Home config directory [xdg-user-dirs]
Instead of hardcoded (via MC_USERCONF_DIR) path mc mc now used
dynamic directories specified by environment variables:
 * XDG_CONFIG_HOME - dir for config files . By default is ~/.config/mc
 * XDG_DATA_HOME - dir for some data, such as user defuned Syntax file, menu etc By default is ~/.local/share/mc
 * XDG_CACHE_HOME - dir for temp files, such as cooledit.clip etc. By default is ~/.cache/mc

This is mainstream standard already adopted by many projects.

Old settings will be migrated at first time from ~/.mc to these dirs.

See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for more info.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-20 17:38:27 +02:00
Andrew Borodin
1f98ee6dc7 Refactoring.
(paint_panel): removed. Sending of WIDGET_DRAW message is used instead.
(update_dirty_panels): moved from panel.c to midnight.c.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-19 13:03:54 +03:00
Andrew Borodin
57cdd0a08a Refactoring.
(restore_into_right_dir_panel): made static.
(panel_update_cols): moved from panel.[ch] to layout.[ch].
(set_display_type): minor cleanup and type accuracy.
(panel_display_t): type accuracy

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-19 13:03:54 +03:00
Andrew Borodin
c7fdc8f95b Ticket #2390: file list format of panel is intialized incorrectly
...after switch panel back from quick view or info mode to file list one.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-19 13:03:39 +03:00
Andrew Borodin
99b60cc2b3 Ticket #2466: main menu is not drawn correctly
...after change of it visibility and activity.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-12 13:00:36 +03:00
Andrew Borodin
16c13be47b Added option to change mode of panel swap.
New "Simple panels swap" checkbox in "Panel options" configuration
dialog window. Unchecked by default.

Documentation update.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2c994461a6 Forced update listing format after swap
...because of possible changed sizes.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2a98492e77 Resort swapped panels in according with its sort options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Andrew Borodin
2ebfd4e293 Ticket #2368: swap panels should respect sort options.
Initial step: refactoring: create new panel_sort_info_t structure
to store sort options of panel.
Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-08 16:29:18 +03:00
Ilia Maslakov
7bd3a17db7 do not set modify flag when user menu cancelled.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-06 16:01:52 +00:00
Ilia Maslakov
bf7675246f Ticket #2463 (do not reset selection after execute user menu)
do not reset selection after execute user menu

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-06 16:01:51 +00:00
Andrew Borodin
186b2ff3f7 Ticket #2464: find file: don't check content regexp
...if search for content is not used.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-06 18:49:48 +03:00
Anton Novosyolov
a30cf7e980 Ticket #2266: filtered view default text
I suggest changing default text in filtered view (alt-!) command input line
instead current filename in panel to contents of cmdline.

It's easier to edit command line with commands like alt-tab,
alt-enter, etc., and then view the result in mcview.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-01-06 11:02:00 +02:00
Andrew Borodin
45306458ca Ticket #2458: fixed broken command autocompletion.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-05 15:22:40 +03:00
Ilia Maslakov
ab46ad0749 Modified editor general options gialog
...added "Group undo" option.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-01-01 21:17:27 +00:00
Ilia Maslakov
b39033812b Ticket #27 (group undo)
added option editor_group_undo unset by default
    added group undo mechanism

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2011-01-01 21:17:19 +00:00
Ilia Maslakov
d84fb5d0ce updated default_editor_keymap, added default for CK_Redo
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:43 +00:00
Ilia Maslakov
6832b8e7e9 binded EditRedo on alt-r
added entry Redo into editor menu

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:43 +00:00
Ilia Maslakov
03363eac71 added action EditRedo.
added functions:
        * edit_push_redo_action
        * edit_pop_redo_action
        * edit_do_redo

    removed not supported (not actual) code

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:42 +00:00
Ilia Maslakov
b5fc178027 Ticket #25 (mcedit: REDO)
little optimization, renamed:
        * variables stack* to undo_stack*
        * pop_action to edit_pop_undo_action
        * edit_push_action to edit_push_undo_action

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-30 21:23:42 +00:00
Andrew Borodin
da2c82e8d3 Ticket #2170: color of panel header cannot be set in the command line
...using --colors option.

Grammar in default skin description.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-29 13:58:28 +03:00
Egmont Koblinger
e593572bb9 Ticket #2169: Add support for 256 colors terminals
Forget the old limit of 8 background and 16 foreground colors.
From now on Midnight Commander can use all the 256 colors,
as your favorite terminal emulator supports them - or not,
in which case it's not going to stay your favorite terminal for long.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-29 11:58:10 +02:00
Andrew Borodin
a8b62e421e (warn_same_file): cleanup of preprocessing usage.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Andrew Borodin
7cfaeca063 Panel update: type accuracy.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Andrew Borodin
75fa78595e (single_dirsize_cmd): send CK_PanelMoveDown message instead of KEY_DOWN one to panel.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-27 15:57:16 +03:00
Ilia Maslakov
7d21002668 Ticket #1898 (mcedit: vertical selection bug)
now after changing the cursor position does not break the vertical text selection.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-23 16:03:56 +00:00
Jindrich Novy
b51ae367da fix crash in progress bar handling
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-23 14:25:39 +03:00
Andrew Borodin
4abfaf8172 Ticket #2448: division by zero in file copy progress dialog.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-23 14:25:39 +03:00
Andrew Borodin
16c37545a3 (try_complete): fix completion for file names started with one character.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-23 13:24:55 +03:00
Ilia Maslakov
e4de4f00d1 little changes to make 'completion' more intuitive.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-23 13:24:55 +03:00
Andrew Borodin
b5d3857e29 Fixup of path autocompletion
...and reorganizing of some conditions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-22 10:35:32 +03:00
Andrew Borodin
e8b36e50ca Ticket #2288: regression of path autocompletion.
(check_is_cd): fix of cd command check.
Type accuracy: check_is_cd() now returns gboolean instead of int.
Initialize start and end variables.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-22 10:35:23 +03:00
Ilia Maslakov
40523a2c01 Ticket #2449 (search position is reset but should not be)
steps to reproduce:

    mcview_remember_file_position=1

    test file: file1.ext
        123
        456
        123
        qwe
        123
        123
        qwe
        123
        qwe
        456

    1) open file1.ext in mcedit search text 'qwe'
    2) close file1.ext
    3) open file1.ext in mcview
    4) close file1.ext
    5) reopen file1.ext in mcedit and search again text 'qwe'

    search position is reset but should not be reset.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-15 21:04:19 +00:00
Ilia Maslakov
2e73ca4989 Ticket #2437 (mcedit: selection length trouble)
now selection length do not changed after text is backspaced in middle selection.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-13 12:02:16 +02:00
Ilia Maslakov
bac3fbe8a9 Ticket #2238 (mcedit: do not reset selection after copy to clipboard)
In mcedit, when the selected text is copied to the clipboard, the selection disappears.
    This behavior contradicts to the traditional behavior of all modern text editors and is highly annoying.
    Now selection don't reset after the text is copied into the clipboard.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-10 11:32:09 +03:00
Andrew Borodin
3e91f81a88 Restore space after address in hex mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-06 14:44:04 +03:00
Andrew Borodin
0f3729426a Ticket #2435: goto to the specified address in hex mode of viewer.
Viewer Goto dialog doesn't allow go to the specified offset. The value
of input line is rounded to the next line start. Such bevaviour
is useless in hex mode of viewer. In hex mode we must heve a
capability to go to the specified address as is without any round.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-06 14:44:04 +03:00
Andrew Borodin
d459c83db3 Ticket #1651: user menu in standalone mcedit: filetype-specific items don't show.
And some type accuracy was made.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-06 13:55:18 +03:00
Ilia Maslakov
f153e1ad29 renamed:
* PanelCtrlNextPage into PanelGotoChildDir
    * PanelCtrlPrevPage into PanelGotoParentDir

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-04 09:06:06 +00:00
Ilia Maslakov
2690d2d9f5 Ticket #2375 (do cd .. if command line is empty)
New keybinding "PanelSmartJumpUp" for the jump to the parent directory if command line is empty. Not defined by default.
    This binding maybe used for bind 'Backspace' as hotkey for 'cd ..' (only if command line is empty).

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-12-04 09:05:07 +00:00
Andrew Borodin
63cc3d01af Ticket #2434: fixed source file name of file operation.
If file name is absolute, don't join it with current directory name.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 15:41:19 +03:00
Andrew Borodin
00b1aa4a8e Fixup of formatted output of file size in 'File exists' dialog window.
The %j modifier used to show file size produces segmentation fault
on some platforms. PRIuMAX macro cannot be used within i18b'd strings.
Solution: use %llu modifier with typecasting to unsigned long long.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 13:28:03 +03:00
Andrew Borodin
fe8c5390ad Fix of uintmax_t variables output.
Use PRIuMAX and PRIXMAX instead of ju and jX modifiers respectively
for formatted output of uintmax_t variables.
If PRIXMAX is not defined (i.e. in Solaris9), use PRIxMAX instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-03 10:58:39 +03:00
Andrew Borodin
6e6ec057cb Avoid compiler warnings.
(file_mask_dialog): do_background argument shadows do_background()
function; renamed to do_bg.

(label_callback): unitialized variable.

(read_filesystem_list): const char *.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-12-02 22:12:56 +03:00
Andrew Borodin
5891476737 Cast mode_t to unsigned int for formatted output.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 21:59:42 +03:00
Andrew Borodin
62c05d62f3 Ticket #2409: fix of GModule detection and usage.
Don't mix GLib and GModule compiler and linker options.

Use gmodule-no-export if present to avoid use -Wl,--export-dynamic
option with some linkers. If gmodule-no-export is not available,
use generic gmodule.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 21:59:42 +03:00
Andrew Borodin
2745980520 Ticket #1939: fix of panel state saving.
Panel state is saved in ~/.mc/panels.ini:
1) when "Save setup" command is invoked;
or
2) when MC is quited and "Auto save panels setup" option is set.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 12:48:20 +03:00
Andrew Borodin
680b9a8220 Ticket #2432: backspace key doesn't work in input lines.
Also added default bindings for C-d and C-h keys in editor and input
lines.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 11:30:34 +03:00
Andrew Borodin
380d9bd885 Ticket #2171: colors for popup menu:
... for menu items, selected menu item and for menu title.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:55:59 +03:00
Andrew Borodin
17783a240c Adjust formatting output of source and destination file sizes
... and replaced tabs by spaces in defines.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:52 +03:00
Andrew Borodin
bd4dd44ac8 Unification of ctx and ctx->ui checks.
... and type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:52 +03:00
Andrew Borodin
d14f048575 Removed unneeded checks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:51 +03:00
Andrew Borodin
a95d786742 Optimization of verbose operations with several files.
Check values of verbose and dialog type outside of
file_progress_show_count() and file_progress_show_total()
to avoid double checks of those options and extra function calls.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:51 +03:00
Andrew Borodin
3e7b58d5af Use size_t instead of off_t for file counters during file operations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:51 +03:00
Andrew Borodin
12ccfdff6c Ticket #2429: overflow of file operation counters.
Use uintmax_t type instead of double for summary size of several files.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-12-02 09:41:51 +03:00
Andrew Borodin
15013927e7 Include inttypes.h instead of stdint.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-26 11:31:18 +03:00
Andrew Borodin
5ec2e4507c Modified output of --version key.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-25 16:31:05 +03:00
Slava Zanko
bbf1f4e857 Moved filemanager-related stuff to src/filemanager directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:32 +03:00
Andrew Borodin
116fdc4220 Init/deinit clean up
...to provide symmetrical usage of init/deinit functions.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
fdb61594df Cleanup of main.[ch].
All file panels related stuff was moved to midnight.[ch].

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
0ef9273598 Changes for avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
08e9759283 Split file src/keybind.[ch] to lib/keybind.[ch] and src/keybind-defaults.[ch].
File src/cmddef.h now merged to lib/keybind.h

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:31 +03:00
Slava Zanko
62f3c368c9 Renamed keybind-related functions:
* lookup_action          -> keybind_lookup_action
* lookup_keymap_shortcut -> keybind_lookup_keymap_shortcut
* lookup_keymap_command  -> keybind_lookup_keymap_command

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
045debaa8a Moved charsets.[ch] from src to lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
dc0a963304 Refactoring: removed unused variable
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Slava Zanko
fcc98371d6 Removed unneded utility mcmfmt
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:31 +03:00
Andrew Borodin
1ae9172d2a Renamed mc_config_direct_set_string() to mc_config_set_string_raw()
... and avoid any string modification before save to ini.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
3d92a0846a Menu improvements.
menubar_set_visible(): new function to get rid of menubar_visible global variable
in widgtes library.

menu_set_name(): new function to avoid total recreation of main menu
after change panel layout.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
f24dd62dc2 Use str_msg_term_size() instead of msglen()
... because msglen() is not tolerant to multi-byte encodings.
Remove msglen() because it unused now.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
71364f88c3 Split lib/widget/widget.[ch] and lib/widget/wtools.[ch] files
...into small: one widget in one file.
Renamed most if WInput functions.
Minor optimization.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
8d1708225c Don't include lib/util.h via lib/global.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
141926344d if_link_is_exe() and link_is_dir() now return gboolean
...and link_is_dir() is inline now.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Andrew Borodin
d543be11d9 Use g_file_get_contents() instead of load_file().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:30 +03:00
Slava Zanko
8b018db98f Some WIDGET-related stuff moved to lib/widget directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:30 +03:00
Andrew Borodin
43ed65e3d9 Moved string-related routines from lib/util.[ch] into lib/strutil.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin
011b6670e2 Direct typecasting instead of str_unconst() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Andrew Borodin
9b7601476e Diff viewer fixups.
(dview_status): use str_term_trim() instaed of trim() to trim file name.
(dview_get_title): reimplemented using GString because str_term_trim()
returnes a pointer to internal static buffer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:51:29 +03:00
Slava Zanko
96cb95cc95 Code indentation in src/viewer directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:29 +03:00
Slava Zanko
cb4bdfa00d Code indentation in src/editor directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:51:29 +03:00
Slava Zanko
61345bd8e2 Code indentation in src/consaver directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Slava Zanko
1ff8b77f92 Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Slava Zanko
14e958a0a4 Removed unused fsusage.c and fsusage.h
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:47 +03:00
Slava Zanko
c57566af00 Avoid compiler warnings.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
d169d13296 Use str_trunc() directly instead of name_trunc().
name_trunc(): removed.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
53ad349a36 Moved time related stuff from lib/util.[ch] into lib/timefmt.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
9b43d71799 Set SLtt_Ignore_Beep in tty_init().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
9ec4d4c08b Check variable before g_array_free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:47 +03:00
Andrew Borodin
79133154b0 Moved hooks from lib/util.[ch] to new files lib/hook.[ch]
... and renamed Hook to hook_t.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Slava Zanko
c2754de8aa Code indentation in src directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:46 +03:00
Andrew Borodin
5e0c9c911d Moved declaration of "easy_patterns" variable from lib/util.[ch] to src/setup.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:46 +03:00
Slava Zanko
feb733663f Code indentation in lib directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-24 10:27:20 +03:00
Andrew Borodin
4892044e71 Remove extra check before mc_search free() call.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-24 10:27:20 +03:00
Andrew Borodin
9a8ae90a49 Reimplemented search engine in editor.
Now search engines of editor and viewer use the identical algorithm.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-22 16:20:26 +03:00
Andrew Borodin
a80c9edb93 Ticket #2417: incorrect charset conversion in editor search engine.
Initial step: type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-22 16:20:26 +03:00
Andrew Borodin
3e7d76eb13 Ticket #2197: added new color for status bar
...and added missed colors for button bar.

Updated EN and RU man pages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-22 16:07:17 +03:00
Aleksey Cheusov
faff5709c6 Ticket #2425: fixup read_filesystem_list() for NetBSD >=3.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-21 10:11:57 +03:00
Andrew Borodin
e8c35970ee Ticket #2415: keep active state of editor before final decision about quit.
The same fix is applied to viewer and diffviewer.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-20 12:57:38 +03:00
Tomasz Pala
8eef3c7d78 Ticket #2229: speed up of up/down moving in viewer in wrapped mode.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-11 13:02:49 +03:00
Andrew Borodin
b1ac21fb74 Move rotating dash to new function
... and clear dash after search finish.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-08 13:22:44 +03:00
Andrew Borodin
124deb9cff Unification of invalid filename skip.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-08 13:22:44 +03:00
Andrew Borodin
885b1b4f82 Optimization: ret rid of select_item() call
...after go to the found file or directory.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-08 13:22:44 +03:00
Andrew Borodin
f5a93bf74c Fix of directory ignorance in file find engine.
Start directory is used and displayed now as absolute path.
2010-11-08 13:22:44 +03:00
Andrew Borodin
fdc443501a Ticket #2366: ignore_dirs does not work while file searching.
Refactoring: reimplement find_ignore_dirs as sorted array of strings.
Handling value of ignore_dirs like "/foo::/bar/:".

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-08 13:22:44 +03:00
Ilia Maslakov
b7df339285 Fixed highlighting in command line (was broken: aa9cb6d320)
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-11-05 13:26:18 +00:00
Ilia Maslakov
458cf7cf55 Ticket #2393 (no put removed text into clipboard)
no more put removed text into clipboard. when doing CK_InputKillWord, CK_InputBackwardKillWord

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

    * WInput routines: get rid of one-line functions.
    * added CK_InputClearLine handler. Now CK_InputClearLine - clear command line,
    CK_InputKillLine - clear command line from cursor to the EOL.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-11-05 13:26:02 +00:00
Tomasz Pala
525320071c Ticket #2135: End button in MC viewer jumps too far
Previous solutions have broken one of the viewer features (http://www.midnight-commander.org/ticket/1778)

What suggest is fixing PgDn in a way, that it switches to one-line mode after EOF and add a check to ensure,
that at least one last line stays visible (4.7.1 behaviour of end/pgdn was irritating indeed).

With this patch, PageDown at the last page scrolls file line by line instead of entire page.
This is feature, not a bug. :)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-05 13:23:38 +02:00
Andrew Borodin
4bfd6436c5 Change hotkey for "Search for content" and "All charsets" checkboxes
...to resolve conflict with input line shortcut.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-05 12:08:58 +03:00
Andrew Borodin
bac6d60f46 Ticket #2407: crash of mc when chdir to find file.
Don't use content if "Search for content" checkbox is off.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-05 12:08:58 +03:00
Andrew Borodin
50ba1adca4 Ticket #2405: fixed key event handling in "Listing mode" dialog.
Typing 'u' in "User defined mode" input line, the "User defined"
radio-button is checked instead of putting the 'u' letter
into the input line.

Bug was introduced in 80d34ca625.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 21:55:12 +03:00
Yury V. Zaytsev
267ec33b2a Applied MC indentation policy
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-11-02 09:34:07 +01:00
Yury V. Zaytsev
d6f2d82618 Fixed up several comments
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-11-02 09:34:07 +01:00
Andrew Borodin
ed5cc99fed Optimization: don't process search handlers too often
Miscellaneous changes:

    * Create search handlers before search session and destroy afterwards.
    * Get rid of goto operator in do_search() functon.
    * Fixed handling of DLG_VALIDATE message.
    * Type accuracy.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 09:34:07 +01:00
Andrew Borodin
6a36a33b33 Optimization: don't destroy the "Find file" dialog before call "Tree" one
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 09:34:06 +01:00
Andrew Borodin
8d3bbf3b26 Content search options can be disabled using "Search for content" checkbox
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 09:34:06 +01:00
Yury V. Zaytsev
e07bb515f3 Reorganized "Find File" checkboxes
Made "Find recursively" and "Search for content" appear the
first, as they are completely logically independent and influence the
way the strings entered in the corresponding fields are used.

"Using shell patterns" and "Regular expression" come next, as
they set a similar property of the fields. Same goes for the "Case
sensitive" and "All charsets" group.

"Skip hidden" and the rest close the show up.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-02 09:34:06 +01:00
Yury V. Zaytsev
b68bef2cb6 Take into account the value of the "Search for content" checkbox
If "Search for content" checkbox is enabled, then content_pattern is
initialized as usual. Otherwise, it's forcibly set to NULL.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-11-02 09:34:06 +01:00
Yury V. Zaytsev
1b260e6773 Ticket #2046: Added "Search for content" checkbox to the Find File dialog
This checkbox allows to define whether the "Content" field should be
taken into account or not when performing file search. The checkbox
remembers its state across sessions.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2010-11-02 09:34:06 +01:00
Andrew Borodin
0908c8baea Ticket #2404: added forgotten shotrcuts of mcedit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 21:31:24 +03:00
Slava Zanko
a0d69353e8 Code cleanup for avoid compiler warnings
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-11-01 15:48:38 +02:00
Andrew Borodin
4aec2187e1 Ticket #1894: sort order should not mix hidden files with others.
In case sensitive sort, the order of files and directories is following:
hidden dirs
dirs
hidden files
files

In case insensitive mode, directories are mixed and files are mixed too:
dirs (hidden and not are mixed)
files (hidden and not are mixed).

This commit defines the sort order independently of case sensitivity:
hidden dirs
dirs
hidden files
files

Files in UTF-8 locale require special handling: leading dot must not be
processed in g_utf8_casefold() funcion.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 15:02:57 +03:00
Andrew Borodin
4c40d57508 (edit_set_filename): expand tilde while setting file name.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Andrew Borodin
8088fe9b66 Ticket #2398: tilde is not treated as home directory in editor "Save As" dialog.
(edit_get_save_file_as): return file name with expanded tilde.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-11-01 13:54:39 +03:00
Andrew Borodin
8be556abc5 Declarations of use_dash() and rotate_dash() were moved form lib/util.h to src/layout.h.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:50 +04:00
Ilia Maslakov
8b46518619 Apply code identation policy.
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2010-10-27 18:10:50 +04:00
Ilia Maslakov
3ba4abac41 Ticket #2268 (FISH: hide panels before connecting)
FISH: now hide the panel before connecting.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-27 18:10:49 +04:00
Andrew Borodin
185d5fc359 Install help files into /usr/share/mc/help instead of /usr/share/mc.
Optimisation of language-specific help file creating.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:25:59 +04:00
Andrew Borodin
280194ec15 Install hint files into /usr/share/mc/hints instead of /usr/share/mc.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:25:59 +04:00
Andrew Borodin
bfbac0c5d8 Reimplemened codepages storage using GPtrArray.
Added capability to load codepage list from /usr/share/mc/mc.charsets
and /etc/mc/mc.charsets and merge them then.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:25:53 +04:00
Andrew Borodin
245f465d6e Install mc.charsets into /usr/share/mc instead of /etc/mc.
Renamed CHARSETS_INDEX macro to CHARSETS_LIST.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:15:37 +04:00
Andrew Borodin
1c3aae85ec Minor optimization of [Special dirs] handling.
(tree_store_rescan): use g_list_foreach() to free content of list.
(process_special_dirs): get rid of extra memory allocation.
(should_skip_directory): type accuracy and variable intializations.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:15:37 +04:00
Andrew Borodin
fed3d099c3 Install mc.lib into /usr/share/mc instead of /etc/mc.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:15:37 +04:00
Andrew Borodin
51f28528f6 Ticket #1424: install some files into /usr/share/mc instead of /etc/mc.
RPMLint shows the following warnings:
mc.i586: W: conffile-without-noreplace-flag /etc/mc/Syntax
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.lib
mc.i586: W: conffile-without-noreplace-flag /etc/mc/mc.charsets

First step: install Syntax into /usr/share/mc instead of /etc/mc.
This also fixes the impossibility of editing of system-wide Syntax file
in mcedit under root (menu Options->Syntax file->System Wide).

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-19 18:15:37 +04:00
Egmont Koblinger
1256af2269 Ticket #2395: scroll down the panel contents by mouse dragging.
Start mc, and make sure that at least one of the two displayed
directiories contains so many files that they cannot all be displayed
at once.

Click in this panel and hold the mouse button pressed, and then move
your mouse downwards. As you pass beyond the bottom of this list, it
should start scrolling.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-18 20:45:51 +04:00
Andrew Borodin
e4105c1e72 Ticket #2324: fix of syntax highlighting lost after manual change.
Also some type accuracy is provided.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-18 15:10:27 +04:00
Slava Zanko
f53ed400fb Merge branch '2170_separate_colors'
* 2170_separate_colors:
  Newly added colorpair names now described in man-page
  Ticket #2170: Color collisions
2010-10-13 13:23:25 +03:00
Egmont Koblinger
aa9cb6d320 Ticket #2170: Color collisions
Midnight Commander's color/skin engine often reuses the same color definition for multiple elements on the UI.
This unnecessarily limits the possibilities when playing with colors.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-13 13:21:10 +03:00
Slava Zanko
5ed7f49eee Added default keybind for CK_DiffViewCmd command
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-12 13:13:11 +03:00
Andrew Borodin
10949329a7 Fixed signed and unsigned comparisons in viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 11:00:29 +03:00
Andrew Borodin
fe2c50cc19 Ticket 2356: viewer segfaults on ARM platform because type mismatches of printf arguments.
Fixed type mismatches of printf arguments in viewer;

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2010-10-11 11:00:29 +03:00
Slava Zanko
89b905d83b Added doxygen documentation for touched functions.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-10-11 10:39:37 +03:00
Slava Zanko
a8aa5cf678 Added definition MC_MAXFILENAMELEN for specify maximum file lenght.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2010-10-11 10:38:30 +03:00