mc: Could you add a "Skip all" if the source file can't be read?

Miven Dooligan dooligan at intergate.ca
Wed Nov 13 00:49:11 UTC 2002


Howdy.

Pavel wrote:

  >>It's already in TODO for version 4.6.1:
  >>
  >>Add "Ignore" and "Ignore all" buttons when reporting permission 
problems.
  >>
  >
Some thoughts on this one, because I've trying to figure out the
best way to do exactly this thing for a little while (Thanks Adrian
for bringing it up again.) Spare time programming, eh?

It is no problem changing the real_do_file_error() to show "Ignore All"
as an option but there is the legitimate issue that it shouldn't say
that if you're only operating on one file.  How do we communicate that
to file_error?

My solution was to ignore the above problem, and just do something that
works. I changed real_do_file_error() to show
"[Ignore] [Ignore All] [Retry] [Abort]"
every time, just to get the utility in there.

Next I added a global var to fileopcx.h "file_op_ignore_errors" that
gets set to 0 at the beginning of any panel_operate() call, and gets set
to 1 inside real_do_file_error if you press [Ignore All].  do_file_error
(both of them) then checks file_op_ignore_errors and skips the dialog
(returning FILE_SKIP) if it is 1.

I'm no guru, but its a quick&dirty solution that seems to work.
Attached is the patch, for those interested. If anyone wants to beat on
it, I'm sure it needs some refining.





-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: IgnoreAllErrors-file.c.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20021112/51283b4b/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: IgnoreAllErrors-fileopctx.h.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20021112/51283b4b/attachment-0001.ksh>


More information about the mc-devel mailing list