application for cmd_showInFinder command

Posted by Jonnywalker on 2009-11-24 04:23

Hello.
Anybody knows how can I setup which filemanager komodo should use for command "cmd_showInFinder" (right click on file in project tree -> Show in file manager)?

Komodo edit 5, linux.

Thank you.

toddw
ActiveState Staff
Tue, 2009-11-24 12:30

Komodo uses Mozilla "nsIFile.reveal" method for opening the file/directory location, see
https://developer.mozilla.org/En/NsILocalFile#Remarks

The same should apply to Firefox as to Komodo.

I'm not sure how to change that to use a different file manager - there are some methods that claim to work, but I've not been able to get any to work, such as:
http://rubylution.ping.de/articles/2007/09/11/open-containing-folder-in-...

Cheers,
Todd

Jonnywalker | Thu, 2009-11-26 01:50

Thank you Todd.

Maybe I've made something wrong but adding directives in about:config page:

network.protocol-handler.expose.file = true
network.protocol-handler.external.file = true
network.protocol-handler.app.file = konqueror

gives no effect in komodo and in iceweasel (debian firefox) too.
Generally I want to make my pcmanfm not to be started with key "-f" which opens find dialog instead of main window.
But to check settings I try first to change used filemanager to konqueror

No result for now.

toddw
ActiveState Staff
Thu, 2009-11-26 12:02

You can also change the underlying Komodo code (if your familiar with Python) to do what you want, you'll need to find the "koSysUtils.py" file under your Komodo installation and change the "ShowFileInFileManager" method, see:
http://grok.openkomodo.com/source/xref/openkomodo/trunk/src/components/k...

Cheers,
Todd

Jonnywalker | Tue, 2009-12-01 04:06

Thank you Todd!

It's a dirty hack but works for me :) I've cropped this function to following

def ShowFileInFileManager:
    os.system('pcmanfm "%s" &' % os.path.dirname(filename))
    return