Fonts collector will now default collection to same folder as script (Set to "?script" on config.dat)

Originally committed to SVN as r82.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-20 22:06:38 +00:00
parent 224e22b365
commit d826160abf
4 changed files with 14 additions and 3 deletions

View file

@ -30,6 +30,7 @@ Please visit http://aegisub.net to download latest version
- Fixed bug related to tag cycling, which would reset grid, move video and force a refresh of everything (slow, and could undo uncommited changes) (AMZ)
- Fixed some bugs related to inserting overrides via the buttons over the edit box (AMZ)
- Implemented Redo (AMZ)
- Fonts collector will now default collection to same folder as script (Set to "?script" on config.dat) (AMZ)
= 1.09 beta - 2006.01.16 ===========================

View file

@ -56,7 +56,12 @@ DialogFontsCollector::DialogFontsCollector(wxWindow *parent)
: wxDialog(parent,-1,_("Fonts Collector"),wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE)
{
// Destination box
DestBox = new wxTextCtrl(this,-1,Options.AsText(_T("Fonts Collector Destination")),wxDefaultPosition,wxSize(250,20),0);
wxString dest = Options.AsText(_T("Fonts Collector Destination"));
if (dest == _T("?script")) {
wxFileName filename(AssFile::top->filename);
dest = filename.GetPath();
}
DestBox = new wxTextCtrl(this,-1,dest,wxDefaultPosition,wxSize(250,20),0);
BrowseButton = new wxButton(this,BROWSE_BUTTON,_("&Browse..."));
wxSizer *DestBottomSizer = new wxBoxSizer(wxHORIZONTAL);
wxStaticText *DestLabel = new wxStaticText(this,-1,_("Choose the folder where the fonts will be collected to.\nIt will be created if it doesn't exist."));
@ -153,7 +158,12 @@ void DialogFontsCollector::OnStart(wxCommandEvent &event) {
worker->Run();
// Set options
Options.SetText(_T("Fonts Collector Destination"),foldername);
wxString dest = foldername;
wxFileName filename(AssFile::top->filename);
if (filename.GetPath() == dest) {
dest = _T("?script");
}
Options.SetText(_T("Fonts Collector Destination"),dest);
Options.Save();
// Set buttons

View file

@ -118,7 +118,7 @@ void OptionsManager::LoadDefaults() {
SetBool(_T("Highlight subs in frame"),true);
SetText(_T("Fonts Collector Destination"),AegisubApp::folderName + _T("fonts"));
SetText(_T("Fonts Collector Destination"),_T("?script"));
SetBool(_T("Threaded Video"),false);
SetInt(_T("Avisynth MemoryMax"),64);

Binary file not shown.