Exemplo n.º 1
0
/* compose_delete */
static void _compose_delete(Compose * compose)
{
	if(compose->standalone == TRUE)
		gtk_main_quit();
	else
		compose_delete(compose);
}
Exemplo n.º 2
0
/* main */
int main(int argc, char * argv[])
{
	Config * config;
	Compose * compose;
	char const * subject = NULL;
	int o;

	if(setlocale(LC_ALL, "") == NULL)
		_error("setlocale", 1);
	bindtextdomain(PACKAGE, LOCALEDIR);
	textdomain(PACKAGE);
	gtk_init(&argc, &argv);
	while((o = getopt(argc, argv, "s:")) != -1)
		switch(o)
		{
			case 's':
				subject = optarg;
				break;
			default:
				return _usage();
		}
	config = _compose_config();
	if((compose = _compose(config, subject, argc - optind, &argv[optind]))
			!= NULL)
	{
		gtk_main();
		compose_delete(compose);
	}
	if(config != NULL)
		config_delete(config);
	return 0;
}