Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Listing mode" dialog: remove old code #3587

Closed
mc-butler opened this issue Jan 24, 2016 · 7 comments
Closed

"Listing mode" dialog: remove old code #3587

mc-butler opened this issue Jan 24, 2016 · 7 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3587
Reporter mooffie (@mooffie)

This patch removes ancient code in the callback of the "Listing mode" dialog.

Three sections are removed. Let's explain each, from the "easiest" to the "hardest":

  • The if (g_ascii_tolower (parm) == listing_user_hotkey) section served in the past to move the focus to the input box whenever the "User defined" radio is chosen. This feature stopped working with commit 04b4194 (2003-Nov-27; a bug was introduced: two different widgets cannot both have the focus), and commit 80d34ca further eviscerated it (2010-Jun-29; the focus intention was forgotten). This feature doesn't seem worth it (we don't use this UI pattern elsewhere) so it's best not to re-introduce it.

As for the MSG_KEY sections:

  • The two if (widget_is_active (wi)) { h->ret_value = B_USER + n; ... } blocks serve nothing. The git history doesn't go as far back to explain them.
  • The if (widget_is_active (wi)) { ... input_assign_text (in, status_format...) ... } section needs to go for two reasons: (1) There are 4 formats for the mini status (one for each listing mode). This section, together with a section in MSG_FOCUS (which was removed in commit 80d34ca) was the old way of updating the input box to reflect the choice in the radios. But we replaced this mechanism by that of the radio's notification (see the MSG_ACTION case). (2) This section introduces a bug: it overwrites the mini status format the user has typed.

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Jan 24, 2016 at 14:07 UTC

@mc-butler
Copy link
Author

Changed by mooffie (@mooffie) on Jan 24, 2016 at 14:11 UTC (comment 1)

(I updated the patch to also remove the code that finds the hotkey of "&User defined:")

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jan 28, 2016 at 13:40 UTC (comment 2)

  • Milestone changed from Future Releases to 4.8.16
  • Blocked by set to #3547

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Mar 2, 2016 at 20:33 UTC (comment 3)

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

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 4, 2016 at 6:37 UTC

  • Blocked by #3547 deleted

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 4, 2016 at 6:43 UTC (comment 5)

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

Applied as [ca28e59].

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Mar 4, 2016 at 6:43 UTC (comment 6)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: low Minor problem or easily worked around
Development

No branches or pull requests

2 participants