Ejemplo n.º 1
0
int main(int argc, char** argv)
{
    GError* err = NULL;
    GOptionContext* opt_ctxt;

    opt_ctxt = g_option_context_new(NULL);
    g_option_context_add_main_entries(opt_ctxt, cli_options, "gnome-twitch");
    if (!g_option_context_parse(opt_ctxt, &argc, &argv, &err))
    {
	g_critical("Could not parse CLI options code '%d' message '%s'", err->code, err->message);
	exit(1);
    }

#ifdef GDK_WINDOWING_X11
    XInitThreads();
#endif
    gtk_clutter_init(NULL, NULL);

    bindtextdomain("gnome-twitch", GT_LOCALE_DIR);
    bind_textdomain_codeset("gnome-twitch", "UTF-8");
    textdomain("gnome-twitch");

    g_log_set_default_handler((GLogFunc) gt_log, NULL);

    main_app = gt_app_new();

    return g_application_run(G_APPLICATION(main_app), argc, argv);
}
Ejemplo n.º 2
0
int main(int argc, char** argv)
{
    bindtextdomain("gnome-twitch", GT_LOCALE_DIR);
    bind_textdomain_codeset("gnome-twitch", "UTF-8");
    textdomain("gnome-twitch");

    gst_init(0, NULL);

    main_app = gt_app_new();

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