Commit Graph

9244 Commits

Author SHA1 Message Date
Andrew Borodin
c2693b7212 Implemented keybindings engine for ButtonBar (F1-F10 keys).
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
b7f367542a Modified menu command handling using DLG_ACTION message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
11d21f1437 Modified dialog callback function.
Added two parameters:
  * Widget *sender -- to recognize the wiget that have sent message;
  * void *data -- to pass any user-defined data to the dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
ccabd60ffc Implemented keybindings for Help window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
5592a472f6 Optimization of command handling. 2009-11-19 10:07:51 +03:00
Andrew Borodin
e85f6b23e3 Added Viewer commands and shortcuts.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
8224a26cf4 ButtonBar optimizations.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
6b71dc9f12 Added missed shortcuts for ButtonBar commands.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
da33e767e9 Type accuracy and code clean up.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
9760092c17 Enlarged sizes of Directory Tree dialog window.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
efdb645468 Implemeted keybindings for Tree widget
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
9b82c05fca Changed widget order in editor and viewer dialogs.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
e3f85ff6d0 Refactoring of ButtonBar drawing in viewer.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
ce4334e51e Made mcview_execute_cmd() function matched with dlg_exec_fn type.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Andrew Borodin
71c9e4c668 Ticket #212: implemented keybindings for ButtonBar.
First step: renamed type of dialog command execution function.
Made execution function more flexible: added parameters for
sender and receiver widgets and user data.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-19 10:07:51 +03:00
Ilia Maslakov
95312660df Merge branch '1792_editor_mouse_movement'
* 1792_editor_mouse_movement:
  Ticket #1792 (incorrect mouse movement)
2009-11-18 21:55:35 +00:00
Ilia Maslakov
64bc6aa1c7 Ticket #1792 (incorrect mouse movement)
Fixed incorrect mouse movement when text scrolled to the right.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-11-18 21:53:08 +00:00
Slava Zanko
abcc78696b Merge branch '1826_fixup_without_edit'
* 1826_fixup_without_edit:
  Ticket #1826: fixing build w/o internal edit
2009-11-18 22:45:07 +02:00
Enrico Weigelt, metux IT service
d06eb6452e Ticket #1826: fixing build w/o internal edit 2009-11-18 22:44:20 +02:00
Slava Zanko
b6a123c047 Merge branch '1794_treeview_segfault'
* 1794_treeview_segfault:
  Ticket #1794: Segfault in treeview
2009-11-18 22:37:25 +02:00
Slava Zanko
e071af460f Ticket #1794: Segfault in treeview
Testase:
 * rm -f ~/.mc/Tree
 * run mc
 * F9 -> Command -> Directory tree
 * Press F2
 * Go to '/lib' item
 * Press F2
 * exit from mc
 * run mc again
 * F9 -> Command -> Directory tree
 * press HOME key

Fix issue:
changed forgotten variable name.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-18 22:36:56 +02:00
Andrew Borodin
80a9540c7a Merge branch '1781_slow_startup'
* 1781_slow_startup:
  Ticket #1781: some improvements of startup time.
2009-11-18 14:24:31 +03:00
Andrew Borodin
15a21a71cd Ticket #1781: some improvements of startup time.
After implementation of keybinding engine and reimplenetation
of menu engine, MC starts very slow due to multiple trivial
(totally non optimized) search of many values in many arrays.

This patch performes the some speedup of MC startup process.

Statistics:
- startup time without the patch: 0m0.413s
- startup time with the patch: 0m0.073s

Great thanks to 0xe2.0x9a.0x9b for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-18 14:23:48 +03:00
Andrew Borodin
edbdaaa50d Merge branch '1776_save_select_group_flags'
* 1776_save_select_group_flags:
  Ticket #1776: save flags of select/unselet file group.
2009-11-18 14:21:23 +03:00
kenny
0c309724a5 Ticket #1776: save flags of select/unselet file group.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-18 14:21:08 +03:00
Andrew Borodin
63f93019f5 Merge branch '1803_qansi_key_defines'
* 1803_qansi_key_defines:
  Ticket #1803: added missed esc sequencies for qansi terminals.
2009-11-18 13:27:44 +03:00
Vit Rosin
aa3f4b66d4 Ticket #1803: added missed esc sequencies for qansi terminals.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-18 13:27:20 +03:00
Ilia Maslakov
7e30a30e24 Merge commit 'origin/256_backward_word_fix'
* commit 'origin/256_backward_word_fix':
  Ticket #256 (segfault in backward_word)
2009-11-18 12:41:16 +03:00
Egmont Koblinger
ecee0cd4b9 Ticket #256 (segfault in backward_word)
fixed segfault in backward_word (widget.c)
    ...
    The for loop, whose purpose is to remove exactly 1 character
    (hence I don't get why it's a loop, but nevermind) was not UTF8-ready.
    So if the character preceding the cursor was an accented one,
    it jumped to the middle of the UTF-8 sequence, causing the rest of
    the stuff go unpredictable.

    Although it *should* never happen (which, as we all know,
    does not equal to "never happens"), in this case "p" simply jumped
    over "in->buffer". The function has a "p != in->buffer" check three times,
    it might it more robust if you replaced that with "p >= in->buffer".
    This should prevent the segfault, and just stay with a slightly buggy but
    otherwise harmless alt-backspace behavior, should there be any UTF-8 or
    similar bugs left. This change is not included in my patch.

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
2009-11-18 11:41:12 +03:00
Andrew Borodin
daac0e5a67 Merge branch '1710_edit_instert_multiline'
* 1710_edit_instert_multiline:
  Ticket #1710: newlines are lost when pasting multiline text in editor.
2009-11-16 14:46:24 +03:00
Andrew Borodin
3f19a0eeb9 Ticket #1710: newlines are lost when pasting multiline text in editor.
When pasting multiline text with shift+mouse newline characters
are lost. Pasted text is not shown before any key is pressed.

Middle-mouse pasting in mc requires shift being pressed to keep mc
from interpreting the button press itself, so it is passing on to
xterm/gpm. That has the nice side effect that the pasted enter
characters are automatically shift-enter, which was simply interpreted
as newline-without-autoindent. However, the keybinding for shift-enter
have been lost in the course of #212 - it simply does nothing,
and consequently text is pasted without newlines.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-13 12:03:33 +03:00
Andrew Borodin
d36c635d38 Merge branch '1779_syntax_files'
* 1779_syntax_files:
  Ticket #1779: some syntax files are not installable.
2009-11-12 12:19:59 +03:00
Andrew Borodin
0f58794a67 Ticket #1779: some syntax files are not installable.
Recently added syntax files were not added to Makefile.am,
therefore they won't get it to the distribution through
EXTRA_DIST and are not installed.

Now syntax/Makefile.am file contains all syntax file names
that are sorted alphabetically. Description of tt.syntax
was added to the syntax/Syntax file.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-12 12:19:36 +03:00
Slava Zanko
bbb025097e Merge branch '1708_ftp_permission'
* 1708_ftp_permission:
  Ticket #1708: ftp permissions
2009-11-12 11:07:05 +02:00
Slava Zanko
4f6c5e7811 Ticket #1708: ftp permissions
Some FTP-servers don't have chmon support (or don't able to change permissions in some cases).

This commit will add "ignore_ftp_chattr_errors" section into config file.

Now default behavior: ignore FTP errors related to chmod operations.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-12 11:06:52 +02:00
Andrew Borodin
3368438bee Merge branch '1810_edit_save_mode'
* 1810_edit_save_mode:
  Ticket #1810: fixed CK_Edit_Save_Mode command handling.
2009-11-11 13:56:25 +03:00
Andrew Borodin
354b184463 Ticket #1810: fixed CK_Edit_Save_Mode command handling.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2009-11-11 13:55:52 +03:00
Slava Zanko
398138f6dc Merge branch '1790_mc_crash'
* 1790_mc_crash:
  Makefile.am: Fixed incorrect variable name if maintainer mode is active.
  Ticket #1790: mc crashes on start
2009-11-11 11:33:41 +02:00
Slava Zanko
7bdff35062 Makefile.am: Fixed incorrect variable name if maintainer mode is active.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-11 11:33:06 +02:00
Slava Zanko
90a7ad8528 Ticket #1790: mc crashes on start
If ~/.mc/panels.ini have incorrect value of 'sort_order' key, then mc will crashed.

Fix issue: Now default sort_order for incorrect value is  'name' (sort by name)

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-11 11:33:06 +02:00
Slava Zanko
313e42d24d Revert "misc/mc.ext.in: added 3gp video"
This reverts commit 2f901ef642.

Patch is dirty. Added into repo misc/mc.ext - this is autogenerated
file and no need to store into repo.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-10 11:48:30 +02:00
Enrico Weigelt, metux IT service
de4e40dd8f Merge branch '1774_build_cleanups'
* 1774_build_cleanups:
  Fixed several missing includes
  Changed include 'glib.h' to 'global.h' because global.h file has some things for
  vfs/mcserv.c: fixed variable name clashes and missing includes
  vfs/undelfs.c: Fixed variable name clashes
  vfs/vfs-impl.h: fixed missing includes
  vfs/utilvfs.h: fixed missing includes
  src/screen.c: const char* cleanup, fixing break on -Werror
  Dropping non-strftime() support and fixing -Werror problem
  m4.include/mc-use-termcap.m4: fixed const char* issue which triggers break on -Wall
  Ticket #1774: Various build fixups (missing includes, name clashes, ...)
2009-11-09 13:50:34 +01:00
Enrico Weigelt, metux IT service
9070aa11f7 Fixed several missing includes 2009-11-09 13:49:57 +01:00
Slava Zanko
d58af17cb8 Changed include 'glib.h' to 'global.h' because global.h file has some things for
backward compatibility with glib (eg. including 'glibcompat.h')

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2009-11-09 13:49:57 +01:00
Enrico Weigelt, metux IT service
e0b3247c50 vfs/mcserv.c: fixed variable name clashes and missing includes 2009-11-09 13:49:56 +01:00
Enrico Weigelt, metux IT service
cd2f7bd24a vfs/undelfs.c: Fixed variable name clashes 2009-11-09 13:49:56 +01:00
Enrico Weigelt, metux IT service
f3370ca9e5 vfs/vfs-impl.h: fixed missing includes 2009-11-09 13:49:56 +01:00
Enrico Weigelt, metux IT service
6ca8086ab1 vfs/utilvfs.h: fixed missing includes 2009-11-09 13:49:56 +01:00
Enrico Weigelt, metux IT service
ae417890fe src/screen.c: const char* cleanup, fixing break on -Werror 2009-11-09 13:49:56 +01:00
Enrico Weigelt, metux IT service
91a5df442f Dropping non-strftime() support and fixing -Werror problem
Problem:

a) when running ./configure, strftime() and other functions cannot be
   properly detected, since autoconf generates crappy test code, which
   at least fails when warnings are treated as errors (gcc: -Werror).

b) strtime() is standard since C89, so we can simply expect it to exists
   (if there's *really* some acient box out there breaking mc build,
   it's libc/toolchain should be fixed ;-p)

Solution:

Remove the checks for strftime() and all workarounds
2009-11-09 13:49:56 +01:00