ah, desktop icons
Brian J. Tarricone
bjt23 at cornell.edu
Fri Feb 10 23:33:00 CET 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Benedikt Meurer wrote:
> Brian J. Tarricone wrote:
>> Hey all,
>
> Hey Brain,
>
>> I just did a bunch of work on the desktop icon support (it's nice when
>> I'm in meetings but don't really need to pay full attention). Anyway,
>> if you want to give it a try, update to latest xfdesktop SVN, and select
>> it in the combo box in the desktop settings dialog. Note that you have
>> to have thunar installed at compile-time for this to work.
>>
>> Things I know don't work but plan on fixing:
>>
>> * Files don't remember where they're placed on the desktop between sessions.
>> * No 'open with other application' dialog yet (might not implement this).
>
> I don't think it's necessary to duplicate this in xfdesktop. You can
> just invoke Thunar here and it'll popup the chooser dialog.
Ah, well that's much nicer ^_^.
>> * Copy/Cut on a file doesn't work (might not implement this).
>
> This is easy. You can just copy the ThunarClipboardManager class and
> remove all the paste related stuff. Afterwards, it will not depend on
> any Thunar internals.
Yeah, after I wrote the email I realised that all 'copy' does is stick a
file: URI in the clipboard slection, and cut just does the same thing,
except unlink the file on a successful 'paste' elsewhere. But yeah,
I'll just do as you say and copy ThunarClipboardManager. No need to
duplicate effort.
>> * File properties dialog doesn't exist yet (might not implement this).
>
> Should be sufficient to popup the file chooser dialog of the file
> manager -> org.xfce.FileManager.DisplayFileProperties().
Yeah, after all that talk about the DBUS service, I totally forgot ^_^.
>> Anyway, just letting people know if they want to play with it. If there
>> are things that are actually buggy, please let me know. If you just
>> want to complain that something doesn't work yet or isn't implemented, I
>> don't really care ^_^.
>
> I'm going to complain anyway... desktop icons are for wimps! But I'm
> really glad that you take care of implementing them. ;-)
Yeah, I know. I probably won't use them myself (I've gotten pretty used
to no taskbar with the CDEish icons, personally), but I thought it would
be fun to implement.
> One of the things I noticed about your implementation is that you use
> ThunarVfsPath's and determine the ThunarVfsInfo on-demand. As said on
> thunar-dev, this can cause trouble if the info takes long to load (i.e.
> it's a symlink to a slow device or a network share, etc.). Therefore,
> unless you receive a change notification, the info should also be
> determined asynchronously using thunar_vfs_listdir(). The attached patch
> changes XfdesktopFileIcon to use ThunarVfsInfo directly instead of
> ThunarVfsPath. There was also a bug in there which caused xfdesktop to
> crash when the file name contains non-UTF-8 chars, because you used the
> path name directly, instead of using ThunarVfsInfo->display_name, which
> is garantied to be UTF-8 (while the path name is always in the local
> file system encoding).
Understood. I thought about the non-UTF-8 issue after I noticed that
point in the API docs, but I forgot to go and fix what I'd already done.
Patch looks fine; I'll apply it when I'm a little more awake and can
actually read ^_^.
> I also changed the "Open" action for folders to try
> org.xfce.FileManager.Launch() first, prior to falling back to hardcoded
> Thunar invocation. This way, things will also work with other file managers.
*nods*
> And for thunar_vfs_info_execute() you passed the path of the executable
> as parameter (-> path_list), which was probably not what you wanted
> (yeah, I know I should write better documentation), since this will
> actually expand to exec("<executable> <executable>"). The path_list
> parameter for _execute() gives the paths that should be passed as
> parameters to the command.
Yeah, that was just not so bright. Don't knock your documentation - I
found using thunar-vfs to be *incredibly* easy due in part to the API
docs. Though it seems that all the stuff in thunar-vfs.h (aside from
_init() and _shutdown()) aren't documented for some reason. That
confused me for quite a while when I couldn't figure out how to do
something as simple as read all the files in a directory.
> See the attached patch. You may want to reformat it, though I tried to
> keep your coding style.
It's close enough ^_^. Thanks for taking the time to go over it and
fixing my mistakes.
> Other than that, I was really impressed. The context menu looks pretty
> close to Thunar's context menu, and one feels right at home. ;-)
Yup, that was the plan. I sat there with Thunar open, and stared at the
menu and the rename/delete dialogs for a while ^_~.
> You could also implement ThunarxFileInfo in XfdesktopFileIcon, and
> you'll be able to use thunar extensions in xfdesktop.
Cool idea. Maybe post-4.4 though ^_^.
> BTW: Do you plan to make the icon size an option?
I hadn't originally, but I really think it needs it. An 8x6 grid on
1024x768 (damn laptop) probably isn't enough for someone who heavily
uses their desktop for storage. I'm probably being a bit over-generous
with spacing and padding, too. Anyway, shouldn't be too hard to make it
configurable.
If I don't get to your patch in a couple days, feel free to bug me.
I'll be back from France on Sunday night, but then I'm leaving for
Taiwan on Monday morning, so I'm busy and forgetful at the same time...
-brian
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD7RSc6XyW6VEeAnsRApf8AJ9/ClEMzrSx4zZa8Pd7VzZxBXLu5gCg2Kc/
U+7L57HoDk0VxGL981/XKe4=
=0DDQ
-----END PGP SIGNATURE-----
More information about the Xfce4-dev
mailing list