Commit Graph

3268 Commits

Author SHA1 Message Date
Ilia Maslakov
5579c4f920 Ticket #1542
initial commit for support external filters in editor.
    added dialog for input parameters

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-22 13:54:18 +00:00
Slava Zanko
1017d4f548 branch-outside patch: Fix return value of function mc_config_normalize_before_save()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-21 20:13:00 +00:00
Slava Zanko
4db3447eed Ticket #213 [mc-ru-fork] patch for fix bug 'The shell is already running a command'
Test case:

- run mc
- press CTRL+o (hide panels)
- press 'space' key
- press 'backspace' key
- press CTRL+o (show panels)
- type 'ls' and press 'enter' key

Fix issue: Now 'busy shell' status toggle on if user will press 'Enter' key.
Old behavior: User was press any key into subshell and 'busy shell' status toggle on.

Also, patch will enter new behavior:
 * run mc
 * press ctrl+o (hide panels)
 * type 'cat ' and don't press 'Enter' key
 * press ctrl+o (show panels)
 * type 'ls' and press enter

You'll see:
cat: ls: File not found.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-16 14:47:27 +03:00
Andrew Borodin
d3735c6c10 Adjust width of Copy/Move dialog depending on initial screen width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-16 13:07:30 +04:00
Andrew Borodin
6cd26f8385 Fixed calculation of Copy/Move dialog width.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-16 13:07:30 +04:00
Andrew Borodin
42ba60cebe Use local buffers instead of global cmd_buf one.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-16 13:07:30 +04:00
Andrew Borodin
998001a22e Ticket #1705: fix show of Copy/Move dialog.
Inital step: minor refactoring of src/file.c file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-16 13:07:30 +04:00
Andrew Borodin
10e8d008d7 Ticket #1704: fixed quick search show.
If "show Mini status" option is off, the quick search box
is shown incorrect. In this case the quick seach box
must be invisible, because this is common MC behavior.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-15 20:45:24 +04:00
Slava Zanko
87979e779b Ticket #1532: Key configuration doesn't save properly
Problem: need to escape ';' char (as '\;'), but mc_config_set_string function
escape this to '\\;'

Solution: Added mc_config_direct_set_string() function. Also, into src/learn.c
characters '\' and ';' is escaped manually.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 14:58:47 +03:00
Slava Zanko
8fe4dc26c2 Cosmetic changes of panel interfase (relative to history list):
* Panel widget: History list button  changed  from v to [^]
 * Change drawing of history control elements for panel. Now if panel is active, show in reverse color just panel path.
 * Add reaction on mouse click on [] chars at top of panel
 * Added call of repaint_screen() function for correctly show panels content after click by mouse on 'hidden files' indicator.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 14:51:30 +03:00
Slava Zanko
bd29603b41 Relative to Ticket #1643: restore patch 'Mouse support in first line when menu is hidden'
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 14:51:24 +03:00
Slava Zanko
ff5dd64c6b Fix showing widget elements with 'mc -a' option.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 14:51:24 +03:00
Slava Zanko
d11de35343 Ticket #1716: Adding fully featured skin
As David Martin proposed, this skin support all newest features
May be used as modern skin, but with some restrictions (must be UTF-8 system codepage)

Also, changed src/screen.c for demonstrate skin features :)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-15 14:51:16 +03:00
Andrew Borodin
2328baf7a3 Place choose panel codepage dialog at the centre of the screen. 2009-10-15 11:40:30 +04:00
Andrew Borodin
47c4744347 Ticket #1451: fixed placement of choose encoding dialog window.
The "Choose codepage" dialog (for file panel) is centered
over the according panel.

Renamed create_listbox_window_delta() function to
create_listbox_window_centered(). Now this function takes in
coordinates of dialog center.
Changed argumets order to unified dialogs API.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-15 11:40:30 +04:00
Slava Zanko
94f30d0905 Merge branch '1714_context_for_indicator'
* 1714_context_for_indicator:
  Ticket #1714: Sort types: use context for indicator translations.
2009-10-13 15:19:57 +03:00
David Martin
415c10e880 Ticket #1714: Sort types: use context for indicator translations.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-13 15:04:36 +03:00
Ilia Maslakov
1e8c3f6789 Ticket #1706
fixed tty_print_anychar, trouble with drawing utf-8 chars in 8-bit locales (ncurses)

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-13 11:34:05 +00:00
Andrew Borodin
1e608044af Ticket #1700: fixed skin color parser.
Strip leading and trailing spaces in color names read from skin ini
file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-13 12:02:14 +03:00
Ilia Maslakov
db419a27c1 Ticket #1706
fixed tty_print_anychar, replaced addch to addstr when MC build with ncurses library.

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-13 07:08:00 +00:00
Slava Zanko
1b91f29cbb Ticket #1617: Current editing position of files don't save.
Fixed bug.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-12 09:34:08 +03:00
Slava Zanko
55fe1bb86e Ticket #397: Fix initialization of structure.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-12 09:09:41 +03:00
Ilia Maslakov
4cd93228d4 Ticket #1683
add command EditToggleSyntax for toggle syntax highlight

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-10 15:50:58 +00:00
Slava Zanko
0fdb3488e5 Ticket #397: i18n for sort indicator
Fixed translations of sort indicator. Now it separate string for better translate.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-09 09:48:38 +03:00
Slava Zanko
19493b9518 Some fixies for optimization.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 11:57:19 +00:00
Egmont Koblinger
51771e0092 Ticket #256
fix: Alt+Backspace (kill word) behaviour in command line

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-07 11:57:18 +00:00
Jindrich Novy
7370136f2a Ticket #1680: Allow 'exit' command on non-local filesystems.
On non-local filesystems, mc won't allow execution of commandline arguments.
This makes sense, except for the `exit' command, which might be allowed even on
non-local filesystems.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 12:24:40 +03:00
Slava Zanko
14be06d050 Reorganize work with files. Fixed permissions of files in mc home dir. All file names now accumulated into src/fileloc.h
* Added common functions for work with backups of main config files.
 * Fixed permissions of ~/.mc/ini;
 * Fixed permissions of ~/.mc/filepos
 * Fixed permissions of ~/.mc/hotlist
 * Fixed permissions of ~/.mc/Tree
 * Fixed ownership for ~/.mc/hotlist file
 * Changed definitions of config files. Now used constants from src/fileloc.h

Also, added ability for change mc user home dir. Just type:
{{{
make CFLAGS='-DMC_USERCONF_DIR=\".mc2\"'
}}}

And you will have different config files (very usefull for testing or development).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 12:01:05 +03:00
Slava Zanko
a931ff73cc Ticket #1617: ownership of files ~/.mc
Test case:

$ sudo bash
files in the directory ~/.mc overwritten and hence change of ownership at the root.
Later, when starting from a user, MC can not save history (the file ~/.mc/history),
because this file is not overwritten.

Fix issue: Now files will overwrite if exists (rather than remove and create new file).
 * Added backup of saved files.  If someone wrong in 'write config' stage, backup file still present.
 * Identation of code.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 12:01:05 +03:00
Slava Zanko
71642b9bdb Ticket #1620: File hightlighting based on extension is case sensitive.
Added parameter extensions_case.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-07 10:42:25 +03:00
Ilia Maslakov
93f8b96b32 Ticket #1664 (Viewer: incorrect tabs alignment)
fix tabs alignment. Variable option_tab_spacing instead hardcoded '8' are used.

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-07 07:25:26 +00:00
Ilia Maslakov
1c4f8b1a0e Ticket #1675 (hex editor regression)
Viewer: fixed command handling.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>

    add: binding for "esc", "escape"

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-07 07:15:04 +00:00
Andrew Borodin
2d1eb7bea0 Ticket #1662: keep empty 'Content:' field in 'Find File' dialog.
Partially revert of 5fd7d65dca.
If 'Content:' field is empty, keep it and don't populate it
from history.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 21:20:26 +04:00
Slava Zanko
ba9ac667d2 Cleanup of code. Remove unused panel_field_t::use_in_gui variable
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:55 +03:00
Slava Zanko
08e6e1caf4 Added indicators for current sort type and sort direction.
Added parameters into skin-files for showing sort indicator.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:55 +03:00
Slava Zanko
9766359a1b Fixed segfault in 'Brief file list' listing mode
Segfault was been raised after clink on header of right column.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:55 +03:00
Slava Zanko
13220bfc6c Added reversing sort order ability if one keybind raised multiple times.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:55 +03:00
Slava Zanko
9fa3347fc1 Added keymaps for some sort types.
* PanelSortOrderByName
 * PanelSortOrderByExt
 * PanelSortOrderBySize
 * PanelSortOrderByMTime

Also added 'PanelReverseSort' keymap.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
3def4aeb0e Remove code for reverse search direction when toggle search types.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
fe73db4227 Fixed behavior of CK_PanelSelectSortOrder event.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
c8857b3084 Remove unneded code
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
7896ea84f6 Added handlers for panel sort keybind actions.
* PanelSelectSortOrder - show 'Sort order' dialog
 * PanelToggleSortOrderPrev - toggle next sort type (or reverse sort order)
 * PanelToggleSortOrderNext - toggle previous sort type (or cancel reverse)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
b4f7ea071f Remove array of hardcoded format names from listmode.c
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:54 +03:00
Slava Zanko
82a384d8f4 Some changes for better toggle sort types of panel.
Now we have just one array for formats of panel and for sort types.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:53 +03:00
Andrew Borodin
3631f810cc Fixed length of panel header (current directory).
Minor optimization of panel buttons draw.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-06 10:18:53 +03:00
Slava Zanko
d1c686c9f0 Ticket #397: Mouse click on column heading sorts panel on that column
Attached patch that adds the following 2 enhancements:
1) Using the mouse to click on a panel column heading re-sorts
  the panel on that column. If already sorted on that column,
  the sort order is reversed.

2) added a button "." next to "v" that toggles the display
   of hidden files.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-06 10:18:53 +03:00
Stan. S. Krupoderov
35ededec26 Ticket #1390: Key binding ctrl+t and marking files
mc.keymap: remap select charset to M-e, and C-t to mark file
    editmenu.c, main.c: change menu items to be consistent

Signed-off-by: Stan. S. Krupoderov <pashelper@gmail.com>
2009-10-05 16:02:04 +04:00
Andrew Borodin
197e5f62f1 Ticket #1665: panelize doesn't work when Start at: is empty in Find file dialog.
The panelize of find file results doesn't work
if 'Start at:' input field is empty in 'Find file' dialog.

The empty 'Start at:' input is forced populated by "." value.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-05 15:17:36 +04:00
Andrew Borodin
57f9d0e042 Ticket #54: fix of dialog mouse handling.
Skip widgets that matches coords but does not have an action (usually
groupboxes), continuing search of widget with defined action.
Thanks to sfionov.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-05 15:13:36 +04:00
IMDagger
6a4124c8ea Ticket #38: fixed saving other_dir path into panels.ini.
Save Info, Tree and etc. panels state, and restore after.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-05 13:09:41 +04:00