Commit Graph

13878 Commits

Author SHA1 Message Date
Mooffie
25b4096ace Merge branch '3766_add_widget_autopos'
* 3766_add_widget_autopos:
  Ticket #3766: add_widget_autopos() doesn't remove focus from the previously focused widget.
2017-02-09 18:00:43 +02:00
Andrew Borodin
e83409b6d7 Ticket #3766: add_widget_autopos() doesn't remove focus from the previously focused widget.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-02-09 17:49:34 +02:00
Mooffie
b39c1b9446 Merge branch '3763_run_listbox_with_data'
* 3763_run_listbox_with_data:
  (dialog_switch_list): simplify the listbox selector.
  (edit_window_list): simplify the listbox selector.
  Ticket #3763: introduce run_listbox_with_data().
2017-01-30 01:12:39 +02:00
Mooffie
bc46978036 (dialog_switch_list): simplify the listbox selector.
We use the new run_listbox_with_data().

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-29 23:32:13 +02:00
Mooffie
6273b46bb5 (edit_window_list): simplify the listbox selector.
We use the new run_listbox_with_data().

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-29 23:32:13 +02:00
Mooffie
11c1aff4d3 Ticket #3763: introduce run_listbox_with_data().
Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-29 23:32:04 +02:00
Alexey Shipunov
a4f05e5123 Initial support of R syntax highlighting.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-29 09:54:24 +03:00
Andrew Borodin
0a28622921 misc/syntax/Makefile.am: fix sort order.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-29 09:48:37 +03:00
Sergey Sharybin
d02abd003a Ticket #3762: initial support of OpenShadingLanguage highlighting.
Based on C syntax with some extra keywords gathered from OSL's lexer rules.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-29 09:40:31 +03:00
Yury V. Zaytsev
1e32dace62 Merge branch 'vorakl-skin-yadt' 2017-01-24 20:55:31 +01:00
Oleksii Tsvietnov
91c96494f2 skins: add yet another dark theme (YADT) by vorakl (MidnightCommander/mc#115)
Signed-off-by: Oleksii Tsvietnov <me@vorakl.name>
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
2017-01-24 20:49:40 +01:00
Sergei Trofimovich
bc8eb09256 vfs/tar/tar.c: add makedev() declaration
Noticed as a build failure on gentoo/glibc-2.24 as:

      CCLD     mc
    ./.libs/libinternal.a(tar.o): In function `tar_fill_stat':
    /home/slyfox/dev/git/mc/src/vfs/tar/tar.c:428: undefined reference to `makedev'
    collect2: error: ld returned 1 exit status

The change uses "lib/unixcompat.h" to pull
'makedev()' declaration from proper header.

Signed-off-by: Sergei Trofimovich <siarheit@google.com>
2017-01-22 17:05:39 +00:00
Andrew Borodin
9845fa6ce5 Merge branch '3693_cleanup'
* 3693_cleanup: (22 commits)
  Update copyright years.
  (tar_fill_stat): add omitted breaks.
  Aggressive use of whitespace() and whiteness() macros.
  WCheck, WRadio: send MSG_MOTIFY without parameter.
  Fish shell integration: ignore mc's prompt in history.
  (tty_color_get_name_by_index): cleanup format compiler warning.
  Cleanup comma compiler warnings.
  (sftpfs_open_file): GCC zero initialization bug workaround.
  Cleanup maybe-uninitialized compiler warnings.
  (mc_search__g_regex_match_full_safe): don't use negative string length.
  mcedit: syntax.syntax: highlight comments preceded by spaces.
  misc/syntax/Syntax.in: fix patterns.
  Use g_queue_free_full().
  (mc_search__cond_struct_new_regex_ci_str): add documentation.
  option_auto_syntax: change type to gboolean.
  src/setup.c: minor refactoring of main options load.
  setup: split integer and boolean options.
  Change type from int to gboolean for variables controlled by checkboxes.
  WCheck: change type of 'state' from int to gboolean.
  WCheck: remove unused C_CHANGE.
  ...
2017-01-22 19:13:49 +03:00
Andrew Borodin
e9fd11bfcd Update copyright years.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 19:12:55 +03:00
Andrew Borodin
b9085cc1c8 (tar_fill_stat): add omitted breaks.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:45:56 +03:00
Andrew Borodin
28ca14d73a Aggressive use of whitespace() and whiteness() macros.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
e0c02c9c77 WCheck, WRadio: send MSG_MOTIFY without parameter.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Fabian Homborg
4e74d7d255 Fish shell integration: ignore mc's prompt in history.
Fish does something equivalent to bash's "HISTCONTROL=ignoreboth" by default,
so simply prefixing a command with a space will let it be ignored.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andreas Mohr
469dc1352b (tty_color_get_name_by_index): cleanup format compiler warning.
Found by GCC 6.2.0.

color-internal.c:186:33: error: format '%X' expects argument of type 'unsigned int', but argument 3 has type 'int' [-Werror=format=]

Signed-off-by: Andreas Mohr <and@gmx.li>
2017-01-22 18:44:22 +03:00
Andreas Mohr
238d3ac53c Cleanup comma compiler warnings.
Found by Clang 3.9.0.

Signed-off-by: Andreas Mohr <and@gmx.li>
2017-01-22 18:44:22 +03:00
Andrew Borodin
04c1eb6160 (sftpfs_open_file): GCC zero initialization bug workaround.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andreas Mohr
8f304f558d Cleanup maybe-uninitialized compiler warnings.
Found by GCC 6.2.0.

Signed-off-by: Andreas Mohr <and@gmx.li>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
37de8e6253 (mc_search__g_regex_match_full_safe): don't use negative string length.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Mooffie
2e078ff774 mcedit: syntax.syntax: highlight comments preceded by spaces.
Comments don't have to start at the 1st column. We add support for this case.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
079d989877 misc/syntax/Syntax.in: fix patterns.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
1ff4005228 Use g_queue_free_full().
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Mooffie
c0abaa6508 (mc_search__cond_struct_new_regex_ci_str): add documentation.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
d078ae4713 option_auto_syntax: change type to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
cd3a5ee373 src/setup.c: minor refactoring of main options load.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
8b14798cc4 setup: split integer and boolean options.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
c4550374b2 Change type from int to gboolean for variables controlled by checkboxes.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
5e2f4a8069 WCheck: change type of 'state' from int to gboolean.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
76ee3b1644 WCheck: remove unused C_CHANGE.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
d7ecbd51cf (radio_callback): cosmetics.
* [MSG_HOTKEY]: remove extra block.
 * [MSG_KEY]: do not fall through.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Andrew Borodin
aa6055b6aa Ticket #3693: code cleanup before 4.8.19 release.
WRadio: remove unused 'state' field.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
2017-01-22 18:44:22 +03:00
Mooffie
43d7fce730 Merge branch '3750_extfs_rpm_trans_scripts'
* 3750_extfs_rpm_trans_scripts:
  extfs: rpm: fix tests for transaction scripts.
  Ticket #3750: Adding support for RPM transaction scripts.
2017-01-17 12:12:59 +02:00
Mooffie
65299b8310 extfs: rpm: fix tests for transaction scripts.
We update our .output file to include the entries
`INFO/SCRIPTS/{PRE,POST}TRANS[PROG]`, which the rpm helper now emits.

(Tip: here's how we do this: we delete the output file and recreate it by
running the tester thus: "./run --create-output".)

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 17:14:38 +02:00
Jiri Tyr
4310b066e2 Ticket #3750: Adding support for RPM transaction scripts.
Adding support for PRETRANS, PRETRANSPROG, POSTTRANS and
POSTTRANSPROG RPM tags which allow the relevant scripts to be visible
in the INFO/SCRIPTS vfs directory.

Signed-off-by: Jiri Tyr <jiri.tyr@gmail.com>
Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 17:01:31 +02:00
Mooffie
91ca170e1b Merge branch '3751_extfs_rpm_tests'
* 3751_extfs_rpm_tests:
  extfs: rpm: move misc/* to misc/rpm/*.
  extfs: rpm: add test for a custom package.
  extfs: rpm: add tests.
  extfs: rpm: introduce the rpm2tags tool.
  extfs: rpm: make it testable.
  Ticket #3751: extfs: rpm: introduce the $RPM_QUERY_FMT variable.
2017-01-16 15:00:48 +02:00
Mooffie
a3b9b95c2d extfs: rpm: move misc/* to misc/rpm/*.
In the future we will probably place each helper's tests in a separate folder.
We'll then get rid of this 'misc/rpm' folder by moving it there.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
b10f34e898 extfs: rpm: add test for a custom package.
We use a 'spec' contributed by Jiri Tyr.

We keep the previous test (by renaming rpm.* to rpm.glib.*), though, in case
somebody wants to work on data from "the real world".

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
4b8785ead6 extfs: rpm: add tests.
Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
e3cef7576b extfs: rpm: introduce the rpm2tags tool.
This is a preliminary step before being able to write tests for our rpm helper.

We introduce 'rpm2tags', a tool for converting RPM packages to parsable text
files. This will enable us to write tests that can run even where the 'rpm'
program isn't installed.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
97bc2af3b2 extfs: rpm: make it testable.
The way we make this helper testable is a bit different than with other
helpers:

While in other helpers we make it possible to override just one or two
variables, here we make it possible to inject a code snippet into it. This is a
more powerful approach which lets us override even functions, as will be shown
in a following patch.

(As for relocating the "AllTAGS=..." line: all non-declarative code needs to be
moved past our new injection point, or else this code won't be affected by the
injection. BTW, the "$1" on that line isn't used; a vestige from old days.)

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
65ebc83f88 Ticket #3751: extfs: rpm: introduce the $RPM_QUERY_FMT variable.
This minor refactoring will enable us to make this helper testable.

Instead of doing:

    $RPM -qp --qf a b c

we are now doing:

    $RPM_QUERY_FMT a b c

In a future patch we'll then be able to point $RPM_QUERY_FMT to some mock
program.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:58:07 +02:00
Mooffie
3078e74afe Merge branch '3757_two_plus_columns_broken'
* 3757_two_plus_columns_broken:
  Documentation: panels nowadays can display more than 2 columns.
  Ticket #3757: cannot show more than one column in user defined listing mode.
2017-01-16 13:57:44 +02:00
Mooffie
76c2c42bd9 Documentation: panels nowadays can display more than 2 columns.
In the past panels supported up to 2 "columns" only. We update the
documentation.

Note: a naive fix is to change it to say "After the panel size, you may specify
the number of columns to display in the panel". Unfortunately, users may think
by "columns" we mean "fields", so we have to word it differrently.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 13:54:24 +02:00
Mooffie
05661eda1d Ticket #3757: cannot show more than one column in user defined listing mode.
In user-defined listing mode, the format string lets us specify how many
columns to display. E.g., for 3 columns:

    "half 3 type name | size | perm"

However, parse_panel_size() reads this digit only when `panel->list_type ==
list_brief`. We remove this check.

Incidentally, the assignment there to `panel->brief_cols` isn't needed. In
list_brief mode, `panel->brief_cols` is already set.

We also fix a related problem in the mouse handler: it erroneously assumes
`panel->list_cols > 1` happens only in list_brief mode.

(These bugs were introduced in commit fb474bc1c157.)

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-16 00:23:03 +02:00
Mooffie
b229abc1eb Merge branch '3753_extfs_tester_access_configure_parameters'
* 3753_extfs_tester_access_configure_parameters:
  Ticket #3753: extfs: tester: let test scripts easily access configure-time parameters.
2017-01-15 21:15:39 +02:00
Mooffie
69897e94fd Ticket #3753: extfs: tester: let test scripts easily access configure-time parameters.
We introduce a mechanism by which tests can easily access configure-time
parameters (like @PERL@, @AWK@, ...).

It works by "sourcing" a file named config.sh (residing in the build tree):

    . "$MC_TEST_EXTFS_CONFIG_SH"
    $PERL -e 'print "hello"'

(Although config.sh has a shell syntax, Perl and Python programs too can
benefit from it, because it can be sourced into an .env_vars file and the
values exported from there.)

Of course, one can also use the traditional method, of *.in files listed in
configure.ac, but the mechanism introduced here is a more comfortable approach.

Signed-off-by: Mooffie <mooffie@gmail.com>
2017-01-15 20:10:01 +02:00