Ticket #1939 (closed defect: fixed)

Opened 15 years ago

Last modified 14 years ago

If panels.ini exists, it will be used by not saved. If not, a 1 byte file is created

Reported by: toothandnail Owned by: andrew_b
Priority: major Milestone: 4.7
Component: mc-core Version: 4.7.4
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

If panels.ini exists, data in it will be used (paths), but changes are not saved. If there is no panels.ini, a 1 byte file will be produced, but no changes are saved to it.

Under these circumstances, when MC is started, both panes will display the startup directory.

panels.ini can be created and copied to ~/.mc, MC will then read the path data from it, but will not modify it or save it.

Change History

comment:1 Changed 15 years ago by andrew_b

http://www.midnight-commander.org/ticket/1663#comment:9

I think, auto_save_setup_panels should be ON by default.

comment:2 Changed 14 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted

comment:3 follow-up: ↓ 5 Changed 14 years ago by slavazanko

  • Status changed from accepted to testing
  • Resolution set to invalid

I think, auto_save_setup_panels should be ON by default.

It's already ON by default (relative to default of 'auto_save_setup' option).

For enable autosave panels status, follow by next steps:

  • F9 -> Options -> Panel options...
  • [x] Auto save panels setup
  • [ Save ]

comment:4 Changed 14 years ago by slavazanko

  • Status changed from testing to closed

comment:5 in reply to: ↑ 3 Changed 14 years ago by andrew_b

Replying to slavazanko:

I think, auto_save_setup_panels should be ON by default.

It's already ON by default (relative to default of 'auto_save_setup' option).

No. See setup.c:106.

comment:6 Changed 14 years ago by slavazanko

No. See setup.c:106.

Nope :). See src/setup.c:1241

near this line default values will loaded with regards to panels_ini_options[i].opt_old_name

Next, see src/setup.c:290

For 'auto_save_setup_panels' old name is 'auto_save_setup'.
And 'auto_save_setup' always 'True' by default. Therefore, 'auto_save_setup_panels' always on by default too.

Also, ticketstarter may ran mc as 'sudo mc' and as result he has wrong rights for ~/.mc/panels.ini file... but this just in mind. :)

comment:7 Changed 14 years ago by yury_t

  • Status changed from closed to reopened
  • Resolution invalid deleted

Similar error happens in 4.7.3 and in 4.7.4, too.

If there is no panels.ini before configuration save, 1 byte file is created.

If there is correctly initialised panels.ini (say, copied from other installation and edited by hand), it is partially ignored on start -- e.g., user mini status settings for panels are not read/used. Also, user listing mode and user mini status are not saved to panels.ini.

comment:8 Changed 14 years ago by yury_t

  • Version changed from 4.7.0.1 to 4.7.4

comment:9 Changed 14 years ago by andrew_b

Switch on "Auto save panels setup" before save configuration.

comment:10 Changed 14 years ago by yury_t

Indeed. Guys, this is weird logic. I've seen the mention of this option earlier in this discussion, and I hadn't even *guessed* it applies to my issue.

I'm quite positive, that either the string "Auto save panels setup" should be changed to something "Save panels setup also", or the dependence on this option should be removed. When I save the setup, I expect the complete setup to be saved (e.g., including the editor settings).

comment:11 Changed 14 years ago by yury_t

And why isn't the hand-edited panels.ini READ when this option isn't set??

comment:12 Changed 14 years ago by andrew_b

  • Owner changed from slavazanko to andrew_b
  • Status changed from reopened to accepted
  • Blocked By 2409 added

In #2409 (2409_prepare_to_4.7.5 branch), the massive reorganizing of sources is being performed. To avoid conflicts, this bug will be fixed after merge of 2409_prepare_to_4.7.5 branch into master one.

comment:13 Changed 14 years ago by andrew_b

  • Blocked By 2409 removed

comment:14 Changed 14 years ago by andrew_b

  • severity changed from no branch to on review

Created 1939_save_panels_ini branch. Parent branch is master.
changeset:4e1f2b468a8269af2891cc8bb74d9317f9f42823

comment:15 Changed 14 years ago by angel_il

  • Votes for changeset set to angel_il

comment:16 Changed 14 years ago by slavazanko

  • Votes for changeset changed from angel_il to angel_il slavazanko

comment:17 Changed 14 years ago by slavazanko

  • severity changed from on review to approved

comment:18 Changed 14 years ago by andrew_b

  • Keywords panels.ini path removed
  • Status changed from accepted to testing
  • Votes for changeset changed from angel_il slavazanko to committed-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:19 Changed 14 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.