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>
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>
add shared clipboard support
Signed-off-by: Ilia Maslakov <il.smind@google.com>
Fixed memory leaks. Type accuracy. Optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* fixed ctrl-g handler
* change action names from InputKillSave to InputXStore and InputPaste to InputXPaste
* update mc.keymap.default mc.keymap.emacs
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
* fixed binding in mc.keymap.default and mc.keymap.emacs
for CmdCopyCurrentTagged, CmdCopyOtherTagged,
CmdCopyCurrentPathname, CmdCopyOtherPathname
* fixed typo
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
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>
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>
* 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>
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>
add more keys into mc.keymap
fix: CK_SingleDirsizeCmd event
add default keys (alt-'.', alt-'+') mc.keymap
Signed-off-by: Ilia Maslakov <il.smind@google.com>
Added alt-shift-h hotkey
Add some documentation about keymap file.
Replace some symbols into names '.' to 'dot', '?' to question, etc.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Original message:
If invalid skin name is set via command line (or config file, or environment variable),
then mc starts silently like -b -a mode. Two proposals, if required skin cannot be found:
*. Show error message "Cannot find skin"
*. Load the default.ini skin instead of set -a -c mode.
Fix issue:
Mc now more verbose if skin not found:
{{{
_("Unable to load '%s' skin.\nDefault skin has been loaded")
}}}
or if skin not parse:
{{{
_("Unable to parse '%s' skin.\nDefault skin has been loaded")
}}}
Translators: please, update your translates.
Also, mc will try to load 'default' skin before switch to 'b&w' scheme.
This commit adds ability to usage GError - glib error handling.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Signed-off-by: Ilia Maslakov <il.smind@google.com>
Some fixies after patch of Ilia Maslakov.
* Fixed pathes to rules-highlight files.
* Added on-fly refresh of rules after editing.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Added support of filenames highlighting in panels.
Now rules of highlighting described into external file filehighlight.ini
Number of highlight rules is unlimited (in opposite to X-Stranger patch).
Highlight will made by:
* file type (directory, regular, symlink, special device etc.)
* extensions of filenames (ends of filenames)
* regular expressions
Big thanks to X-Stranger <x@linux.by> for idea
and to Alexey Kaminsky <alexeykaminsky@gmail.com> for testing.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
We really not need for all libpopt features.
As fact, simple POSIX getopt() is enough.
But if we have glib - we must use glib for unification.
Created two files: src/args.c and src/args.h
Parce of command line options now processed in these files.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
* add: switching between old (default) 1024 based "binary" prefixes
and SI (1000 based) size prefixes when displaying file sizes
Signed-off-by: Ilia Maslakov <il.smind@gmail.com>
Size in SI units: changed option name and description.
* Changed option name in 'Configuration options' dialog.
* Moved description to proper section in man page.
* Added russian translation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
TestCase:
* Have a mc running where you have two different directories in each panel.
* Tab, so that you are in the other panel.
* Ctrl-O to go to subshell.
* You see two different prompts printed next to each other.
Fix issue:
In function src/main.c:do_update_prompt(): added '\r\n' before show prompt.
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Since midnight_dlg can be invisible during screen resize,
don't update the hintbar in SIGWING signal handling function.
Now the hintbar is updated during DLG_DRAW message handling
in mignight_dlg callback.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Set color mode via tty_init_colors() function.
Made disable_colors and force_colors variables static in main.h.
Removed tty_disable_colors() function.
Some code optimization.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
getch have been renamed to tty_lowlevel_getch.
mi_getch have been renamed to tty_getch.
get_event have been renamed to tty_get_event.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
src/main.c (repaint_screen): call tty_touch_screen() here.
src/execute.c (toggle_panels): fixed comment.
Call repaint_screen() instead of do_refresh().
src/cmd.c (do_view_cmd): small optimization.
(do_edit_at_line): likewise.
(swap_cmd): since tty_touch_screen() is called in repaint_screen()
now, don't call it here.
The call of color initialization function (tty_init_colors()) is moved out
from init_curses() function. Thus we avoid the color reinitialization
in SIGWINCH hangling function.
tty_noecho() is used instead of noecho() function or macro.
tty_flush_input() is used instead of flushinp() function or macro.
tty_reset_screen() is used instead of endwin() function or macro.
tty_shutdown() is based on slang_shutdown(). Also implemented for
NCurses as wrapper for endwin().
tty_touch_screen() is used instead of touchwin() function or macro.
tty_set_normal_attrs() is used instead of standend() function or macro.
tty_set_alt_charset() is used instead of acs() and noacs()
functions or macros.
tty_baudrate() is used instead of baudrate() function or macro.
Created some TTY functions instead of MC core global variables.
Moved init_layer() function from MC core to TTY layer.
Renamed slang_init() to init_slang().
Added required #include's in TTY layer.
Moved S-Lang color and attribute definitions from src/tty/tty-slang.h
to colors-slang.h.
If MC built with --without-subshell option is run with -d option,
the Ctrl-C key combination closes MC. Such behaviour was introduced
in 66332a4fb1 commit.
This commit actually restores the SIGINT signal handling which was
before 66332a4fb1 commit.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Reason:
glib ini-function works only with UTF-8 in files. Bug raised if system charset not UTF-8.
Issue:
* recode to utf-8 before saving values of ini-params and
* recode from utf-8 after reading values of ini-params
Also fixed:
* if system codepage is not UTF-8, panelize named is always in utf-8 and seems as non-sense string.
* Recode panelize command names into system codepage from utf-8
* global variable utf8_display now initialized in any case (non-relative to ENABLE_CHARSET)
Signed-off-by: Slava Zanko <slavazanko@gmail.com>
Modified histroy_cmd() function: now it shows history of command
line widget, not yet another dialog window.
Modified menu entry.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
add show warnind dialog if system and display or source codeset are diferent
add global option skip_check_codeset if set then warnind window not show
set display_codepage, source_codepage = system locale
All editor private API stuff is located now in edit/edit-impl.h.
Public API is located in edit/edit.h.
Added functions to read some fields of WEdit struct.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>