static void brasero_gio_operation_eject_finish (GObject *source, GAsyncResult *result, gpointer user_data) { BraseroGioOperation *operation = user_data; if (G_IS_DRIVE (source)) operation->result = g_drive_eject_with_operation_finish (G_DRIVE (source), result, &operation->error); else operation->result = g_volume_eject_with_operation_finish (G_VOLUME (source), result, &operation->error); if (operation->error) brasero_gio_operation_end (operation); else if (!operation->result) brasero_gio_operation_end (operation); }
static void _drive_eject_cb (GDrive *drive, GAsyncResult *result, gpointer data) { GError *error = NULL; g_return_if_fail (MPD_IS_STORAGE_DEVICE_TILE (data)); g_drive_eject_with_operation_finish (drive, result, &error); if (error) { mpd_storage_device_tile_show_message ( MPD_STORAGE_DEVICE_TILE (data), get_eject_failed_message (), false); mx_widget_set_disabled (MX_WIDGET (data), FALSE); g_warning ("%s : %s", G_STRLOC, error->message); g_clear_error (&error); } }