! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Icon placement option for xfdesktop
Status:
RESOLVED: DUPLICATE
Product:
Xfdesktop
Component:
General

Comments

Description Jean-Pierre Demailly 2018-12-09 07:43:03 CET
Created attachment 8167 
Small patch for icon placement option in xfdesktop

Many thanks for Xfce. I have been using it for many years (I do  not even remember, 12-15 years ?) You'll find attached a small patch  that gives some additional flexibility when handling icons with  
xfdesktop.

Actually - very long ago - my wife had a Mac and was used having new  files / new directories / new devices being shown on the right edge of  the screen, as she likes having a dock on the left side. This may  "conflict" with icons appearing very close to the dock, on the top  left corner of the screen. Unless I am mistaken, with the current  xfdesktop-4.13.2 version, icons appear from top to bottom and from  left to right (in this order of precedence), and there is no way to  change the default behaviour - of course, one can always drag icons  with the mouse to assign their position elsewhere on the desktop, but I believe this should part of the configuration options. The enclosed  very small patch allows this : it adds a new "gravity" parameter to be  managed by xfconf, namely an int in the range 0..7 that changes the  default behaviour of icon placement. The gravity parameter corresponds  to three boolean flags, with the followind predefined values
#define GRAVITY_HORIZONTAL 1
#define GRAVITY_TO_LEFT    2
#define GRAVITY_UPWARDS    4
(thus, one gets 8 different modes in total). At least, one can use  xfce4-settings-editor to adjust the options (but you might want to let  the options appear as well in the GUI, 
xfce4-settings-manager >  Desktop > Icons )

The patch is for xfdesktop-4.13.2, I guess it would essentially work  also with the older xfdesktop-4.12.4.

Best,
Jean-Pierre Demailly

PS. The patch also adds one line  in the popups that appear when hovering over icons. In that way, one can read the complete name of files even when those names are very long, without having to use the file browser.
Comment 1 Andre Miranda editbugs 2018-12-15 04:19:17 CET
Hi Jean-Pierre,
Your patch seems very interesting, thanks for the contribution.

Unfortunately I wasn't able to see it working properly, if I change "/desktop-icons/file-icons/gravity" it won't automatically resort the icons, no problem, but Arrange Desktop Icons will move icons (I only have Trash, a folder and a file) out of the screen (single monitor here).

I understand that you want to make icons positioning as flexible as possible, but perhaps a simpler "reverse" option would satisfy your needs and the code would be easier to maintain and less error-prone. What do you think?
Comment 2 Andre Miranda editbugs 2018-12-19 04:25:10 CET
Closing in favor of Bug 14979, next time feel free to attach the updated patch instead of filing a new bug.

*** This bug has been marked as a duplicate of bug 14979 ***

Bug #14957

Reported by:
Jean-Pierre Demailly
Reported on: 2018-12-09
Last modified on: 2018-12-19

People

Assignee:
Eric Koegel
CC List:
1 user

Version

Version:
4.13.2

Attachments

Additional information