예제 #1
0
파일: gitg.c 프로젝트: epronk/gitg
int
main (int argc, char **argv)
{
	gboolean ret;

	g_thread_init (NULL);

	gitg_debug_init ();

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

	g_set_prgname ("gitg");

	/* Translators: this is the application name as in g_set_application_name */
	g_set_application_name (_("gitg"));

	gitg_dirs_initialize (argc, argv);
	gtk_init (&argc, &argv);
	parse_options (&argc, &argv);

	set_language_search_path ();
	set_style_scheme_search_path ();
	set_icons ();

	GitgSettings *settings = gitg_settings_get_default ();
	GitgWindow *window = build_ui ();

	ret = gitg_window_load_repository_for_command_line (window,
	                                                    argc - 1,
	                                                    (gchar const **)argv + 1,
	                                                    select_sha1);

	if (commit_mode && ret)
	{
		gitg_window_show_commit (window);
	}

	original_link_button_hook = gtk_link_button_set_uri_hook ((GtkLinkButtonUriFunc)link_button_uri_hook,
	                                                          window,
	                                                          NULL);

	gtk_main ();

	/* Finalize settings */
	g_object_unref (settings);
	return 0;
}
예제 #2
0
파일: gitg.c 프로젝트: keestux/gitg
int
main (int argc, char **argv)
{
	gboolean ret;

	gitg_debug_init ();

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

	g_set_prgname ("gitg");

	/* Translators: this is the application name as in g_set_application_name */
	g_set_application_name (_("gitg"));

	gitg_dirs_initialize (argc, argv);
	gtk_init (&argc, &argv);
	parse_options (&argc, &argv);

	set_language_search_path ();
	set_style_scheme_search_path ();
	set_icons ();

	GitgWindow *window = build_ui ();

	ret = gitg_window_load_repository_for_command_line (window,
	                                                    argc - 1,
	                                                    (gchar const **)argv + 1,
	                                                    select_sha1);

	if (commit_mode && ret)
	{
		gitg_window_show_commit (window);
	}

	gtk_main ();

	return 0;
}