Ejemplo n.º 1
0
GLPrefsMgr::GLPrefsMgr
	(
	JBoolean* isNew
	)
	:
   JXPrefsManager(kCurrentPrefsFileVersion, kJTrue)
{
	*isNew = JPrefsManager::UpgradeData();
	JXGetChooseSaveFile()->SetPrefInfo(this, kChooseSaveFilePrefsID);
	JXGetChooseSaveFile()->JPrefObject::ReadPrefs();
}
void
GMailPrefsDialog::Receive
	(
	JBroadcaster*	sender,
	const Message&	message
	)
{
	if (sender == itsHelpButton && message.Is(JXButton::kPushed))
		{
		(JXGetHelpManager())->ShowSection(kGPrefsHelpName);
		}
	else if (sender == itsShowSenderString && message.Is(JXCheckbox::kPushed))
		{
		const JXCheckbox::Pushed* info =
			dynamic_cast<const JXCheckbox::Pushed*>(&message);
		assert(info != NULL);
		AdjustForSenderString(info->IsChecked());
		}
	else if (sender == itsAutoQuote && message.Is(JXCheckbox::kPushed))
		{
		const JXCheckbox::Pushed* info =
			dynamic_cast<const JXCheckbox::Pushed*>(&message);
		assert(info != NULL);
		AdjustForQuotedReply(info->IsChecked());
		}
	else if (sender == itsFilterButton && message.Is(JXButton::kPushed))
		{
		JString fullname;
		if (JXGetChooseSaveFile()->ChooseFile("","",&fullname))
			{
			JString name	= GGetRelativeToHome(fullname);
			itsFilterFileInput->SetText(name);
			}
		}
	else if (sender == itsInboxButton && message.Is(JXButton::kPushed))
		{
		JString fullname;
		if (JXGetChooseSaveFile()->ChooseFile("","",&fullname))
			{
			JString name	= GGetRelativeToHome(fullname);
			itsDefaultInbox->SetText(name);
			}
		}
	else
		{
		JXDialogDirector::Receive(sender, message);
		}
}
void
GPrefsMgr::WriteChooseSaveDialogPrefs()
{
	std::ostringstream data;
	JXGetChooseSaveFile()->WriteSetup(data);
	SetData(kChooseSaveDialogPrefsID, data);
}
void
GPMPrefsManager::SaveAllBeforeDestruct()
{
	(JXGetChooseSaveFile())->JPrefObject::WritePrefs();

	SetData(kGPMProgramVersionID, GPMGetVersionNumberStr());

	SaveToDisk();
}
GPMPrefsManager::GPMPrefsManager
	(
	JBoolean* isNew
	)
	:
	JXPrefsManager(kCurrentPrefsFileVersion, kJTrue)
{
	*isNew = JPrefsManager::UpgradeData();

	JXChooseSaveFile* csf = JXGetChooseSaveFile();
	csf->SetPrefInfo(this, kGPMgCSFSetupID);
	csf->JPrefObject::ReadPrefs();
}
void
CBSearchTextDialog::AddSearchFiles()
{
	JPtrArray<JString> fileList(JPtrArrayT::kDeleteAll);
	if ((JXGetChooseSaveFile())->ChooseFiles("", NULL, &fileList))
		{
		const JSize count = fileList.GetElementCount();
		for (JIndex i=1; i<=count; i++)
			{
			itsFileList->AddFile(*(fileList.NthElement(i)));
			}
		}
}
void
GPrefsMgr::ReadChooseSaveDialogPrefs()
{
	if (IDValid(kChooseSaveDialogPrefsID))
		{
		std::string data;
		JBoolean ok = GetData(kChooseSaveDialogPrefsID, &data);
		assert( ok );

		std::istringstream dataStream(data);

		JXGetChooseSaveFile()->ReadSetup(dataStream);
		}
}
JBoolean
SVNWDManager::NewBrowser
	(
	SVNMainDirector** dir
	)
{
	JString path;
	if ((JXGetChooseSaveFile())->ChooseRWPath("", JGetString(kNewBrowserInstrID),
											  NULL, &path))
		{
		*dir = OpenDirectory(path);
		return kJTrue;
		}
	else
		{
		*dir = NULL;
		return kJFalse;
		}
}
Ejemplo n.º 9
0
GLPrefsMgr::~GLPrefsMgr()
{
	JXGetChooseSaveFile()->JPrefObject::WritePrefs();
	SetData(kProgramVersionID, JGetString("VERSION"));
	SaveToDisk();
}