Commit Graph

21 Commits

Author SHA1 Message Date
Jim Broadus 708385c71f devices: Fix guessed icons in DeviceIcons
In the initial implementation, DeviceLister::DeviceIcons returned a
string list and some listers would concatenate other lists to form that
list. When DeviceIcons was changed to return a variant list, that
logic wasn't changed in many places, so instead of appending, string
list variants are being added icon list.
2021-05-01 20:37:01 +01:00
Jim Broadus cca48b1ebf giolister: Ignore mountpoints
Read the G_FILE_ATTRIBUTE_UNIX_IS_MOUNTPOINT attribute (unix::is-mountpoint) to
determine if a volume is a mount that udisks2 has detected. Ignoring these
prevents network mounts from showing up as devices.
2020-12-05 13:24:54 +00:00
Jim Broadus abc70554f3 giolister: Append _ to some DeviceInfo class members
Rename drive, mount, and volume to drive_, mount_, and volume_ to
avoid confusion with method arguments.
2020-12-04 22:07:01 +00:00
John Maguire 341dc7326f Reformat all C++ 2020-09-22 14:56:06 +01:00
Jim Broadus 4bb7d41ec9 Fix mtp and gphoto2 device mounts from gvfs.
Using libmtp or libgphoto2 to access a device that gvfs has mounted causes the
connection to fail. libmtp is calling libusb_claim_interface which, according to
libusb documentation, will return LIBUSB_ERROR_BUSY if claimed by a different
program. For mtp and gphoto2 devices discovered by the GioLister, use the file
scheme and access the device through the gvfs mount.
2020-01-16 13:11:49 -08:00
Jim Broadus 5efba58f02 Decode gvfs uris.
The uri returned from g_file_get_uri is percent encoded. This causes the regex
in GioLister::MakeDeviceUrls to fail and causes the URL to be invalid. In this
case, it falls back to the file scheme. Newer versions of gvfs obtain the serial
id from udev instead of using the bus and device IDs.

Note that this bug covers a different issue where mtp is failing to connect. The
result is actually desired behavior. The follow-up change will address this.
2020-01-16 13:11:44 -08:00
Valeriy 948140fab5 disconnect GVolumeMonitor signals from GioLister before destroying it
fixes #5369
2016-05-11 17:58:12 +03:00
John Maguire bebd781fdf Reformat all non-3rd-party C/C++/Objective-C++.
Command line:
find src ext -regex '.*\.\(h\|cpp\|mm\)' -exec clang-format -i
 -style='{BasedOnStyle: Google, DerivePointerBinding: false}' {} \;
2014-02-07 16:34:20 +01:00
David Sansome ed1a25693c Add missing licenses to debian/copyright, and add copyright information to each source file 2010-11-20 13:27:10 +00:00
David Sansome c65a687678 Remove GIO devices from the list that are unmounted outside clementine 2010-09-12 19:20:06 +00:00
David Sansome c2ac3f8f32 Don't mount GIO devices automatically, instead put them in a "not mounted" state in the GUI and mount them when double-clicked on. Fixes issue #719. Probably fixes issue #723. 2010-09-11 12:29:44 +00:00
David Sansome bb4bb28c04 Automatically mount GIO volumes that get plugged in. Nautilus already does this for us in Gnome, this makes it work as expected in KDE too. 2010-09-04 12:34:01 +00:00
David Sansome a04309bc7d Fix compile problem with glib >= 2.25. Fixes issue #662 2010-08-27 16:43:11 +00:00
David Sansome 78db71c02c Semi-working WMDM device lister 2010-08-15 23:26:04 +00:00
David Sansome 2e646494aa Update a device's free space after copying or removing files from it 2010-08-11 18:47:53 +00:00
David Sansome 3c6f48bd4c Ignore mounted samba shares and CDs from the GIO lister 2010-08-01 12:00:50 +00:00
David Sansome 6faa1aa1a6 Merge iLister devices with GIO devices 2010-08-01 11:55:01 +00:00
David Sansome a9d75e628b Remove the connect/disconnect actions and replace them with an eject device action. Implement eject on devicekit and gio. 2010-07-25 01:07:51 +00:00
David Sansome d704680579 Show some more information for GIO devices 2010-07-17 22:06:19 +00:00
David Sansome 43a73555db Implement the rest of the GIO backend. Devices are now keyed off "mount URLs" as well as backend-specific device IDs, if two or more devices share the same mount URL then the metadata gets taken from the most reliable backend. 2010-07-17 17:18:02 +00:00
David Sansome 0dcdf36535 Start of work on a GIO/GVFS device backend. 2010-07-17 14:22:07 +00:00