Ticket #380 (closed enhancement: fixed)

Opened 7 years ago

Last modified 6 years ago

About colors schemes (skins)

Reported by: slavazanko Owned by: slavazanko
Priority: major Milestone: 4.7.0-pre3
Component: mc-skin Version: master
Keywords: Cc: pahan@…
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description (last modified by andrew_b) (diff)

This just my thinks. We need to make simple work with color schemas in mc.
All following examples (commands out) just for simple understanding, not real :)
For example:

$ ls /usr/share/mc/skins
standart.ini b&w.ini dark.ini

in ~/.mc/ini file:

[Midnight Commander]
...
skin=standart.ini
...

But user may customize color scheme:

[Midnight Commander]
...
skin=~/.mc/skin/my_own_skin.ini
...
  • if basename(skin) == skin, then file will be get from /usr/share/mc/skins directory.

Example of skin-file:

[skin]
     name=Standart skin
[core]
    _default_=lightgray;blue
    normal=;
    selected=black;cyan
    marked=yellow;blue
    ...
[files]
    coredump=yellow;red
    temp=gray;
    archive=brightmagenta;
    source=cyan;
    media=green;
    graph=brightcyan;
    database=brightred;
    ...
[viewer]
    ...
[editor]
    normal=lightgray;blue
    bold=yellow;blue
    marked=black;cyan
    whitespace=brightblue;blue
    ...
  • Parameter '_default_' may be present in any section and MUST be present in [core] section;
  • Value of '_default_' parameter in [core] section MUST contain definition of two colors: foreground and background. In other sections value of this parameter MAY contain definition of two colors;
  • If parameter '_default_' is absent in current section, then this parameter will be taken from [core] section;
  • If some color in color pair don't specified, then this color will be taken from '_default_' parameter in current section;
  • section name '[skin]' must be reserved for internal usage. All other section names will free for use (relative to source code).

Is this good idea?

Change History

comment:1 Changed 7 years ago by slavazanko

  • Blocked By 347 added

comment:2 Changed 7 years ago by Hubbitus

  • Cc pahan@… added

comment:3 Changed 7 years ago by slavazanko

  • Blocked By 347 removed

comment:4 Changed 7 years ago by slavazanko

  • Blocking 1497 added

comment:5 Changed 7 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted
  • severity set to no branch
  • Milestone changed from future releases to 4.7.0-pre3

comment:6 Changed 7 years ago by slavazanko

  • Blocking 1497 removed

comment:7 Changed 7 years ago by slavazanko

  • Version set to master
  • severity changed from no branch to on review

Created branch 380_skins (parent: master)

initial changeset:1b903937a0b0664cb68985983a5561397b2488f8

for full changes view, run:

git diff 1b903937a0b0664cb68985983a5561397b2488f8^..f351b90836c97664817eb9b1738614db4e1607c0

Review, please.

comment:8 Changed 7 years ago by slavazanko

  • Blocking 1622 added

(In #1622) well... PCRE_CFLAGS already in Makefile.am.

Reason of unsucessfull build is a #1608

But in #380 now we have lot of changes (as fact, #380 ready now for review, bay be some little bugs present in this branch:) ). In #380 bug from #1608 now fixed (and bug from this ticket fixed too). But if we will fix this ticket (and ticket:1608) may be some bugs added into #380 after rebasing of branch.

Just wait for merge #380 into master, please :).

comment:9 Changed 7 years ago by slavazanko

  • Blocking 1608 added

comment:10 Changed 7 years ago by slavazanko

Added some new commits into branch.
See

git diff 1b903937a0b0664cb68985983a5561397b2488f8^..61b01f10ef325e716a4b26ae20fe4d0f9dc5880b

for full list of changes.

Review, please.

comment:11 Changed 7 years ago by andrew_b

  • Votes for changeset set to andrew_b

comment:12 Changed 7 years ago by angel_il

  • Votes for changeset changed from andrew_b to andrew_b angel_il
  • severity changed from on review to approved

comment:13 Changed 7 years ago by slavazanko

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b angel_il to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:14 Changed 7 years ago by slavazanko

  • Status changed from testing to closed

comment:15 follow-up: ↓ 17 Changed 7 years ago by andrew_b

  • Status changed from closed to reopened
  • Resolution fixed deleted

Two issues.

  1. In BW mode (mc -b), the selected menu item color is the same as common menu entry color. Thus, selected item is not visually selected.
  1. Locale is KOI8-R. MC is built with S-Lang library. If run mc as 'LC_ALL=C mc' then pseudo-graphics symbols are not displayed correctly. If MC is built with NCurses, everything is fine.

comment:16 Changed 7 years ago by andrew_b

  • Priority changed from minor to major
  • Type changed from task to defect
  • Votes for changeset commited-master deleted
  • Component changed from mc-core to mc-skin
  • severity changed from merged to no branch

comment:17 in reply to: ↑ 15 Changed 7 years ago by andrew_b

Created 380_bw_colors_and_frames branch. Parent branch: master.

Replying to andrew_b:

  1. In BW mode (mc -b), the selected menu item color is the same as common menu entry color. Thus, selected item is not visually selected.

This issue is fixed, I hope. :-)
changeset:c54b26f0d8615dd3ab4463f1abb7c262e6ad97a6
changeset:fb96de25688abe00e608a6addce7fcf7c6baa1bc
changeset:24bd9b9da1b5c7ee3686e9e5e740e2e62a0f52ec
changeset:1d5ab3bdccec5d3edf446d7e3dfd656bc148efb8

comment:18 follow-up: ↓ 25 Changed 7 years ago by slavazanko

  1. In BW mode (mc -b), the selected menu item color is the same as common menu entry color. Thus, selected item is not visually selected.

As fact, already fixed into branch.

  1. Locale is KOI8-R. MC is built with S-Lang library. If run mc as 'LC_ALL=C mc' then pseudo-graphics symbols are not displayed correctly. If MC is built with NCurses, everything is fine.

Well... I don't know how handle this situation... May be, like with NCurses (in src/tty/tty-ncurses.c:74 ). Or in other way, need to get 'lines' characters from utf-8 codepage into... 'LATIN1'? 'CP437'?

May be, we need to split this bugreport into two parts: colors(380) and lines(new ticket)?

comment:19 Changed 7 years ago by slavazanko

  • Status changed from reopened to accepted

comment:20 Changed 7 years ago by slavazanko

  • severity changed from no branch to on review

Well, I'll create new ticket with bug of drawing lines.

For fixing color created branch 380_bw_colors_and_frames

review, please.

comment:21 Changed 7 years ago by andrew_b

  • Votes for changeset set to andrew_b

comment:22 Changed 7 years ago by angel_il

  • Votes for changeset changed from andrew_b to andrew_b angel_il
  • severity changed from on review to approved

comment:23 Changed 7 years ago by slavazanko

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b angel_il to commited-master
  • Resolution set to fixed
  • Blocking 1608, 1622 removed
  • severity changed from approved to merged

comment:24 Changed 7 years ago by slavazanko

  • Status changed from testing to closed

comment:25 in reply to: ↑ 18 Changed 7 years ago by andrew_b

Replying to slavazanko:

  1. Locale is KOI8-R. MC is built with S-Lang library. If run mc as 'LC_ALL=C mc' then pseudo-graphics symbols are not displayed correctly. If MC is built with NCurses, everything is fine.

Well... I don't know how handle this situation... May be, like with NCurses (in src/tty/tty-ncurses.c:74 ). Or in other way, need to get 'lines' characters from utf-8 codepage into... 'LATIN1'? 'CP437'?

May be, we need to split this bugreport into two parts: colors(380) and lines(new ticket)?

#1635

comment:26 Changed 7 years ago by andrew_b

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Type changed from defect to enhancement
  • severity changed from merged to no branch

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:

  1. Show error message "Cannot find skin"
  2. Load the default.ini skin instead of set -a -c mode.

comment:27 Changed 7 years ago by slavazanko

  • Status changed from reopened to accepted
  • Votes for changeset commited-master deleted

comment:28 Changed 7 years ago by slavazanko

  • severity changed from no branch to on review

created branch 380_default_skin (parent: master)

initial changeset:e26511746ccb1e3519f928ed0ddc82a749ecd331

Review, please.

comment:29 Changed 7 years ago by angel_il

  • Votes for changeset set to angel_il

comment:30 Changed 7 years ago by slavazanko

comment:31 Changed 7 years ago by andrew_b

  • Votes for changeset changed from angel_il to angel_il andrew_b
  • Description modified (diff)
  • severity changed from on review to approved

comment:32 Changed 7 years ago by slavazanko

  • Status changed from accepted to testing
  • Resolution set to fixed
  • severity changed from approved to merged

comment:33 Changed 7 years ago by slavazanko

  • Status changed from testing to closed
  • Votes for changeset changed from angel_il andrew_b to commited-master
Note: See TracTickets for help on using tickets.