Beispiel #1
0
static gboolean
save_cb(gpointer data)
{
	sync_prefs();
	save_timer = 0;
	return FALSE;
}
Beispiel #2
0
void
purple_prefs_uninit()
{
	if (save_timer != 0)
	{
		purple_timeout_remove(save_timer);
		save_timer = 0;
		sync_prefs();
	}

	purple_prefs_disconnect_by_handle(purple_prefs_get_handle());

	prefs_loaded = FALSE;
	purple_prefs_destroy();
	g_hash_table_destroy(prefs_hash);
	prefs_hash = NULL;

}
Beispiel #3
0
void init_boe(int argc, char* argv[]) {
	init_directories(argv[0]);
	init_menubar(); // Do this first of all because otherwise a default File and Window menu will be seen
	sync_prefs();
	init_graph_tool();
	init_snd_tool();
	
	cDialog::init();
	init_sbar(text_sbar, sbar_rect, 58, 11, 58);
	init_sbar(item_sbar, item_sbar_rect, 16, 8);
	init_sbar(shop_sbar, shop_sbar_rect, 16, 8);
	init_btn(done_btn, BTN_DONE);
	init_btn(help_btn, BTN_HELP);
	
	adjust_window_mode();
	// If we don't do this now it'll flash white to start with
	mainPtr.clear(sf::Color::Black);
	mainPtr.display();
	
	make_cursor_watch();
	boost::thread init_thread([]() {
		init_buf();
		check_for_intel();
		srand(time(nullptr));
		init_screen_locs();
		Set_up_win();
		init_startup();
		flushingInput = true;
	});
	show_logo();
	if(get_bool_pref("ShowStartupSplash", true))
		plop_fancy_startup();
	init_thread.join();
	
	cUniverse::print_result = iLiving::print_result = add_string_to_buf;
	cPlayer::give_help = give_help;
	set_up_apple_events(argc, argv);
	init_fileio();
	init_spell_menus();
	init_mini_map();
	redraw_screen(REFRESH_NONE);
	showMenuBar();
}
Beispiel #4
0
void close_program() {
	// TODO: Ultimately we would like to have cleanup happen automatically, negating the need for this function
	// On the Mac, prefs are synced automatically. However, doing it manually won't hurt.
	// On other platforms, we need to do it manually.
	sync_prefs();
}