2020-12-26 02:05:34 -08:00
|
|
|
// main.rs
|
|
|
|
|
//
|
|
|
|
|
// Copyright 2020 Christopher Davis <christopherdavis@gnome.org>
|
|
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
|
|
|
|
use gettextrs::*;
|
2021-12-21 16:09:48 -08:00
|
|
|
use gtk::gio::{self, prelude::*};
|
2020-12-26 02:05:34 -08:00
|
|
|
|
|
|
|
|
mod application;
|
|
|
|
|
mod config;
|
2022-01-16 19:03:13 -08:00
|
|
|
mod file_model;
|
2022-08-05 18:54:04 -04:00
|
|
|
mod i18n;
|
2022-11-03 17:40:06 +01:00
|
|
|
mod image_metadata;
|
2022-01-08 16:21:27 +01:00
|
|
|
mod thumbnail;
|
2021-09-05 05:51:34 -07:00
|
|
|
mod util;
|
2020-12-26 02:05:34 -08:00
|
|
|
mod widgets;
|
|
|
|
|
mod window;
|
|
|
|
|
|
2021-12-21 16:09:48 -08:00
|
|
|
mod deps {
|
|
|
|
|
pub use gtk::{gdk, gdk_pixbuf, gio, glib, graphene};
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-21 10:55:02 -08:00
|
|
|
use application::LpApplication;
|
2020-12-26 02:05:34 -08:00
|
|
|
|
|
|
|
|
fn main() {
|
2022-11-16 20:14:39 +01:00
|
|
|
pretty_env_logger::init_timed();
|
2020-12-26 02:05:34 -08:00
|
|
|
|
|
|
|
|
setlocale(LocaleCategory::LcAll, "");
|
2021-09-28 17:44:26 -07:00
|
|
|
bindtextdomain("loupe", config::LOCALEDIR).unwrap();
|
|
|
|
|
textdomain("loupe").unwrap();
|
2020-12-26 02:05:34 -08:00
|
|
|
|
2021-09-28 17:44:26 -07:00
|
|
|
let res = gio::Resource::load(config::PKGDATADIR.to_owned() + "/loupe.gresource")
|
2020-12-26 02:05:34 -08:00
|
|
|
.expect("Could not load resources");
|
|
|
|
|
gio::resources_register(&res);
|
|
|
|
|
|
2021-12-21 10:55:02 -08:00
|
|
|
let app = LpApplication::new();
|
2021-06-27 15:28:35 -07:00
|
|
|
let ret = app.run();
|
2020-12-26 02:05:34 -08:00
|
|
|
std::process::exit(ret);
|
|
|
|
|
}
|