-
Link Dupont authored
udisks exposes a D-Bus API for drive detection. UDisks provides a similar API to BraseroMediumMonitor for drive monitoring and inspection, but does not include any GTK widgets. A new class, SjDriveManager, implements the signal handlers to detect when new drives are added and removed from the system, in turn emitting its own signals. The UI and main application connects its own handlers to those signals in order to update the UI and perform device operations (such as reading CD track listings). The BraseroDriveSelection widget is replaced by a standard GtkComboBox. This combobox is backed by a GtkListStore, populated with drives detected by SjDriveManager. Via signal handlers, when drives are added or removed, the GtkListStore is updated accordingly. Notably, sj-metadata.c in libjuicer *does not* make use of SjDriveManager, since it's in a separately compiled static library. However, it does make use of a UDisksClient directly, so that the Brasero dependency can be dropped.