Ticket #3587 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

"Listing mode" dialog: remove old code

Reported by: mooffie Owned by: zaytsev
Priority: trivial Milestone: 4.8.16
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

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 04b4194371 (2003-Nov-27; a bug was introduced: two different widgets cannot both have the focus), and commit 80d34ca625 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 80d34ca625) 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.

Attachments

3587-listing-mode-dialog-remove-old-code.patch (3.6 KB) - added by mooffie 9 years ago.

Change History

Changed 9 years ago by mooffie

comment:1 Changed 9 years ago by mooffie

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

comment:2 Changed 9 years ago by andrew_b

  • Blocked By 3547 added
  • Milestone changed from Future Releases to 4.8.16

comment:3 Changed 9 years ago by zaytsev

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

comment:4 Changed 9 years ago by andrew_b

  • Blocked By 3547 removed

comment:5 Changed 9 years ago by andrew_b

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

comment:6 Changed 9 years ago by andrew_b

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