~tristan957/harvest-almanac

ref: 8544114065dc828d547c9d0d4e869441811d7d3b harvest-almanac/harvest-almanac/main.c -rw-r--r-- 691 bytes
85441140Tristan Partin harvest-almanac: clean up main function a bit 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
#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"
#include "hal-resources.h"

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

	if (!hdy_init(&argc, &argv)) {
		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"));

	return g_application_run(G_APPLICATION(app), argc, argv);
}