Commit Graph

13745 Commits

Author SHA1 Message Date
Andrew Borodin
d44220c75f If widget wants cursor, define that explicitly.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
db0d01b9d6 Add WST_MODAL state.
* WDialog::modal: remove. Use WST_MODAL instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
fd4e56bf39 WOP_TOP_SELECT: new widget option
...to place widget on top of other widgets in dialog.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
4b72fb5f5e Join widget_state_t and dlg_state_t.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
0a2877edef Move WOP_WANT_IDLE option to widget_state_t flags
...and rename to WST_IDLE.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
b337287336 Move WOP_DISABLED option to widget_state_t flags
...and rename to WST_DISABLED.

  * Widget::state: new field.
  * (widget_set_state): new function.
  * (widget_set_options): symplify.
  * (input_set_options): remove.
  * MSG_ENABLE, MSG_DISABLE: new messages.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
a9fcd6c4c6 widget_state_t: new type.
(widget_get_state): new widget API.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
f5a1dfcef4 (widget_get_options): new widget API.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
4a0cd948df Change prefix of widget options: W_ -> WOP_.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
619480c68b Ticket #3632: refactoring of widget flags.
Initial commit: rename functions:
  * widget_default_set_options_callback -> widget_default_set_options
  * input_set_options_callback -> input_set_options

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-06-02 20:34:38 +03:00
Andrew Borodin
5251045950 Merge branch '3646_filtered_view'
* 3646_filtered_view:
  Ticket #3646: Filtered View doesn't work.
2016-05-28 08:17:22 +03:00
Andrew Borodin
44859027b4 Ticket #3646: Filtered View doesn't work.
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>
2016-05-28 08:16:31 +03:00
Andrew Borodin
35ad1ab0b2 Merge branch '3637_search_memleaks'
* 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.
2016-05-22 14:18:01 +03:00
Andrew Borodin
7f8ab40a44 Do not recreate "String not found" error string every time.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
3af54b0e93 mcview: make backward search interruptible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
c13e4b3c0e (mcview_search_update_steps): fix calculation of update step.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
81a55537de mcedit: make backward search interruptible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
90c67f9220 (editcmd_find): minor refactoring.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
74e671fb59 Check error string before show message.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
8252345666 Allow search be interruptible.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Andrew Borodin
1101ef2cd9 (mc_search__run_regex): minor optimization.
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>
2016-05-22 14:16:19 +03:00
Andrew Borodin
1c22d44970 Ticket #3637: fix memory leaks in search engine.
(mc_search_set_error): new search API to set the code and message
of search error.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-22 14:16:19 +03:00
Yury V. Zaytsev
9cd1e165c5 Merge branch '3643_cons_handler_min_macro' 2016-05-12 07:46:48 +02:00
Ben Woods
1afe2a091a Ticket #3643: fix FTBFS in cons.handler.c on FreeBSD 11
Replace `min` with `MIN` macro missed in bc14ff44.

Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-11 21:16:29 +02:00
Marco Ciampa
ff68d2633f Updated Italian translation 2016-05-08 19:39:23 +02:00
Yury V. Zaytsev
fea323e1ad Update ebuild.syntax to include new EAPI 6 keywords
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-08 18:42:43 +02:00
Marco Ciampa
daba5f1d4c Updated Italian translation 2016-05-08 12:32:05 +02:00
Yury V. Zaytsev
ae91db8909 Updated doc/NEWS file
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-07 18:09:05 +02:00
Yury V. Zaytsev
bcb37dde64 Updated translations from Transifex
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2016-05-07 18:01:17 +02:00
Andrew Borodin
4b142c7637 Merge branch '3130_panel_center_scroll'
* 3130_panel_center_scroll:
  Update po/*.po files.
  Update Russian manual page.
  Clarify center scrolling of multi-column lists.
  Ticket #3130: implement center scrolling of panel.
2016-05-07 18:39:00 +03:00
Andrew Borodin
21263f6223 Update po/*.po files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 18:36:10 +03:00
Andrew Borodin
2e3245d54c Update Russian manual page.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 18:20:43 +03:00
Andrew Borodin
1a5aff3188 Clarify center scrolling of multi-column lists.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 18:20:43 +03:00
Mike Smithson
a4b51c3e81 Ticket #3130: implement center scrolling of panel.
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>
2016-05-07 18:20:16 +03:00
Andrew Borodin
82fc95fb77 Merge branch '3607_cleanup'
* 3607_cleanup: (43 commits)
  Replace obsolete `INTLLIBS` with `LIBINTL` for `libmc`
  filehighlight: add more common file formats
  Move definition of reset_hp_softkeys variable to lib/tty/tty-slang.[ch].
  (feed_subshell): change type of fail_on_error from int to gboolean.
  Sync with gnulib 6ed53f13bc39d9a0252549e98a2a59441fb2351f.
  lib/widget/input_complete.c: apply coding guidelines.
  (command_completion_function): cleanup cppcheck warning.
  (dview_save_options): clarify boolean options.
  Get rid of global variables mc_main_config and mc_panels_config.
  (mc_realpath): cleanup cppcheck warning.
  (update_split): cleanup cppcheck warning.
  lib/vfs/direntry.c: cleanup cppcheck warnings.
  (mc_shell_get_installed_in_system): fix description.
  Fix typo.
  Clarify type cast in tgetsrt() calls.
  Clarify type cast in SLtt_tgetsrt() calls.
  MidnightCommander/mc#95: update Java syntax: add missing keywords: _ assert strictfp.
  MidnightCommander/mc#89: add webp extension to file highlight and extension files.
  MidnightCommander/mc#97: src/filemanager/mountlist.c: add makedev() declaration.
  (dlg_set_top_or_bottom_widget): move to proper file section.
  ...
2016-05-07 16:29:09 +03:00
Andreas Mohr
a31d6ac29e Replace obsolete INTLLIBS with LIBINTL for libmc
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>
2016-05-07 16:28:47 +03:00
Yury V. Zaytsev
f51c0f3e7c filehighlight: add more common file formats
* 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>
2016-05-07 16:28:47 +03:00
Andrew Borodin
3204563bff Move definition of reset_hp_softkeys variable to lib/tty/tty-slang.[ch].
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:28:47 +03:00
Andrew Borodin
e251c67ef7 (feed_subshell): change type of fail_on_error from int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:28:47 +03:00
Andrew Borodin
bdb81cd482 Sync with gnulib 6ed53f13bc39d9a0252549e98a2a59441fb2351f.
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>
2016-05-07 16:28:47 +03:00
Andrew Borodin
abbfde35b2 lib/widget/input_complete.c: apply coding guidelines.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
1bfe137d2a (command_completion_function): cleanup cppcheck warning.
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>
2016-05-07 16:19:02 +03:00
Andrew Borodin
4449f525e2 (dview_save_options): clarify boolean options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
2151edaff2 Get rid of global variables mc_main_config and mc_panels_config.
Use mc_global.main_config and mc_global.panels_congig instead.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
1c2060c28f (mc_realpath): cleanup cppcheck warning.
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>
2016-05-07 16:19:02 +03:00
Andreas Mohr
f03bb30a5a (update_split): cleanup cppcheck warning.
Cleanup following cppcheck warnings:

[src/filemanager/layout.c:231]: (style) Clarify calculation precedence for '&' and '?'.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andreas Mohr
67035605b9 lib/vfs/direntry.c: cleanup cppcheck warnings.
Cleanup following cppcheck warnings:

[lib/vfs/direntry.c:121]: (style) Clarify calculation precedence for '&' and '?'.
[lib/vfs/direntry.c:386]: (style) Clarify calculation precedence for '&' and '?'.
[lib/vfs/direntry.c:391]: (style) Clarify calculation precedence for '&' and '?'.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
80f138c1ba (mc_shell_get_installed_in_system): fix description.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
eecf1fc946 Fix typo.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00
Andrew Borodin
cae521c61d Clarify type cast in tgetsrt() calls.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2016-05-07 16:19:02 +03:00