Beispiel #1
0
int
main (int argc, char *argv[])
{
	int status;

	program_argv0 = argv[0];

	/* text domain */

	bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
	textdomain (GETTEXT_PACKAGE);

	/* run the main application */

	Main_Application = gth_application_new ();
	status = g_application_run (G_APPLICATION (Main_Application), argc, argv);

	gth_main_release ();
	gth_pref_release ();
	g_object_unref (Main_Application);

	/* restart if requested by the user */

	if (Restart)
		g_spawn_command_line_async (program_argv0, NULL);

	return status;
}
Beispiel #2
0
static void
gth_application_finalize (GObject *object)
{
	gth_main_release ();
	gth_pref_release ();

        G_OBJECT_CLASS (gth_application_parent_class)->finalize (object);
}