From 8544114065dc828d547c9d0d4e869441811d7d3b Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Sun, 9 Feb 2020 18:54:43 -0600 Subject: [PATCH] harvest-almanac: clean up main function a bit --- harvest-almanac/main.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/harvest-almanac/main.c b/harvest-almanac/main.c index d210e42..7c47c7a 100644 --- a/harvest-almanac/main.c +++ b/harvest-almanac/main.c @@ -8,17 +8,17 @@ #include #include "hal-application.h" +#include "hal-resources.h" int main(int argc, char *argv[]) { - setlocale(LC_ALL, ""); - bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); + bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR); textdomain(GETTEXT_PACKAGE); + g_resources_register(hal_get_resource()); - const gboolean success = hdy_init(&argc, &argv); - if (!success) { + if (!hdy_init(&argc, &argv)) { g_critical("Unable to initialize libhandy"); return 1; @@ -28,7 +28,5 @@ main(int argc, char *argv[]) g_set_application_name(_("Harvest Almanac")); - const int status = g_application_run(G_APPLICATION(app), argc, argv); - - return status; + return g_application_run(G_APPLICATION(app), argc, argv); } -- 2.45.2