From d826160abfe5e3ea5e96b7c4a3fc27e5ceca52ff Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Mon, 20 Feb 2006 22:06:38 +0000 Subject: [PATCH] Fonts collector will now default collection to same folder as script (Set to "?script" on config.dat) Originally committed to SVN as r82. --- core/changelog.txt | 1 + core/fonts_collector.cpp | 14 ++++++++++++-- core/options.cpp | 2 +- docs/feature comparison.xls | Bin 29696 -> 29696 bytes 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/core/changelog.txt b/core/changelog.txt index 796edd137..f573ac708 100644 --- a/core/changelog.txt +++ b/core/changelog.txt @@ -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 =========================== diff --git a/core/fonts_collector.cpp b/core/fonts_collector.cpp index 4b59511b4..a81167735 100644 --- a/core/fonts_collector.cpp +++ b/core/fonts_collector.cpp @@ -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 diff --git a/core/options.cpp b/core/options.cpp index dbf295fa1..caf9ff284 100644 --- a/core/options.cpp +++ b/core/options.cpp @@ -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); diff --git a/docs/feature comparison.xls b/docs/feature comparison.xls index dda40d3692f97b535dff5e2747c20dffadca2edb..7358af049e2f158ba8fad33fe1cad8338b39db42 100644 GIT binary patch delta 3148 zcmZ8jYiv|S6h5wTdK6>xqu6nrL<7E2n1Vs zg!b4{5EUN?KNOMm{UH7_#u#D00B^5PEf9?tHD@? zSb+CtPQNW{{3&^QIaQnaN7lp~fcmY;_}0Wd$*ztyo8yTMsiHfAV)7~JU+n-4&Hz~b zFhE`bfU^Xkqb{}T&cboxRB9wFCW%;Tbbe5Xw$$kbgF!bYokH-beEthr5R*zK!+2{2 zq?K*0AhR-jR)fUk!gP&nlxqm?x0au?QKp!V(0CsxQWLNd6zLP%aT(Ffz$=TKN+V(! z;nS91#B#zvpuLx~RF->Tac+J@%*57wM`UAnek5;}MmI5Z6BF6wX~Zw{o$yl{zk={a z#|pw{W1t`+5N8)SO(vt2Oz%p{&zv=r-sd!9GgHv)G1@b#5}qz_!ozy6h2dLte%GXe z5&W+pDn7y`g~jnUit(}bX=6TZEJhns+D1xEeySt6@StW{Emublt~WBPiE}>wT-b;c zVpBwRs&#Q#h(xOA(Z#~e4BQT`M2>-*@+p5r4h>qn{L_JF z&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