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 {
|
mod imp {
|
||||||
use crate::ui;
|
use super::*;
|
||||||
use adw::{prelude::*, subclass::prelude::*};
|
|
||||||
use gtk::glib;
|
|
||||||
use tracing::{event, Level};
|
|
||||||
|
|
||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub struct Application {}
|
pub struct Application {}
|
||||||
|
@ -46,8 +48,6 @@ mod imp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use gtk::{gio, glib};
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
pub struct Application(ObjectSubclass<imp::Application>)
|
pub struct Application(ObjectSubclass<imp::Application>)
|
||||||
@extends adw::Application, gtk::Application, gio::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 {
|
mod imp {
|
||||||
use adw::prelude::*;
|
use super::*;
|
||||||
use gtk::glib;
|
|
||||||
use gtk::subclass::prelude::*;
|
|
||||||
use std::cell::RefCell;
|
|
||||||
|
|
||||||
#[derive(glib::Properties, Default)]
|
#[derive(glib::Properties, Default)]
|
||||||
#[properties(wrapper_type = super::Album)]
|
#[properties(wrapper_type = super::Album)]
|
||||||
|
@ -25,8 +27,6 @@ mod imp {
|
||||||
impl ObjectImpl for Album {}
|
impl ObjectImpl for Album {}
|
||||||
}
|
}
|
||||||
|
|
||||||
use gtk::glib;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
pub struct Album(ObjectSubclass<imp::Album>);
|
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 {
|
mod imp {
|
||||||
use adw::prelude::*;
|
use super::*;
|
||||||
use gtk::subclass::prelude::*;
|
|
||||||
use gtk::{gdk, glib};
|
|
||||||
use std::cell::{Cell, RefCell};
|
|
||||||
|
|
||||||
static NEXT_COUNTER: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
|
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
|
// only fetch 20 thumbnails at a time
|
||||||
static SEM: Semaphore = Semaphore::const_new(20);
|
static SEM: Semaphore = Semaphore::const_new(20);
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
pub mod song;
|
pub mod song;
|
||||||
|
use adw::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
||||||
|
use glib::{subclass::InitializingObject, WeakRef};
|
||||||
pub use song::Song;
|
pub use song::Song;
|
||||||
|
use std::cell::{Cell, RefCell};
|
||||||
|
use tracing::{event, Level};
|
||||||
|
|
||||||
mod imp {
|
mod imp {
|
||||||
use adw::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
use super::*;
|
||||||
use glib::{subclass::InitializingObject, WeakRef};
|
|
||||||
use std::cell::{Cell, RefCell};
|
|
||||||
use tracing::{event, Level};
|
|
||||||
|
|
||||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||||
#[template(resource = "/eu/callcc/audrey/play_queue.ui")]
|
#[template(resource = "/eu/callcc/audrey/play_queue.ui")]
|
||||||
|
@ -102,8 +103,6 @@ mod imp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use adw::prelude::*;
|
|
||||||
use gtk::glib;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
pub struct PlayQueue(ObjectSubclass<imp::PlayQueue>)
|
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 {
|
mod imp {
|
||||||
use crate::model::Song as ModelSong;
|
use super::*;
|
||||||
use glib::subclass::InitializingObject;
|
|
||||||
use gtk::{gdk, gio, glib, prelude::*, subclass::prelude::*};
|
|
||||||
use std::cell::{Cell, RefCell};
|
|
||||||
|
|
||||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||||
#[template(resource = "/eu/callcc/audrey/play_queue_song.ui")]
|
#[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! {
|
glib::wrapper! {
|
||||||
pub struct Song(ObjectSubclass<imp::Song>)
|
pub struct Song(ObjectSubclass<imp::Song>)
|
||||||
@extends gtk::Box, gtk::Widget,
|
@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 {
|
mod imp {
|
||||||
use crate::model::Song;
|
use super::*;
|
||||||
use adw::prelude::*;
|
|
||||||
use adw::subclass::prelude::*;
|
|
||||||
use glib::subclass::InitializingObject;
|
|
||||||
use gtk::{gdk, glib};
|
|
||||||
use std::cell::{Cell, RefCell};
|
|
||||||
use tracing::{event, Level};
|
|
||||||
|
|
||||||
#[derive(glib::Properties, gtk::CompositeTemplate, Default)]
|
#[derive(glib::Properties, gtk::CompositeTemplate, Default)]
|
||||||
#[properties(wrapper_type = super::Playbar)]
|
#[properties(wrapper_type = super::Playbar)]
|
||||||
|
@ -169,8 +171,6 @@ mod imp {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
use gtk::glib;
|
|
||||||
|
|
||||||
glib::wrapper! {
|
glib::wrapper! {
|
||||||
pub struct Playbar(ObjectSubclass<imp::Playbar>)
|
pub struct Playbar(ObjectSubclass<imp::Playbar>)
|
||||||
@extends adw::Bin, gtk::Widget,
|
@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 {
|
mod imp {
|
||||||
use adw::{glib, prelude::*, subclass::prelude::*};
|
use super::*;
|
||||||
use glib::subclass::InitializingObject;
|
|
||||||
use glib::WeakRef;
|
|
||||||
use std::cell::{Cell, RefCell};
|
|
||||||
use tracing::{event, Level};
|
|
||||||
|
|
||||||
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
|
||||||
#[template(resource = "/eu/callcc/audrey/setup.ui")]
|
#[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! {
|
glib::wrapper! {
|
||||||
pub struct Setup(ObjectSubclass<imp::Setup>)
|
pub struct Setup(ObjectSubclass<imp::Setup>)
|
||||||
@extends adw::PreferencesDialog, adw::Dialog, gtk::Widget,
|
@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 {
|
mod imp {
|
||||||
use crate::model::{Album, Song};
|
use super::*;
|
||||||
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;
|
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone)]
|
#[derive(Debug, Copy, Clone)]
|
||||||
pub(super) enum State {
|
pub(super) enum State {
|
||||||
|
@ -178,9 +181,7 @@ mod imp {
|
||||||
gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420);
|
gtk::style_context_add_provider_for_display(&display, &self.css_provider, 420);
|
||||||
}
|
}
|
||||||
|
|
||||||
use gio::ActionEntry;
|
let action_seek_backward = gio::ActionEntry::builder("seek-backward")
|
||||||
|
|
||||||
let action_seek_backward = ActionEntry::builder("seek-backward")
|
|
||||||
.activate(glib::clone!(
|
.activate(glib::clone!(
|
||||||
#[weak(rename_to = window)]
|
#[weak(rename_to = window)]
|
||||||
self.obj(),
|
self.obj(),
|
||||||
|
@ -190,7 +191,7 @@ mod imp {
|
||||||
))
|
))
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
let action_seek_forward = ActionEntry::builder("seek-forward")
|
let action_seek_forward = gio::ActionEntry::builder("seek-forward")
|
||||||
.activate(glib::clone!(
|
.activate(glib::clone!(
|
||||||
#[weak(rename_to = window)]
|
#[weak(rename_to = window)]
|
||||||
self.obj(),
|
self.obj(),
|
||||||
|
@ -798,8 +799,6 @@ mod imp {
|
||||||
let api = Rc::clone(self.api.borrow().as_ref().unwrap());
|
let api = Rc::clone(self.api.borrow().as_ref().unwrap());
|
||||||
let albums_model = self.obj().albums_model().clone();
|
let albums_model = self.obj().albums_model().clone();
|
||||||
let perform = async move {
|
let perform = async move {
|
||||||
use futures::TryStreamExt;
|
|
||||||
|
|
||||||
let mut albums =
|
let mut albums =
|
||||||
std::pin::pin!(api.album_list_full(crate::subsonic::AlbumListType::Newest));
|
std::pin::pin!(api.album_list_full(crate::subsonic::AlbumListType::Newest));
|
||||||
while let Some(album) = albums.try_next().await? {
|
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! {
|
glib::wrapper! {
|
||||||
pub struct Window(ObjectSubclass<imp::Window>)
|
pub struct Window(ObjectSubclass<imp::Window>)
|
||||||
@extends adw::ApplicationWindow, gtk::ApplicationWindow, gtk::Window, gtk::Widget,
|
@extends adw::ApplicationWindow, gtk::ApplicationWindow, gtk::Window, gtk::Widget,
|
||||||
|
|
Loading…
Reference in a new issue