Improve external drives detection

Use g_drive_is_removable for external drives detection. Current heuristic
fails in some cases (e.g. when removable drive is attached before login),
see Bug 765457.

Bump GLib version accordingly.

https://bugzilla.gnome.org/show_bug.cgi?id=765924
This commit is contained in:
Ondrej Holy 2016-05-02 12:55:56 +02:00
parent 64eca0bb2d
commit 55751fc6fb
3 changed files with 4 additions and 8 deletions

View File

@ -42,8 +42,8 @@ m4_define([gtk_binary_version], [3.0.0])
# required versions of other packages
m4_define([glib_required_major], [2])
m4_define([glib_required_minor], [45])
m4_define([glib_required_micro], [8])
m4_define([glib_required_minor], [49])
m4_define([glib_required_micro], [1])
m4_define([glib_required_version],
[glib_required_major.glib_required_minor.glib_required_micro])
m4_define([glib_min_required_minor],

View File

@ -877,9 +877,7 @@ is_external_volume (GVolume *volume)
is_external |= !id;
if (drive)
is_external |= g_drive_can_eject (drive) ||
g_drive_is_media_removable (drive) ||
g_drive_can_stop (drive);
is_external |= g_drive_is_removable (drive);
g_clear_object (&drive);
g_free (id);

View File

@ -475,9 +475,7 @@ is_external_volume (GVolume *volume)
is_external |= !id;
if (drive)
is_external |= g_drive_can_eject (drive) ||
g_drive_is_media_removable (drive) ||
g_drive_can_stop (drive);
is_external |= g_drive_is_removable (drive);
g_clear_object (&drive);
g_free (id);