Ticket #3593 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Find File -> empty file name should match anything

Reported by: egmont Owned by: andrew_b
Priority: minor Milestone: 4.8.16
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

In the Find File dialog, clear the value from the "File name" field.

What I'd expect to happen: I don't care about the file name, that is, scan everything in the current directory (or recursively).

What actually happens: None of the files are examined, the dialog is closed - an absolutely useless feature.

Attachments

3593-Expand-comment-about-hypothetical-MSG_ACTIVATE.patch (1.2 KB) - added by mooffie 9 years ago.

Change History

comment:1 Changed 9 years ago by zaytsev

I agree, but I think the problem is exacerbated by bad defaults.

If memory serves me well, then the defaults for both "Start at" and "File name" are empty strings. So with a fresh user, the dialog is useless upon the first call. Maybe if this is correct, we could also make the default for "Start at" a dot (.) and star for "File name" (just to be explicit)?

But yes, I think it would make sense to interpret empty "File name" as star, otherwise it doesn't make any sense, does it?

comment:2 Changed 9 years ago by andrew_b

  • Owner set to andrew_b
  • Status changed from new to accepted
  • Branch state changed from no branch to on review
  • Milestone changed from Future Releases to 4.8.16

Branch: 3593_find_file_empty_name
changeset:d2fe0cb3f12c26853f7ed19570239bdb7af54da2

comment:3 Changed 9 years ago by zaytsev

  • Votes for changeset set to zaytsev

comment:4 follow-up: ↓ 5 Changed 9 years ago by zaytsev

andrew_b, what is your opinion on changing the default values on a fresh installation?

comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 9 years ago by andrew_b

Replying to zaytsev:

andrew_b, what is your opinion on changing the default values on a fresh installation?

  1. I think this is the topic for another ticket.
  2. The empty "Start at" is valid and interpreted as "." now and before. This is not documented but should (not here but in another ticket).
  3. The empty "File name" is also valid now and interpreted as "*" or ".*" in depends on "Using shell patterns" checkbox. This is not documented yet. I'm going to do that in 2nd commit in this branch.
  4. Empty value of "Content" is topic of #3594.

comment:6 in reply to: ↑ 5 Changed 9 years ago by andrew_b

Replying to andrew_b:

I'm going to do that in 2nd commit in this branch.

Done: [03a8b8e64bd25179bb8dd63106ba02e07423923e].

@zaytsev: please check it and correct if required.

comment:7 Changed 9 years ago by zaytsev

@andrew_b: done, thanks!

comment:8 Changed 9 years ago by andrew_b

  • Branch state changed from on review to on hold
  • Blocked By 3597 added

State changed to "on hold" until #3597 will be implemented.

comment:9 Changed 9 years ago by andrew_b

  • Votes for changeset zaytsev deleted
  • Branch state changed from on hold to on review

Temporary commit with #3597 feature was added to this branch.
Please test and vote again.

comment:10 Changed 9 years ago by andrew_b

  • Blocked By 3597 removed

comment:11 Changed 9 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from on review to approved

comment:12 Changed 9 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [89bd95c3007ef2ec61ed63c67c3ff2bbb32def6d].

git log --pretty=oneline 47a86b3..89bd95c

comment:13 Changed 9 years ago by andrew_b

  • Status changed from testing to closed

comment:14 follow-up: ↓ 16 Changed 9 years ago by mooffie

  • Status changed from closed to reopened
  • Resolution fixed deleted

@Andrew, could you accept this revised comment (attached shortly) ? It will remind us to fix the other places. It also proposes another name for the message.

comment:15 follow-up: ↓ 17 Changed 9 years ago by mooffie

In case my mention of MSG_IDLE wasn't clear, here's a brief explanation:

In two places we use its first triggering (we call widget_want_idle (w, FALSE) right afterwards to prevent further triggerings, serving the same purpose of your first_draw flag) to do some action. E.g., midnight_callback() uses it to show the user menu (in this specific case MSG_INIT can't be used because we want the system to paint the panels at the background, but since their dialog isn't yet DLG_ACTIVE it won't be painted; I documented this issue in mc2).

comment:16 in reply to: ↑ 14 Changed 9 years ago by andrew_b

  • Status changed from reopened to closed
  • Resolution set to fixed

Replying to mooffie:

@Andrew, could you accept this revised comment (attached shortly) ?

Done: [ebf57a81fbee0b8031b8d336524a6113b4d43369].

comment:17 in reply to: ↑ 15 ; follow-up: ↓ 18 Changed 9 years ago by andrew_b

Replying to mooffie:

In case my mention of MSG_IDLE wasn't clear, here's a brief explanation:

In two places we use its first triggering (we call widget_want_idle (w, FALSE) right afterwards to prevent further triggerings, serving the same purpose of your first_draw flag) to do some action.

First MSG_IDLE raises after first draw. This is OK for panels because we want to see user menu over drawn panels. In case of find files, we want initialize inputs and checkboxes before first draw.

I'm very dislike current focus/unfocus mechanism. It is too complicated and superfluous actions are performed. E. g. some widgets can be drawn twice when the focus is changed. But it topic for another ticket.

comment:18 in reply to: ↑ 17 Changed 9 years ago by mooffie

Replying to andrew_b:

I'm very dislike current focus/unfocus mechanism.

Me too. Another ugly thing about it is that widgets have to keep a flag telling them if they're focused (WButton.selected, WListbox.focused; WRadio uses some silly trick), instead of looking at owner->current. I have an idea to split MSG_FOCUS into MSG_IS_FOCUSABLE and MSG_GOT_FOCUS. As you said, it's a topic for another ticket.

Note: See TracTickets for help on using tickets.