reorder imports for no reason
This commit is contained in:
parent
850450fdb4
commit
36f9f5f506
8 changed files with 64 additions and 78 deletions
|
@ -1,8 +1,10 @@
|
|||
use crate::ui;
|
||||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::{gio, glib};
|
||||
use tracing::{event, Level};
|
||||
|
||||
mod imp {
|
||||
use crate::ui;
|
||||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::glib;
|
||||
use tracing::{event, Level};
|
||||
use super::*;
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct Application {}
|
||||
|
@ -46,8 +48,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use gtk::{gio, glib};
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Application(ObjectSubclass<imp::Application>)
|
||||
@extends adw::Application, gtk::Application, gio::Application,
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
use adw::prelude::*;
|
||||
use gtk::glib;
|
||||
use gtk::subclass::prelude::*;
|
||||
use std::cell::RefCell;
|
||||
|
||||
mod imp {
|
||||
use adw::prelude::*;
|
||||
use gtk::glib;
|
||||
use gtk::subclass::prelude::*;
|
||||
use std::cell::RefCell;
|
||||
use super::*;
|
||||
|
||||
#[derive(glib::Properties, Default)]
|
||||
#[properties(wrapper_type = super::Album)]
|
||||
|
@ -25,8 +27,6 @@ mod imp {
|
|||
impl ObjectImpl for Album {}
|
||||
}
|
||||
|
||||
use gtk::glib;
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Album(ObjectSubclass<imp::Album>);
|
||||
}
|
||||
|
|
|
@ -1,8 +1,12 @@
|
|||
use crate::subsonic;
|
||||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use gtk::{gdk, glib, glib::Object};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tokio::sync::Semaphore;
|
||||
use tracing::{event, Level};
|
||||
|
||||
mod imp {
|
||||
use adw::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{gdk, glib};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use super::*;
|
||||
|
||||
static NEXT_COUNTER: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
|
||||
|
||||
|
@ -60,13 +64,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use crate::subsonic;
|
||||
use adw::{prelude::*, subclass::prelude::*};
|
||||
use glib::Object;
|
||||
use gtk::{gdk, glib};
|
||||
use tokio::sync::Semaphore;
|
||||
use tracing::{event, Level};
|
||||
|
||||
// only fetch 20 thumbnails at a time
|
||||
static SEM: Semaphore = Semaphore::const_new(20);
|
||||
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
pub mod song;
|
||||
use adw::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
||||
use glib::{subclass::InitializingObject, WeakRef};
|
||||
pub use song::Song;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
|
||||
mod imp {
|
||||
use adw::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
||||
use glib::{subclass::InitializingObject, WeakRef};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
use super::*;
|
||||
|
||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||
#[template(resource = "/eu/callcc/audrey/play_queue.ui")]
|
||||
|
@ -102,8 +103,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use adw::prelude::*;
|
||||
use gtk::glib;
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct PlayQueue(ObjectSubclass<imp::PlayQueue>)
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
use crate::model::Song as ModelSong;
|
||||
use adw::prelude::*;
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{gdk, gio, glib, subclass::prelude::*};
|
||||
use std::cell::{Cell, RefCell};
|
||||
|
||||
mod imp {
|
||||
use crate::model::Song as ModelSong;
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use super::*;
|
||||
|
||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||
#[template(resource = "/eu/callcc/audrey/play_queue_song.ui")]
|
||||
|
@ -174,10 +177,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use crate::model::Song as ModelSong;
|
||||
use adw::prelude::*;
|
||||
use gtk::glib;
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Song(ObjectSubclass<imp::Song>)
|
||||
@extends gtk::Box, gtk::Widget,
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
use crate::model::Song;
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{gdk, glib};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
|
||||
mod imp {
|
||||
use crate::model::Song;
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use glib::subclass::InitializingObject;
|
||||
use gtk::{gdk, glib};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
use super::*;
|
||||
|
||||
#[derive(glib::Properties, gtk::CompositeTemplate, Default)]
|
||||
#[properties(wrapper_type = super::Playbar)]
|
||||
|
@ -169,8 +171,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use gtk::glib;
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Playbar(ObjectSubclass<imp::Playbar>)
|
||||
@extends adw::Bin, gtk::Widget,
|
||||
|
|
|
@ -1,9 +1,11 @@
|
|||
use adw::{glib, prelude::*, subclass::prelude::*};
|
||||
use glib::subclass::InitializingObject;
|
||||
use glib::WeakRef;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
|
||||
mod imp {
|
||||
use adw::{glib, prelude::*, subclass::prelude::*};
|
||||
use glib::subclass::InitializingObject;
|
||||
use glib::WeakRef;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use tracing::{event, Level};
|
||||
use super::*;
|
||||
|
||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||
#[template(resource = "/eu/callcc/audrey/setup.ui")]
|
||||
|
@ -123,10 +125,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use adw::subclass::prelude::*;
|
||||
use gtk::glib;
|
||||
use tracing::{event, Level};
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Setup(ObjectSubclass<imp::Setup>)
|
||||
@extends adw::PreferencesDialog, adw::Dialog, gtk::Widget,
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
use crate::model::{Album, Song};
|
||||
use crate::{mpris, mpv};
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use futures::TryStreamExt;
|
||||
use glib::subclass::InitializingObject;
|
||||
use glib::JoinHandle;
|
||||
use gtk::{gdk, gio, glib};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
use tracing::{event, span, Level};
|
||||
use zbus::object_server::InterfaceRef;
|
||||
|
||||
mod imp {
|
||||
use crate::model::{Album, Song};
|
||||
use crate::{mpris, mpv};
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use glib::subclass::InitializingObject;
|
||||
use glib::JoinHandle;
|
||||
use gtk::{gdk, gio, glib};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::rc::Rc;
|
||||
use tracing::{event, span, Level};
|
||||
use zbus::object_server::InterfaceRef;
|
||||
use super::*;
|
||||
|
||||
#[derive(Debug, Copy, Clone)]
|
||||
pub(super) enum State {
|
||||
|
@ -178,9 +181,7 @@ mod imp {
|
|||
gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420);
|
||||
}
|
||||
|
||||
use gio::ActionEntry;
|
||||
|
||||
let action_seek_backward = ActionEntry::builder("seek-backward")
|
||||
let action_seek_backward = gio::ActionEntry::builder("seek-backward")
|
||||
.activate(glib::clone!(
|
||||
#[weak(rename_to = window)]
|
||||
self.obj(),
|
||||
|
@ -190,7 +191,7 @@ mod imp {
|
|||
))
|
||||
.build();
|
||||
|
||||
let action_seek_forward = ActionEntry::builder("seek-forward")
|
||||
let action_seek_forward = gio::ActionEntry::builder("seek-forward")
|
||||
.activate(glib::clone!(
|
||||
#[weak(rename_to = window)]
|
||||
self.obj(),
|
||||
|
@ -798,8 +799,6 @@ mod imp {
|
|||
let api = Rc::clone(self.api.borrow().as_ref().unwrap());
|
||||
let albums_model = self.obj().albums_model().clone();
|
||||
let perform = async move {
|
||||
use futures::TryStreamExt;
|
||||
|
||||
let mut albums =
|
||||
std::pin::pin!(api.album_list_full(crate::subsonic::AlbumListType::Newest));
|
||||
while let Some(album) = albums.try_next().await? {
|
||||
|
@ -841,12 +840,6 @@ mod imp {
|
|||
}
|
||||
}
|
||||
|
||||
use adw::prelude::*;
|
||||
use adw::subclass::prelude::*;
|
||||
use gtk::{gio, glib};
|
||||
use std::rc::Rc;
|
||||
use tracing::{event, Level};
|
||||
|
||||
glib::wrapper! {
|
||||
pub struct Window(ObjectSubclass<imp::Window>)
|
||||
@extends adw::ApplicationWindow, gtk::ApplicationWindow, gtk::Window, gtk::Widget,
|
||||
|
|
Loading…
Reference in a new issue