Exemple #1
0
void tgame_load::fill_local(twindow& window, tlistbox& list)
{
	find_widget<tcontrol>(&window, "delete", false).set_active(true);
	find_widget<tcontrol>(&window, "ok", false).set_active(true);
	std::string str = tintegrate::generate_format(_("Upload"), "blue");
	find_widget<tcontrol>(&window, "xmit", false).set_label(str);

	{
		cursor::setter cur(cursor::WAIT);
		games_ = savegame::manager::get_saves_list();
	}
	list.clear();
	BOOST_FOREACH (const savegame::save_info game, games_) {
		std::map<std::string, string_map> data;
		string_map item;

		item["label"] = game.name;
		data.insert(std::make_pair("filename", item));

		item["label"] = game.format_time_summary();
		data.insert(std::make_pair("date", item));

		list.add_row(data);
	}
	void clear_nicks()
	{
		DBG_GUI << "Nicks list: clearing\n";
		nicks_list->clear();
		nicks.clear();
	}
	void clear_stuff_types_list()
	{
		stuff_types_list->clear();
	}
	void clear_sides()
	{
		DBG_GUI << "Sides list: clearing\n";
		sides_list->clear();
		sides.clear();
	}
	void clear_stuff_list()
	{
		stuff_list->clear();
	}