Commit Graph

9107 Commits

Author SHA1 Message Date
Andrew Borodin
41989bd0c6 Implemented display of actual shortcuts in main menu.
Many shortcuts are not defined in keymap file and therefore
not displayed in menu.

Editor menu is not reimplemented yet.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Ilia Maslakov
82b7c4fdee Add support for multi-hotkeys in editor (like a ctrl-x,t).
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-26 16:15:31 +03:00
Andrew Borodin
e5feeea8d9 Added default keybinding strings.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
89336afb6b Added missed '#include "fileloc.h"' in main.c.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
b4b30941f5 Some refactoring.
Renamed name_key_map_t to name_keymap_t.
Renamed global_key_map_t to global_keymap_t.
Use more '#ifdef USE_INTERNAL_EDIT' preprocessor directives
Removed unused variables and structure members.
Aplly const modificator to keybind argument of keybind_cmd_bind().
Aplly const modificator to keyname argument of lookup_action().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Ilia Maslakov
de56559df5 Reimplemented keybindings parser.
New parser allows get the string representation of menu shortcuts.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-26 16:15:31 +03:00
Andrew Borodin
095fc65580 Use commands instead of callbacks to execute menu items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
4a02baa202 Fixed key translation in editor.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
b3b332083c Use commands instead of callbacks to execute menu items.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
e73664d966 Menu fixes and optimization.
Fixed hotkey handling.
Optimized call of menu item callback.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
c47d2d20d7 New menu engine: use GList instead of GPtrArray.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
83b855027e Menu: handle HOME and END keys.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Andrew Borodin
7f7bc452e3 Ticket #1563: Modified menu engine to create and modify menu dynamically.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-26 16:15:31 +03:00
Slava Zanko
a563b5d429 Merge branch '1715_i18n_duplicate'
* 1715_i18n_duplicate:
  Ticket #1715: Sort types: duplicate of i18n strings
2009-10-26 12:13:16 +02:00
Slava Zanko
11a54c7edf Ticket #1715: Sort types: duplicate of i18n strings
Avoid translations duplicates of sort type names.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-26 12:08:12 +02:00
Slava Zanko
5b394a4c90 Merge branch '1617_history_fix'
* 1617_history_fix:
  Ticket #1617: Fixed saving filepos file
2009-10-26 11:40:41 +02:00
Slava Zanko
e3702891ae Ticket #1617: Fixed saving filepos file
Restored old behaviour with some new improvements.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-26 11:40:00 +02:00
Ilia Maslakov
f3f975ec16 Merge branch '1627_widechar_in_viewer'
* 1627_widechar_in_viewer:
  fixed drawing zerowidth characters
  * Added g_unichar_iszerowidth() and g_file_set_contents() functions for
  Ticket #1627
2009-10-24 15:24:47 +00:00
Ilia Maslakov
acd0ed038d fixed drawing zerowidth characters
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-24 15:21:34 +00:00
Slava Zanko
e29e6126a6 * Added g_unichar_iszerowidth() and g_file_set_contents() functions for
compability with glib-2.6

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-24 15:21:34 +00:00
Ilia Maslakov
dfb0040c5b Ticket #1627
fix: display double width (CJK) characters.

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-24 15:21:34 +00:00
Slava Zanko
20cd37d751 Merge branch '1667_hardcoded_colors'
* 1667_hardcoded_colors:
  Fix colors showing for compile with S-Lang library
  Ticket #1667: Hardcoded colours
2009-10-24 16:45:35 +03:00
Slava Zanko
41c5b369de Fix colors showing for compile with S-Lang library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-24 16:42:04 +03:00
Ilia Maslakov
cb5836c2e0 Ticket #1667: Hardcoded colours
Problem:
BOOK_MARK_COLOR and BOOK_MARK_FOUND_COLOR are hardcoded
in edit/edit-widget.h and so cannot be changed via skin.

Solution:
Now these colors will configure via skin-file. Like:

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-24 16:42:04 +03:00
Andrew Borodin
6d4d1e9e79 Merge branch '1609_dont_fix_dest_filename'
* 1609_dont_fix_dest_filename:
  Don't modify file name in file operation.
  Ticket #1609: Do not modify file name in file operations.
2009-10-24 17:19:38 +04:00
Andrew Borodin
c7636e36bb Don't modify file name in file operation.
The problem: if I copy or move file with invalid UTF-8 symbols
in name to another directory (e.g. simply F5 Enter F6 Enter
to copy/move to the other panel), the filename gets mangled,
invalid UTF-8 characters are replaced by literal question marks.

Now the copy/move operation leaves the filename unchanged,
even if it is invalid in the locale mc's using for display.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-24 17:18:48 +04:00
Andrew Borodin
0cd390fd50 Ticket #1609: Do not modify file name in file operations.
Initial step: minor refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-24 17:18:48 +04:00
Andrew Borodin
551ca67e8f Fixed header of file operation dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-24 15:38:31 +04:00
Andrew Borodin
bf8edbabeb Merge branch '1711_fileop_i18n'
* 1711_fileop_i18n:
  More usage of gettext context.
  Minor otimization of panel_operate_generate_prompt().
  Ticket #1711: i18n: context and cleanup in file prompt strings
2009-10-23 18:50:33 +04:00
Andrew Borodin
562ad3e84b More usage of gettext context.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-23 18:50:13 +04:00
Andrew Borodin
055bff485e Minor otimization of panel_operate_generate_prompt().
Create temporary buffer in stack instead of heap.

Fixed pointer type mismatch in conditional expression
in panel_operate().

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-23 18:50:13 +04:00
Andrew Borodin
9fc2ffecce Ticket #1711: i18n: context and cleanup in file prompt strings
Use gettext context to handle file operation names in
Copy/Move/Delete dialogs.
Thanks to David Martin for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-10-23 18:50:13 +04:00
Ilia Maslakov
dc8c80c334 Ticket #1553
fixed wrong rectangular selection when selected from right to left
    and/or bottom to top

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-23 11:47:38 +00:00
Slava Zanko
2111bfc05d Merge branch '1618_rpm_spec_fix'
* 1618_rpm_spec_fix:
  Ticket #1618: Rpm build trouble.
2009-10-22 11:10:27 +03:00
Slava Zanko
8da65a8874 Ticket #1618: Rpm build trouble.
Changed mc.spec for valid building of packages.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-22 10:49:21 +03:00
Slava Zanko
fb4439aa57 Merge branch '1725_dont_abort_on_broken_cpio'
* 1725_dont_abort_on_broken_cpio:
  Ticket #1725: Do not abort on broken .cpio file
2009-10-22 10:43:35 +03:00
Denys Vlasenko
710d88cf3c Ticket #1725: Do not abort on broken .cpio file
For some reason, mc aborts if .cpio magic as wrong.
This trivial patch makes mc handle it gracefully.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-22 10:43:13 +03:00
Ilia Maslakov
d06bab4de3 Merge branch '395_editor_show_percent'
* 395_editor_show_percent:
  branch-outside patch: Fix return value of function mc_config_normalize_before_save()
  Ticket #395
2009-10-22 07:12:13 +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
Ilia Maslakov
310e2a25c1 Ticket #395
* add scrolled percentage in status bar (like in viewer)
    * make "simple statusbar" more simple

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-10-21 20:12:42 +00:00
Ilia Maslakov
6717960d5b Ticket #1492
fixed: indentation block when selecting with F3

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-21 18:03:45 +00:00
Slava Zanko
6cb3400f1b Merge branch '1618_menu_sr'
* 1618_menu_sr:
  Ticket #1618: menu.sr installed in wrong place
2009-10-21 10:36:39 +03:00
Slava Zanko
9f038952b0 Ticket #1618: menu.sr installed in wrong place
Bugreport:

When doing "make install" with default paths, "mc.menu" gets istalled into
{prefix}/etc/mc, but "mc.menu.sr" get installed into {prefix}/share/mc

Fix issue: Now mc.menu.sr will copyed into same place as mc.menu

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-21 10:36:27 +03:00
Ilia Maslakov
91be46a861 Ticket #1726 (AI_ADDRCONFIG fix)
fixed undeclared AI_ADDRCONFIG under uclibc <0.9.29

Signed-off-by: Ilia Maslakov <il.smind@google.com>
2009-10-20 18:13:20 +00:00
Slava Zanko
a1f9ceb99e Merge branch '1729_copying_into_arhive'
* 1729_copying_into_arhive:
  Ticket #1729: extfs: fail copying into arhive
2009-10-20 14:13:52 +03:00
Slava Zanko
f589410ced Ticket #1729: extfs: fail copying into arhive
Test case:
 * create any zip-archive (or take exists)
 * run mc
 * enter into archive
 * try to copy any files inside archive.

Fix issue: Try to open temporarry file twice: with O_CREATE flag; and without O_CREATE and with O_TRUNC flag
Also, created extfs_chown() function for avoid chown-related warnings.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-20 13:04:30 +03:00
Slava Zanko
a1a2164170 Merge branch '1690_patch_for_djvu'
* 1690_patch_for_djvu:
  Ticket #1690: mc.ext entry for .djvu
2009-10-20 10:47:22 +03:00
Andrey Rahmatullin
0daf01d7c2 Ticket #1690: mc.ext entry for .djvu
Opening .djvu with djview

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-10-20 02:01:34 +03:00
Slava Zanko
890f268bf0 Merge branch '213_busy_shell'
* 213_busy_shell:
  Ticket #213 [mc-ru-fork] patch for fix bug 'The shell is already running a command'
2009-10-16 15:29:09 +03: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