musicus/src/main.rs

39 lines
1.1 KiB
Rust
Raw Normal View History

2023-06-18 14:02:21 +02:00
mod application;
mod config;
2023-09-20 13:49:02 +02:00
mod home_page;
2023-09-30 18:26:11 +02:00
mod library;
2023-09-29 21:18:28 +02:00
mod player;
2023-10-27 12:32:40 +02:00
mod player_bar;
2023-10-25 17:45:32 +02:00
mod playlist_item;
2023-09-24 11:57:16 +02:00
mod playlist_page;
2023-10-25 17:45:32 +02:00
mod playlist_tile;
2023-10-08 16:40:59 +02:00
mod recording_tile;
2023-09-30 00:22:33 +02:00
mod search_entry;
mod search_tag;
2023-10-08 16:40:59 +02:00
mod tag_tile;
mod welcome_page;
2023-06-18 14:02:21 +02:00
mod window;
use self::{application::MusicusApplication, window::MusicusWindow};
2023-06-18 14:02:21 +02:00
use config::{GETTEXT_PACKAGE, LOCALEDIR, PKGDATADIR};
use gettextrs::{bind_textdomain_codeset, bindtextdomain, textdomain};
2023-11-03 17:48:27 +01:00
use gstreamer_player::gst;
use gtk::{gio, glib, prelude::*};
2023-06-18 14:02:21 +02:00
fn main() -> glib::ExitCode {
2023-09-15 10:12:36 +02:00
tracing_subscriber::fmt::init();
2023-11-03 17:48:27 +01:00
gst::init().expect("Failed to initialize GStreamer!");
2023-09-15 10:12:36 +02:00
2023-06-18 14:02:21 +02:00
bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR).expect("Unable to bind the text domain");
bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8")
.expect("Unable to set the text domain encoding");
textdomain(GETTEXT_PACKAGE).expect("Unable to switch to the text domain");
let resources = gio::Resource::load(PKGDATADIR.to_owned() + "/musicus.gresource")
.expect("Could not load resources");
gio::resources_register(&resources);
MusicusApplication::new("de.johrpan.musicus", &gio::ApplicationFlags::empty()).run()
2023-06-18 14:02:21 +02:00
}