Compare commits
No commits in common. "d37ec6a19a186c297dfa7f8e22064c988543bb8e" and "2f322774c90804a7dbe779a7de5b1841f8b186a4" have entirely different histories.
d37ec6a19a
...
2f322774c9
4 changed files with 15 additions and 19 deletions
|
@ -35,12 +35,12 @@ template $AudreyUiWindow: Adw.ApplicationWindow {
|
|||
vexpand: true;
|
||||
|
||||
Adw.ViewStackPage {
|
||||
icon-name: "folder-music-symbolic";
|
||||
title: _("Browse");
|
||||
icon-name: "media-optical-cd";
|
||||
title: _("Albums");
|
||||
|
||||
child: Adw.NavigationView {
|
||||
Adw.NavigationPage {
|
||||
title: _("Browse");
|
||||
title: _("Albums");
|
||||
vexpand: true;
|
||||
|
||||
child: Adw.ToolbarView {
|
||||
|
|
|
@ -17,19 +17,15 @@ mod imp {
|
|||
impl ObjectImpl for Application {}
|
||||
|
||||
impl ApplicationImpl for Application {
|
||||
// called once by the primary instance
|
||||
fn startup(&self) {
|
||||
self.parent_startup();
|
||||
ui::Window::new(self.obj().as_ref());
|
||||
}
|
||||
|
||||
// executed by the primary instance
|
||||
fn activate(&self) {
|
||||
self.parent_activate();
|
||||
self.obj()
|
||||
.active_window()
|
||||
.expect("no window was active")
|
||||
.present();
|
||||
match self.obj().active_window() {
|
||||
None => {
|
||||
let window = ui::Window::new(self.obj().as_ref());
|
||||
window.present();
|
||||
}
|
||||
Some(win) => win.present(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ fn main() -> glib::ExitCode {
|
|||
|
||||
init_tracing();
|
||||
|
||||
ui::Playbar::ensure_type();
|
||||
ui::PlayQueue::ensure_type();
|
||||
|
||||
gtk::disable_setlocale();
|
||||
bindtextdomain("audrey", meson_config::LOCALEDIR).expect("failed to bind text domain");
|
||||
bind_textdomain_codeset("audrey", "UTF-8").expect("failed to bind textdomaincodeset");
|
||||
|
|
|
@ -176,7 +176,7 @@ mod imp {
|
|||
None => glib::ControlFlow::Break,
|
||||
Some(window) => {
|
||||
match window.imp().state.get() {
|
||||
State::Idle | State::FileLoading | State::Seeking => {}
|
||||
State::Idle | State::FileLoading | State::Seeking => {},
|
||||
State::Active => window.notify("time-pos"),
|
||||
other => unreachable!("{other:?}"),
|
||||
}
|
||||
|
@ -361,10 +361,7 @@ mod imp {
|
|||
match self.state.get() {
|
||||
State::Idle => 0.0,
|
||||
|
||||
State::FileLoading | State::FileEnded => self
|
||||
.song()
|
||||
.map(|song| song.duration() as f64)
|
||||
.unwrap_or(0.0),
|
||||
State::FileLoading | State::FileEnded => self.song().unwrap().duration() as f64,
|
||||
|
||||
State::FileLoaded | State::Active | State::Seeking => {
|
||||
self.mpv.get_property::<f64>("duration").unwrap()
|
||||
|
|
Loading…
Reference in a new issue