Commit Graph

10893 Commits

Author SHA1 Message Date
Andrew Borodin 87f3030c7a Fix of DLG_ACTION handling in file panels.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin f83bdadfa8 Ticket #2520: SIGINT generated by Ctrl-g pressing closes file panels.
When SIGINT signal is raised, the CK_Cancel message is handled by
dlg_execute_cmd() and midnight_dlg is closed.

The solution: CK_Cancel is sent to current dialog via callback, and if
current dialog doesn't handle CK_Cancel message, then handle it with common
way using dlg_execute_cmd().

Since Ctrl-g is used to generate SIGINT in MC, remove this shortcut from
all sections of keymaps except the [dialog] section.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-30 16:17:16 +04:00
Andrew Borodin e1c933e1cb Merge branch '2514_disable_nls'
* 2514_disable_nls:
  Ticket #2514: fixup of build with --disable-nls option.
2011-03-29 21:26:18 +04:00
Andrew Borodin 80c2334e14 Ticket #2514: fixup of build with --disable-nls option.
Don't install man pages, help and hint files if mc is built with
--disable-nls key.

Thanks Max Khon <fjoe samodelkin net> for the original patch.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-29 21:26:03 +04:00
Slava Zanko e4c064120b Merge branch '2495_show_addition_info_about_paths'
* 2495_show_addition_info_about_paths:
  Describe new command line options (-F and --configure-options) in English and Russian man pages.
  Added --configure-options for easy update & reconfigure existing mc.
  Ticket #2495 (addition info about paths)
2011-03-29 12:41:09 +03:00
Slava Zanko 6cf2cd9055 Describe new command line options (-F and --configure-options) in English and Russian man pages.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-29 12:37:55 +03:00
Slava Zanko 56c83d03d4 Added --configure-options for easy update & reconfigure existing mc.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-29 12:37:55 +03:00
Slava Zanko ed70459b4d Ticket #2495 (addition info about paths)
Added -F option (AKA --datadir-info) for show extended information about used data dirs

display info about default used paths by 'mc -V'

Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-29 12:37:55 +03:00
Yury V. Zaytsev 2a25a0943b Merge branch '2515_without_background'
* 2515_without_background:
  Ticket #2515: Unused variable if without WITH_BACKGROUND
2011-03-25 14:19:55 +01:00
Pavel Vasilyev f4cbe4a4f3 Ticket #2515: Unused variable if without WITH_BACKGROUND
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-25 14:19:40 +01:00
Andrew Borodin 630519fbbc Merge branch '71_skip_all'
* 71_skip_all:
  Ticket #71: support of "Skip all" on multi-file/dir operation.
2011-03-25 13:38:20 +03:00
Andrew Borodin 0f1095ea38 Ticket #71: support of "Skip all" on multi-file/dir operation.
Added support of skip all failures on file/dir operations.
Original patch was created by me <me 0xn0 de> and modified by Thomas
Zajic <zlatko gmx at>.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2011-03-25 12:33:36 +03:00
Ilia Maslakov 371d6c9385 Merge branch '2120_cd_tilde_fix'
* 2120_cd_tilde_fix:
  Ticket #2120 (cd to ~ processed incorrectly)
2011-03-22 21:34:25 +00:00
alexander.stohr a53d636b05 Ticket #2120 (cd to ~ processed incorrectly)
cd to "~" or "~" with subdirs may fail when issued from the in the command
    line if more than one space is separating the "cd" and "~". So, "cd<one space>~" works,
    but "cd<multiple spaces>~" fails.

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

    some fixes
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-22 21:30:23 +00:00
Slava Zanko 30bc575179 Merge branch '2501_split_lib'
* 2501_split_lib: (25 commits)
  Added test for checking if library is independ to $(topsrcdir)/src
  Added configure parameter --enable-mclib for build own shared library
  update .gitignore for src/vfs/extfs/helpers/
  configure.ac: Moved GLib initialization to m4.include/ac-glib.m4
  Added manual for events (Russian and English).
  Lib: removed includes to "src" directory
  Added events for handle parent_call_string() and parent_call()
  Use events for suspend mc (by pressing on CTRL+Z)
  Moved mc_refresh() to lib/widget
  Use events for calling help window
  Use events for operate with clipboard (copy/paste to external clipboard, save/load to file)
  Use events for update panels
  Moved input_map, listbox_map and dialog_map variables to 'lib' subdirectory.
  src/background.c: added some forgotten va_end() calls
  Move check_for_default() function from lib/util.c to src/util.c
  Moved initialization of mc_global.share_data_dir and mc_global.sysconf_dir to library
  Move src/filemanager/complete.c to lib/widget/input_complete.c
  Use events to show VFS messages.
  Removed mc_main_error_quark() function
  Use events to check timestamp of panel directories
  ...
2011-03-21 23:56:03 +02:00
Slava Zanko 994254917c Added test for checking if library is independ to $(topsrcdir)/src
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko 06f99484de Added configure parameter --enable-mclib for build own shared library
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko c0637dcb27 update .gitignore for src/vfs/extfs/helpers/
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko 48d1f1f518 configure.ac: Moved GLib initialization to m4.include/ac-glib.m4
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko 7df04e95e2 Added manual for events (Russian and English).
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:53 +02:00
Slava Zanko f40887c3c6 Lib: removed includes to "src" directory
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko 6621250292 Added events for handle parent_call_string() and parent_call()
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko a01b8edd7a Use events for suspend mc (by pressing on CTRL+Z)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko aad40e52fb Moved mc_refresh() to lib/widget
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
Slava Zanko 5f8a5e4290 Use events for calling help window
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 23:55:52 +02:00
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
Slava Zanko a5195d285a Added new engine for universal event system.
Example:

gboolean mkdir_callback(const gchar *event_group, const gchar *event_name, gpointer init_data, gpointer event_data)
{
    ... /* some action for handle event */
    return TRUE; /* got chance to run other callbacks for this event or */
    return FALSE; /* break execution for other callbacks */
}

mc_event_add ("filesystem", "mkdir", mkdir_callback, "some init data", NULL);
mc_event_add ("filesystem", "mkdir", mkdir_log_callback, "some init data", NULL);
mc_event_add ("filesystem", "mkdir", third_callback, NULL, NULL);

/*
    Last add - first run. In this case execution order is
 * third_callback
 * mkdir_log_callback
 * mkdir_callback
 if third_callback fuctions will return FALSE, then other callbacks
 (mkdir_log_callback and mkdir_callback) never run!
*/

... /* some code */

/* for example, after pressing F7 */
mc_event_raise("filesystem", "mkdir", "some event_data... path to directory");

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 11:46:40 +02:00
Slava Zanko fc7142d2a0 Ticket #2501: 'lib' should be independ to 'src' directory
Added base support for unit tests (see http://check.sourceforge.net/ for details).

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
2011-03-21 10:30:27 +02:00
Andrew Borodin b67d0c0b92 Merge branch '2511_simplify_keybindings'
* 2511_simplify_keybindings:
  Symbolic names of keymap sections are defined.
  Change hardcoded definitions of default keymap.
  Allow remove key with empty value from target config.
  Prepare to merge default and user-defined keymaps.
  Added --nokeymap command line option to disable load keybindings from file.
  Define keybind numbers using enum.
  Fixup of shift-arrow mark in editor.
  Unification of keybinding names.
  Ticket #2511: simplification and unification of keybinding names.
2011-03-20 19:36:26 +03: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