Xfdesktop feature request - Embryo of proposed patch
Brian J. Tarricone
bjt23 at cornell.edu
Thu Jul 27 23:36:55 CEST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Please keep discussion on the Xfce devel list. Others may be interested
and may want to provide feedback as well.
On 7/27/2006 2:14 PM, Gregoire Gentil wrote:
> Let me introduce myself to you. I'm Gregoire Gentil. I'm leading an open
> source project mixing both hardware and software. We have a very light
> customized Linux distribution and we are using Xfce. Great desktop
Can you give us more information about your project, like a URL, or
maybe just a quick summary? I'm curious and interested to know what
exactly it is you're doing.
> I'm French and though I'm located in the US, I have already met Olivier
> in Toulouse. So, I'm heavily patching xfce to customize my needs and I
> have a few questions for you on xfdesktop:
> -1. Upon a right click on the desktop itself - not on an icon, I would
> like to replace the start menu by the submenu called desktop that you
> can get by right-clicking on an icon - I'm talking about the menu with
> "Create Launcher... / Create URL Link... / Create Folder... / Create
> from Template". Where should I patch xfdesktop?
This is maybe a bit difficult. The simplest way would be to look at the
button press handler in xfdesktop-icon-view.c and catch presses on
non-icon areas and pop up your menu there. You'd need to make sure to
return TRUE from that handler so the default handler (which pops up the
current desktop menu) doesn't run.
This is quick-and-dirty: you'd more or less break the separation between
XfdesktopIconView and XfdesktopFileIconManager. I guess you could catch
all button presses in XfdesktopFileIconManager by connecting to the
XfdesktopIconView's button-press-event signal, however, there's really
no way to know at that point whether an icon was clicked on or not.
I guess you could add a signal to XfdesktopIconView that's basically
"click on icon view but not on icon", and then connect to that signal in
However, you'd stlil have a lot of code sitting around doing things you
don't need. The current desktop menu would still be loaded (and
regenerated as needed), wasting CPU time, file I/O, and RAM. Assuming
you don't want the desktop menu at all, you'd want to remove menu.c and
menu.h, and remove the references to functions there from the other
files. This is in addition to what I've mentioned above.
> -2. In this desktop menu, I would like to add some items below the
> "Desktop Settings..." and the "Desktop Properties...". Where should I
> patch xfdesktop?
Well, a simple grep through the sources would give you the answer to
> -3. Once again, xfce and xfdesktop are great products but the drag and
> drop on the desktop totally sucks!!!
Usually telling someone their software "sucks" isn't the best way to get
help. Just FYI for future reference.
> Sorry, I don't like it. Where
> should I patch xfdesktop to improve it and especially to remove this
> thin blue rectangle where the icon will be dropped?
It's all in xfdesktop-icon-view.c. The intention here was to support
just basic functionality. Arbitrary placement of icons, rubberbanding,
etc. will likely be implemented in thunar's desktop view if Benny
decides that's what he wants to do.
> -4. Can we avoid the delete item in the menu for a desktop shortcut?
> Even if the shortcut is read-only, you can delete it.
This is probably the one thing in your list that makes sense for
xfdesktop's mainline. If you don't mind, please file a bug report on
>> -----Original Message-----
>> From: Brian J. Tarricone [mailto:bjt23 at cornell.edu]
>> Sent: Thursday, July 27, 2006 4:12 PM
>> To: gregoire at gentil.com; XFCE4 development list
>> Subject: Re: Xfdesktop feature request - Embryo of proposed patch
> On 7/27/2006 11:02 AM, Gregoire Gentil wrote:
>>>> To the main xfdesktop developer,
>>>> I would like to suggest a feature request for xfdestkop: it would be
>>>> nice and useful to add the option to put a "File System", "Home" and
>>>> "Trash" [*] icons on the desktop when the "File/launcher
> icons" mode is
>>>> used. As removable device icons already appear on the
> desktop, it makes
>>>> sense to put those other icons. It would be the same
> behavior as the Mac
>>>> OS X desktop.
>>>> I have an embryo of proposed patch. I don't think that it's
> very complex
>>>> - the work has already be done for the removable device, so
> it's more
>>>> code duplication. It just needs to be nicely integrated
> into the main
>>>> I would be ready to help finishing this enhancement if I get some
>>>> directions and support from the xfdesktop leader,
> Yes, this is something I'm planning on adding shortly. The difficulty
> isn't in showing the icons on the desktop; that's trivial (as you've
> seen). The harder part is adding a pref for it.
> Actually, since pointing to home, file system, trash, etc.
> just involves
> opening a file manager instance, really all it needs is a .deskop file
> in ~/Desktop/, pointing to '/', $HOME, trash:///, etc.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v184.108.40.206 (MingW32)
-----END PGP SIGNATURE-----
More information about the Xfce4-dev