Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp (revision 6193)
+++ src/src/app.cpp (working copy)
@@ -43,6 +43,10 @@
#include <sqplus.h>
+#ifdef __WXMSW__
+#include "portable.h"
+#endif
+
#ifndef __WXMSW__
#include "prefix.h" // binreloc
#endif
Index: src/src/portable.h
===================================================================
--- src/src/portable.h (revision 0)
+++ src/src/portable.h (revision 0)
@@ -0,0 +1,42 @@
+#ifndef QP_PORTABLE_H_
+#define QP_PORTABLE_H_
+
+namespace qp
+{
+
+class Portable
+{
+public:
+ Portable()
+ {
+ wxSetEnv(_T("APPDATA"), wxGetApp().GetAppPath() + _T("\\config"));
+ SupportTempFonts();
+ }
+
+ ~Portable()
+ {
+ SupportTempFonts(false);
+ }
+
+private:
+ void SupportTempFonts(bool enable = true)
+ {
+ wxString path = wxGetApp().GetAppPath() + _T("\\config\\fonts");
+ if (wxDir::Exists(path))
+ {
+ wxString font = wxFindFirstFile(path + _T("\\*.ttf"));
+ while (!font.IsEmpty())
+ {
+ if (enable) ::AddFontResource(font);
+ else ::RemoveFontResource(font);
+ font = wxFindNextFile();
+ }
+ ::SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);
+ }
+ }
+};
+
+static Portable portable;
+
+} // namespace qp
+#endif // QP_PORTABLE_H_
[attachment deleted by admin]