49 lines
1.2 KiB
Rust
49 lines
1.2 KiB
Rust
pub const VERSION: &str = "0.1.0"; // AUDREY_VERSION
|
|
pub const USER_AGENT: &str = "audrey/linux";
|
|
pub const APP_ID: &str = "eu.callcc.audrey";
|
|
|
|
mod application;
|
|
pub use application::Application;
|
|
|
|
mod meson_config;
|
|
pub mod ui;
|
|
|
|
pub mod mpris;
|
|
pub use mpris::Mpris;
|
|
|
|
pub mod model;
|
|
|
|
pub mod subsonic;
|
|
|
|
use gettextrs::{bind_textdomain_codeset, bindtextdomain, setlocale, textdomain, LocaleCategory};
|
|
use gtk::prelude::*;
|
|
use gtk::{gio, glib};
|
|
|
|
pub mod mpv;
|
|
|
|
#[cfg(debug_assertions)]
|
|
fn init_tracing() {
|
|
tracing_subscriber::fmt::init();
|
|
}
|
|
|
|
#[cfg(not(debug_assertions))]
|
|
fn init_tracing() {}
|
|
|
|
fn main() -> glib::ExitCode {
|
|
gio::resources_register_include!("audrey.gresource").expect("could not register resources");
|
|
|
|
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");
|
|
textdomain("audrey").expect("unable to switch to text domain");
|
|
setlocale(LocaleCategory::LcAll, "");
|
|
setlocale(LocaleCategory::LcNumeric, "C.UTF-8");
|
|
let app = Application::new();
|
|
|
|
app.run()
|
|
}
|