* 3632_widget_flags:
Reorganize WDialog flags.
(dlg_set_position): minor refactoring.
Rename DLG_WANT_TAB to WOP_WANT_TAB and move it to widget_options_t.
By default, WOP_WANT_HOTKEY option is off.
If widget wants cursor, define that explicitly.
Add WST_MODAL state.
WOP_TOP_SELECT: new widget option
Join widget_state_t and dlg_state_t.
Move WOP_WANT_IDLE option to widget_state_t flags
Move WOP_DISABLED option to widget_state_t flags
widget_state_t: new type.
(widget_get_options): new widget API.
Change prefix of widget options: W_ -> WOP_.
Ticket #3632: refactoring of widget flags.
* DLG_FULLSCREEN: move and rename to WPOS_FULLSCREEN.
* DLG_CENTER: move and rename to WPOS_CENTER.
* DLG_TRYUP: move and rename to WPOS_TRYUP.
* WDialog::fullscreen: remove, use WPOS_FULLSCREEN instead.
* WDialog::compact: new field. Use instead of DLG_COMPACT.
* WDialog:🎏 remove.
* dlg_flags_t: remove.
* dlg_create: add new agruments: pos_flags, compact. Remove
argument: flags.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
The bug:
1. Go to the source directory for version 4.8.17.
2. Enter the command "ls -l misc/mc*". The output will show at least 7 files.
3. Start mc.
4. Press Meta-! to open the "Filtered View" dialogue box.
5. Enter the same command: "ls -l misc/mc*".
Result:
MC displays the following error:
"ls: cannot access misc/mc*: No such file or directory".
Fix:
(mc_popen): use popen(3) way: pass command to /bin/sh using the -c flag.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
* 3637_search_memleaks:
Do not recreate "String not found" error string every time.
mcview: make backward search interruptible.
(mcview_search_update_steps): fix calculation of update step.
mcedit: make backward search interruptible.
(editcmd_find): minor refactoring.
Check error string before show message.
Allow search be interruptible.
(mc_search__run_regex): minor optimization.
Ticket #3637: fix memory leaks in search engine.
Since mc_search__run_regex() pften is called in various iterative
procedures, don't reallocate regex buffer every time and use already
allocated one before.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Behavior: cause the panel to begin scrolling when the cursor
reaches the middle of the panel, so that the cursor tends to stay in
the middle of the panel on long listings. Only when you reach the
beginning or the end of the listing will the cursor move to the first or
last file.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
As per #3629, use `LIBINTL` for `gettext.m4` versions >= 0.11.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* odp / ods / odt: ODF documents
* xls: not a database, consistency with xlsx
* rb: Ruby program
* xq: XQuery program
* svg: Scalable Vector Graphics format
* tiff: alternative extension for Tagged Image File Format
* xcf: GIMP format
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
lib/strutil/xstrtol.c: prohibit monstrosities like "1bB".
Problem reported by Young Mo Kang in: http://bugs.gnu.org/23388.
(xstrtoumax): Allow trailing second suffixes like "B" only if the first
suffix needs a base.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
As other local functions use "text" as function parameter variable
to fix cppcheck warning:
[lib/widget/input_complete.c:569]: (error) Uninitialized variable: text
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Cleanup following cppcheck warnings:
[lib/utilunix.c:1109]: (style) Unused variable: link_path.
[lib/utilunix.c:1113]: (style) Variable 'readlinks' is assigned a value that is never used.
[lib/utilunix.c:1114]: (style) Unused variable: n.
Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>