reorder imports for no reason

This commit is contained in:
psykose 2024-11-15 10:00:41 +01:00
parent 850450fdb4
commit 36f9f5f506
Signed by: psykose
SSH key fingerprint: SHA256:pRMVjV3kRB6zl+wNx+sV8KoMnPqQAW6v8dNCxsCGZv8
8 changed files with 64 additions and 78 deletions

View file

@ -1,9 +1,11 @@
mod imp {
use crate::ui;
use adw::{prelude::*, subclass::prelude::*};
use gtk::glib;
use gtk::{gio, glib};
use tracing::{event, Level};
mod imp {
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,

View file

@ -1,9 +1,11 @@
mod imp {
use adw::prelude::*;
use gtk::glib;
use gtk::subclass::prelude::*;
use std::cell::RefCell;
mod imp {
use super::*;
#[derive(glib::Properties, Default)]
#[properties(wrapper_type = super::Album)]
pub struct Album {
@ -25,8 +27,6 @@ mod imp {
impl ObjectImpl for Album {}
}
use gtk::glib;
glib::wrapper! {
pub struct Album(ObjectSubclass<imp::Album>);
}

View file

@ -1,8 +1,12 @@
mod imp {
use adw::prelude::*;
use gtk::subclass::prelude::*;
use gtk::{gdk, glib};
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 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);

View file

@ -1,12 +1,13 @@
pub mod song;
pub use song::Song;
mod imp {
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 super::*;
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
#[template(resource = "/eu/callcc/audrey/play_queue.ui")]
#[properties(wrapper_type = super::PlayQueue)]
@ -102,8 +103,6 @@ mod imp {
}
}
use adw::prelude::*;
use gtk::glib;
glib::wrapper! {
pub struct PlayQueue(ObjectSubclass<imp::PlayQueue>)

View file

@ -1,9 +1,12 @@
mod imp {
use crate::model::Song as ModelSong;
use adw::prelude::*;
use glib::subclass::InitializingObject;
use gtk::{gdk, gio, glib, prelude::*, subclass::prelude::*};
use gtk::{gdk, gio, glib, subclass::prelude::*};
use std::cell::{Cell, RefCell};
mod imp {
use super::*;
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
#[template(resource = "/eu/callcc/audrey/play_queue_song.ui")]
#[properties(wrapper_type = super::Song)]
@ -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,

View file

@ -1,4 +1,3 @@
mod imp {
use crate::model::Song;
use adw::prelude::*;
use adw::subclass::prelude::*;
@ -7,6 +6,9 @@ mod imp {
use std::cell::{Cell, RefCell};
use tracing::{event, Level};
mod imp {
use super::*;
#[derive(glib::Properties, gtk::CompositeTemplate, Default)]
#[properties(wrapper_type = super::Playbar)]
#[template(resource = "/eu/callcc/audrey/playbar.ui")]
@ -169,8 +171,6 @@ mod imp {
}
}
use gtk::glib;
glib::wrapper! {
pub struct Playbar(ObjectSubclass<imp::Playbar>)
@extends adw::Bin, gtk::Widget,

View file

@ -1,10 +1,12 @@
mod imp {
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 super::*;
#[derive(gtk::CompositeTemplate, glib::Properties, Default)]
#[template(resource = "/eu/callcc/audrey/setup.ui")]
#[properties(wrapper_type = super::Setup)]
@ -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,

View file

@ -1,8 +1,8 @@
mod imp {
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};
@ -11,6 +11,9 @@ mod imp {
use tracing::{event, span, Level};
use zbus::object_server::InterfaceRef;
mod imp {
use super::*;
#[derive(Debug, Copy, Clone)]
pub(super) enum State {
Idle,
@ -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,