User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20070207 BonEcho/2.0.0.1 Build Identifier: An entry in the desktop menu for sorting the icons on the desktop. (some options would be neat too: order by date, filetype, size, filename,..) Reproducible: Always
Second this, looks like it would be in xfdesktop-file-icon-manager.c. I wrote a perl script that accomplishes this (though it assumes the user wants to hide .files and files~, backup files for various programs, and also that they want folders before files). Perhaps it would be better to just add a second that looks for a menu in the users .config directory, that way the average user could edit these menus more easily (also apologies if I'm resurrecting a dead and gone bug, but it's still something I'd like to see). Can be found here: http://www.columbia.edu/~jhb2147/my_alphabetize.pl
Created attachment 3907 Alphabetizes desktop icons in xfce, folders before files and does not show backup files. Attaching script to alphabetize desktop icons. I realize this is probably not how we would want to get the alphabetization done.
Created attachment 4101 Adds a root menu option to arrange icons This patch adds a menu option to arrange the desktop icons. First, it sorts and adds all the special icons such as the trash, home folder, and any volumes. Next, it sorts and adds all the regular file icons.
It is better to write the sort function like this: +static gint +xfdesktop_icon_view_compare_icons(gconstpointer *a, + gconstpointer *b) +{ + const gchar *a_str, *b_str; + + a_str = xfdesktop_icon_peek_label(XFDESKTOP_ICON(a)); + b_str = xfdesktop_icon_peek_label(XFDESKTOP_ICON(b)); + + if(a_str == NULL) + a_str = ""; + if(b_str == NULL) + b_str = ""; + + return g_utf8_collate(a_str, b_str); +} I'm not familiar with the other xfdesktop functions used here, but it looks ok-ish.
Created attachment 4109 [PATCH] Adds a root menu option to arrange icons. That's a lot better than what I had, thanks! I've also added a list to hold folder icons so the order would be special icons/volumes, then folders, then files. I also added a helper function to remove some code duplication.
Created attachment 4184 [PATCH] Arrange icons on the desktop - Added an --arrange command line option so it can be invoked via a keybinding. This only appears if file icons were enabled when it was compiled. - Added some checks to ensure it works if file icons were disabled at compile time. - Moved the arrange desktop icons menu item above the desktop settings entry and only have it show up when the settings entry does as well (it didn't make much sense to arrange icons when pulling up an item's property).
Looks ok now.
Added to eric/bugzilla branch for testing, http://git.xfce.org/xfce/xfdesktop/commit/?h=eric/bugzilla-patches&id=ddc632474a7b4522fd84c5bbb599bf53103dbc07
Committed to Master: http://git.xfce.org/xfce/xfdesktop/commit/?id=ddc632474a7b4522fd84c5bbb599bf53103dbc07