Decide on move/copy action before items have been dropped

When files have been dropped as uri-list, the callback
function xfdesktop_file_icon_manager_drag_data_received()
decides whether they should be copied or moved depending on
their location, ignoring the selected drag action.

The comment preceding the code in charge reads:

/* If the user didn't pick whether to copy or move via
 * a GDK_ACTION_ASK then determine if we should move/copy
 * by checking if the files are on the same filesystem
 * and are writable by the user.
 */

I don't think this is the right place to make this decision,
because even if the user didn't pick the action via GDK_ACTION_ASK,
it could have been chosen using modifier keys and it has already
been indicated by the mouse cursor.

I've attached a patch where the move/copy action is proposed in the
drag-motion stage, e.g. before the items have been dropped, and can
be overridden by modifier keys.

Signed-off-by: Eric Koegel <eric.koegel@gmail.com>

Fixed merge conflicts for 4.10 backport.

Conflicts:
	src/xfdesktop-file-icon-manager.c
	src/xfdesktop-icon-view.c
Fix HTTP URL performance issue / wrong action proposed

- only check "file" URLs for move/copy
- adding an optional output parameter "suggested_action" to the
icon's allowed_drop_actions()

The suggested actions are:

folder:   move if writable else none
volume:   copy if writable else none
file:     copy (run) if executable else none
trash:    move

Signed-off-by: Eric Koegel <eric.koegel@gmail.com>

Resolve conflicts for 4.10 backport.

Conflicts:
	src/xfdesktop-icon-view.c
Unselect the desktop icon after activating it. (Bug #8640)
Fix for trash always showing empty on system startup (Bug 9006)

When the system starts up querying G_FILE_ATTRIBUTE_TRASH_ITEM_COUNT
always returns 0 items. Since xfdesktop does its own counting of
valid items in the trash:/// skipping this check fixes this bug.
Use the Path key of desktop files if a path is not set (Bug #8741)
Always move files from the trash (Bug 3983)
Fix template sub-menu loading code for 4.10 (Bug 10138)

The old code recursively searched the XDG_TEMPLATES_DIR for files
that can be used as templates. This patch changes it so that it
only searches that directory and limits the number of items shown
to the xfconf property max-template-files which is set to 16 to
keep the sub-menu usable. It also only shows files which are not
marked as hidden or backup to eliminate clutter.
Speed up template sub-menu loading code (Bug 7834)

This patch will make it so that xfdesktop won't walk the entire
directory and throw away most of the results when there's more
than max-templates present. Instead it only gathers up until
max-templates then displays those files. This should help when
the XDG_TEMPLATES_DIR has a lot of files in it.

Resolve conflicts for 4.10 backport.

Conflicts:
	src/xfdesktop-file-icon-manager.c
Don't set ESETROOT.

This atom is used to inform other processes that the background
was set by a RetainPermanent client, which should be killed if
the background changes. Since xfdesktop is not RetainPermanent
and should not get killed, don't set this.

Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
Check for thumbnails in the new location

The thumbnail managing standard was updated to change the location
where thumbnails are sometimes stored. This has been changed to
$XDG_CACHE_HOME/thumbnails/ unless $XDG_CACHE_HOME isn't defined,
at which point it's back to $HOME/.cache/thumbnails . This patch
has xfdesktop look in both places when the thumbnail is created
and reports the first one that's found.
Fix missing thumbnail on xfdesktop when thumbler fails to create it. Need check if exist thumbnail file before emit THUMBNAIL_READY. Seems that thumber not returns the full path. So xfdesktop assumes two directories. Checked to see if the file exists in the first folder but not the second!.
Update intltool

See https://bugzilla.xfce.org/show_bug.cgi?id=8930 for details.
Lower update delay of icon size spinbutton (Bug 9882)

This patch makes the process smoother when the value is taken into
account. The delay is used to avoid firing hundreds of events if
you keep the buttons pressed.

Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
Workaround g_thread_create being deprecated

Add version checks to squelch the warning messages.
workaround g_thread_init is deprecated in glib 2.32
Fix possible uninitialized variables
Filter out changed events for special icons (Bug 10755)

Special file icons are the trash, home, and filesystem icons. The
only events that would require a refesh would be an add/delete
event for the trash can. This patch filters out all the change,
attribute change, and changes done hints to prevent the icons
from being reloaded due to those events.
Remember the window size of the settings dialog.

Signed-off-by: Eric Koegel <eric.koegel@gmail.com>
Fix for extra blank lines in backdrop list (Bug #10763)

If xfdesktop-settings contains multiple blank lines it would cause
an infinite loop in the loader code, this patch fixes that.
Updates for release.