[Thunar-dev] On getting more information to thunar extensions
Adam Plumb
adamplumb at gmail.com
Thu Dec 17 00:57:20 CET 2009
Hi all,
One issue I've noticed in the thunar extension framework is that it doesn't
provide sufficient information when a user changes directories or modifies a
file. Yes there is the "changed" signal in the ThunarxFileInfo interface,
but that only seems to be emitted when thunar itself changes the file. If I
have a text file and I change it in a text editor, thunar doesn't emit the
signal. And even if it did emit the signal, it would only do you any good
if you had manually connected a signal handler to the ThunarxFileInfo
instance.
This is a problem for me, since I work on the RabbitVCS project (a
tortoisesvn clone) and I want to port our project to work on thunar. One of
the key aspects of our software is that when the user loads a working copy
folder, they automatically get emblems showing the current status of their
files. And when a file is modified or changed in some way, that information
needs to get actively sent to my extension.
This is where I need to ask the advice of thunar devs about how best to
handle this. I'd like to create a new provider type for thunarx called
ThunarxMonitorProvider or possibly ThunarxInfoProvider. This provider would
alert an extension that file info should be updated for a file or folder.
For example, when a directory is changed to or a file is changed, the
provider's file_changed function would be called. I've only briefly looked
at what thunar currently does for file monitoring, so I don't know exactly
what is possible, but it looks like we could use the ThunarFileMonitor for
this, and simply create a new provider that hooks up to this.
This is a bit bigger than my previous patches, so I wanted to discuss it a
bit before putting much work into it. What am I not thinking of? What
possible problems would this create?
Thanks,
Adam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20091216/1220d326/attachment.html>
More information about the Thunar-dev
mailing list