mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
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:
parent
64eca0bb2d
commit
55751fc6fb
@ -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],
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user