Beispiel #1
0
bool Settings::LoadSettings()
////////////////////////////////////////////////////////////////////////
{
	#define GETSTRING(a,b) if (settingsfile.GetString(a, tempstring)) Set##b(tempstring);
	#define GETBOOL(a,b) if (settingsfile.GetBool(a, tempbool)) Set##b(tempbool);
	#define GETINT(a,b) if (settingsfile.GetInteger(a, tempint)) Set##b(tempint);

	BString tempstring;
	bool tempbool;
	int tempint;
	
	DataFile settingsfile;
	if (settingsfile.LoadDataFile(GetSettingsFile()))
	{
		if (settingsfile.GetBool("ASKONEXIT", tempbool))
			SetAskOnExit(tempbool);
		if (settingsfile.GetString("LANGUAGE", tempstring))
			SetLanguage(tempstring);
		if (settingsfile.GetInteger("WINDOWLEFT", tempint))
			SetWindowLeft(tempint);
		GETINT("WINDOWTOP", WindowTop);
		GETINT("WINDOWWIDTH", WindowWidth);
		GETINT("WINDOWHEIGHT", WindowHeight);
		GETSTRING("TERMINALWINDOW", TerminalWindow);
		
		GETSTRING("LEFTPANELPATH", LeftPanelPath);
		GETSTRING("RIGHTPANELPATH", RightPanelPath);
		
		return true;		
	}
	else
		return false;
}
Beispiel #2
0
void Settings::SetDefaults()
////////////////////////////////////////////////////////////////////////
{
	SetAskOnExit(false);
	SetLanguage("English");
	SetWindowLeft(100);
	SetWindowTop(100);
	SetWindowWidth(600);
	SetWindowHeight(400);
	SetLeftPanelPath("/");
	SetRightPanelPath("/");
	SetTerminalWindow("Genesis Terminal");
}
void WindowAttributesPickle::SetWindowPos(const wxString& window, const wxPoint& pos)
{
    SetWindowLeft(window, pos.x);
    SetWindowTop(window, pos.y);
}