quick view and user defined view

Dirk Jagdmann doj at cubic.org
Wed Jun 29 12:47:36 UTC 2005


Hello coders,

I have attached my patch to current cvs version of mc in which the 
Quickview panel honours actions defined in the extension file. While 
this patch works for me (and my current needs) I consider it rather ugly 
code and it further complicates the code in ext.c, which should IMO be 
cleaned up or better completely refactored. But I currently don't have 
time and patience to do so.

I solved the problem by defining an additional property "action" for the 
functions in ext.c which will then call the appropriate function 
depending if the result of exec_regex is designated for the fullscreen 
viewer or the quickview. I would rather like that the functions in ext.c 
don't call the viewer functions directly, but rather just prepare the 
file to be viewed (by applying a cmd if defined) and then return the 
constructed cmd shell script. As all functions dealing with quickview 
and fullscreenview already have the capabilty of dealing with a "cmd" 
argument that would be a cleaner solution. However I did not go this 
path, because I don't know of the subtle interactions ext.c does with 
mc's VFS code, that's why I made this ugly hack.

-- 
---> doj / cubic
----> http://cubic.org/~doj
-----> http://llg.cubic.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: quickview.patch
URL: <http://lists.midnight-commander.org/pipermail/mc/attachments/20050629/7155ef9a/attachment.ksh>


More information about the mc mailing list