~tristan957/harvest-almanac

ref: 7d838279ff637307e5f8eee7b869356f544fd48d harvest-almanac/harvest-almanac/main.c -rw-r--r-- 709 bytes
7d838279Tristan Partin clang-format: update 1 year, 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "config.h"

#include <locale.h>

#include <glib-object.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <handy.h>

#include "hal-application.h"

int
main(int argc, char *argv[])
{
	setlocale(LC_ALL, "");
	bindtextdomain(GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
	textdomain(GETTEXT_PACKAGE);

	const gboolean success = hdy_init(&argc, &argv);
	if (!success) {
		g_critical("Unable to initialize libhandy");

		return 1;
	}

	g_autoptr(HalApplication) app = hal_application_new("io.partin.tristan.HarvestAlmanac");

	g_set_application_name(_("Harvest Almanac"));

	const int status = g_application_run(G_APPLICATION(app), argc, argv);

	return status;
}