2024-10-29 12:01:42 +00:00
|
|
|
mod application;
|
2024-10-29 13:02:29 +00:00
|
|
|
pub use application::Application;
|
|
|
|
|
2024-10-30 06:32:21 +00:00
|
|
|
mod meson_config;
|
2024-10-29 13:02:29 +00:00
|
|
|
pub mod ui;
|
2024-10-29 12:01:42 +00:00
|
|
|
|
2024-10-30 09:06:10 +00:00
|
|
|
pub mod mpris;
|
|
|
|
pub use mpris::Mpris;
|
|
|
|
|
|
|
|
pub mod playbin;
|
|
|
|
pub use playbin::Playbin;
|
|
|
|
|
|
|
|
pub mod subsonic;
|
|
|
|
|
2024-10-30 06:32:21 +00:00
|
|
|
use gettextrs::{bind_textdomain_codeset, bindtextdomain, setlocale, textdomain, LocaleCategory};
|
2024-10-29 12:01:42 +00:00
|
|
|
use gtk::prelude::*;
|
2024-10-29 13:02:29 +00:00
|
|
|
use gtk::{gio, glib};
|
2024-10-29 10:46:58 +00:00
|
|
|
|
2024-10-30 07:41:17 +00:00
|
|
|
pub mod mpv;
|
|
|
|
|
2024-10-29 10:37:15 +00:00
|
|
|
#[link(name = "audrey")]
|
|
|
|
#[link(name = "gcrypt")]
|
|
|
|
#[link(name = "json-glib-1.0")]
|
2024-10-29 18:13:58 +00:00
|
|
|
#[link(name = "secret-1")]
|
2024-10-29 10:37:15 +00:00
|
|
|
#[link(name = "soup-3.0")]
|
2024-10-29 13:02:29 +00:00
|
|
|
extern "C" {}
|
2024-10-29 10:37:15 +00:00
|
|
|
|
2024-10-29 12:01:42 +00:00
|
|
|
fn main() -> glib::ExitCode {
|
2024-10-29 10:46:58 +00:00
|
|
|
gio::resources_register_include!("audrey.gresource").expect("could not register resources");
|
|
|
|
|
2024-10-30 11:45:50 +00:00
|
|
|
ui::Playbar::ensure_type();
|
|
|
|
|
2024-10-29 12:01:42 +00:00
|
|
|
gtk::disable_setlocale();
|
2024-10-30 06:32:21 +00:00
|
|
|
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");
|
2024-10-29 12:01:42 +00:00
|
|
|
let app = Application::new();
|
|
|
|
app.run()
|
2024-10-29 10:37:15 +00:00
|
|
|
}
|