xfdesktop: Port to GIO (Progress)
References to ThunarVFS
thunar_vfs_shutdown(). Those calls can be removed.
There's no need for cancelling jobs if we don't use jobs anymore. Instead we'll use the new D-Bus methods that have been added to Thunar. When using those we can just fire and forget.
We don't need the file info here. Just launch the file using Thunar's
method. Add an interface method
get_file and make it return a
GFile. Use this
GFile to compute the URI to be passed to
Make the interface method
peek_info return a
Remove this function.
GVolume instead of
Replace this function with a similar one based on
The calls to
need to be replaced with something similar based on
GVolume. Thunar has the
same problem solved with this code:
This will be replaced with a handler for the
volume-added signal of
GVolumeMonitor which should call
xfdesktop_file_icon_manager_add_removable_volume() as well.
Similar to the previous function, this one should be replaced with one
that handles a single
GVolume volume only.
GVolumeMonitor here and connect to the right signals.
We'll need new callbacks for some of them.
Needs to iterate over the volumes hash table, disconnect from all
returned volumes, destroy all volume icons and disconnect from the
Get rid of the global
The counterpart to the previous function. Same deal.
…_peek_info() (we need both this time around) and
GFile functions instead of
ThunarVfsPath. To convert the string list into a list
GFile objects, we can use something similar to Thunar's solution:
We'll need a bit of custom code to execute the executable target file with the dropped
files as parameters. There are two possibilities: either the target is a desktop entry,
then we can parse it into a
GDesktopAppInfo, or it is a regular executable file,
then we can simply spawn it (make sure to pass the file parameters and implement startup
The code block dealing with jobs needs to be reworked around
and the Thunar D-Bus API completely. Maybe danielm's branch implements this already?
ThunarVfsMonitor with a
GVolumeMonitor and remove
Remove entirely. We'll re-use Thunar's properties dialog via its D-Bus API.
Remove. We'll no longer implement anything job-related in xfdesktop itself.
Remove as well.
If this is still needed after refactoring, then make it take a
and rewrite the checks based on
No longer needed, remove.
g_file_info_get_icon() always returns a valid
We have two options here: either remove and use
g_file_info_get_icon() or make it
load and return a
GdkPixbuf from the
TODO We'll have to investigate where
being used and how.
Remove. We don't use a D-Bus fallback here as we rely on the D-Bus API of Thunar so hard that we can't provide any real functionality without it anyway.
ThunarVfsInfo *info member with
Need to rewrite this to make use of
g_file_get_icon() and tumbler. Maybe a new thumbnailer
or icon factory class like in thunar could be introduced.
I don't think we need this any longer. Thunar will display errors for us.
Rewrite the code based on
GFile. Use the Thunar D-Bus API
to launch executable files. Use a NULL check with
replace the call to
thunar_vfs_path_is_root(). Instead of
thunar_vfs_copy_file() etc. use the Thunar D-Bus API.
Instead of implement the Thunar D-Bus client manually we could rely on code generation.
What we need is to read the last modification time, the file type and a human readable
version of the size of the file. There are attributes for the modification time, the
file type and the file size in
GFileInfo. To humanize the file time we can use
something similar to what Thunar is doing,
for the file size we can use
Here we can simply rewrite the code to use
Change the return type to
TODO: we no longer need the thunar-vfs workaround I think.