From 67c01d11f670f9ee3d71fdd5111280a7e850499c Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Thu, 25 Oct 2012 08:27:14 -0700 Subject: [PATCH] Delete unfinished and unused stuff from libaegisub --- .../libaegisub_vs2008.vcproj | 20 --- aegisub/libaegisub/Makefile | 5 +- aegisub/libaegisub/common/path.cpp | 151 ------------------ aegisub/libaegisub/common/validator.cpp | 70 -------- aegisub/libaegisub/include/libaegisub/path.h | 112 ------------- .../libaegisub/include/libaegisub/validator.h | 79 --------- aegisub/libaegisub/unix/path.cpp | 73 --------- aegisub/libaegisub/windows/path_win.cpp | 110 ------------- aegisub/src/dialog_version_check.cpp | 1 + aegisub/src/main.cpp | 22 --- aegisub/src/main.h | 32 ---- 11 files changed, 2 insertions(+), 673 deletions(-) delete mode 100644 aegisub/libaegisub/common/path.cpp delete mode 100644 aegisub/libaegisub/common/validator.cpp delete mode 100644 aegisub/libaegisub/include/libaegisub/path.h delete mode 100644 aegisub/libaegisub/include/libaegisub/validator.h delete mode 100644 aegisub/libaegisub/unix/path.cpp delete mode 100644 aegisub/libaegisub/windows/path_win.cpp diff --git a/aegisub/build/libaegisub_vs2008/libaegisub_vs2008.vcproj b/aegisub/build/libaegisub_vs2008/libaegisub_vs2008.vcproj index c351d3029..5b7e12ffd 100644 --- a/aegisub/build/libaegisub_vs2008/libaegisub_vs2008.vcproj +++ b/aegisub/build/libaegisub_vs2008/libaegisub_vs2008.vcproj @@ -319,10 +319,6 @@ RelativePath="..\..\libaegisub\common\option_visit.h" > - - @@ -331,10 +327,6 @@ RelativePath="..\..\libaegisub\common\util.cpp" > - - @@ -393,10 +385,6 @@ RelativePath="..\..\libaegisub\windows\log_win.cpp" > - - @@ -481,10 +469,6 @@ RelativePath="..\..\libaegisub\include\libaegisub\option_value.h" > - - @@ -509,10 +493,6 @@ RelativePath="..\..\libaegisub\include\libaegisub\util_win.h" > - - diff --git a/aegisub/libaegisub/Makefile b/aegisub/libaegisub/Makefile index 6af3cec9e..731649791 100644 --- a/aegisub/libaegisub/Makefile +++ b/aegisub/libaegisub/Makefile @@ -30,17 +30,14 @@ SRC += \ common/mru.cpp \ common/option.cpp \ common/option_visit.cpp \ - common/path.cpp \ common/keyframe.cpp \ common/util.cpp \ common/log.cpp \ common/thesaurus.cpp \ - common/validator.cpp \ common/vfr.cpp \ unix/util.cpp \ unix/access.cpp \ - unix/log.cpp \ - unix/path.cpp + unix/log.cpp ifeq (yes, $(BUILD_DARWIN)) SRC += osx/util.mm diff --git a/aegisub/libaegisub/common/path.cpp b/aegisub/libaegisub/common/path.cpp deleted file mode 100644 index 51f9b326b..000000000 --- a/aegisub/libaegisub/common/path.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2010-2011, Amar Takhar -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file path.cpp -/// @brief Common paths. -/// @ingroup libaegisub - -#include "../config.h" - -#ifndef LAGI_PRE -#include -#endif - -#include "libaegisub/path.h" - -#include "libaegisub/access.h" -#include "libaegisub/log.h" -#include "libaegisub/option.h" -#include "libaegisub/option_value.h" - -namespace agi { - -Path::Path(const std::string &file, const std::string& default_path) -: path_file(file) -, path_default(default_path) -, opt(new agi::Options(file, default_path, Options::FLUSH_SKIP)) -{ - opt->ConfigUser(); - LOG_D("agi/path") << "New Path object"; -} - -Path::~Path() { -} - - -std::string Path::Get(const char *name) { - std::string path; - try { - path = std::string(opt->Get(name)->GetString()); - } catch (OptionErrorNotFound&) { - throw PathErrorNotFound("Invalid path key"); - } - - Decode(path); - return path; -} - - -void Path::Set(const char *name, const std::string &path) { - std::string set(path); - - if (path[0] == 94) { - std::string tmp(path); - // Check that the used cookie exists. - Decode(tmp); - agi::acs::CheckDirWrite(path); - } - - try { - opt->Get(name)->SetString(set); - } catch (OptionErrorNotFound&) { - throw PathErrorNotFound("Invalid path key"); - } -} - - -void Path::ListGet(const char *name, std::vector &out) { - out = opt->Get(name)->GetListString(); -} - - -void Path::ListSet(const char *name, std::vector list) { - opt->Get(name)->SetListString(list); -} - - -void Path::Decode(std::string &path) { - if (path[0] != 94) // "^" - return; - try { - if (path.find("^CONFIG") == 0) { - path.replace(0, 7, Config()); - return; - } - - if (path.find("^USER") == 0) { - path.replace(0, 5, User()); - return; - } - - if (path.find("^DATA") == 0) { - path.replace(0, 5, Data()); - return; - } - - if (path.find("^DOC") == 0) { - path.replace(0, 4, Doc()); - return; - } - - if (path.find("^TEMP") == 0) { - path.replace(0, 5, Temp()); - return; - } - - if (path.find("^AUDIO") == 0) { - std::string path_str(opt->Get("Last/Audio")->GetString()); - Decode(path_str); - path.replace(0, 6, path_str); - return; - } - - if (path.find("^VIDEO") == 0) { - std::string path_str(opt->Get("Last/Video")->GetString()); - Decode(path_str); - path.replace(0, 6, path_str); - return; - } - - if (path.find("^SUBTITLE") == 0) { - std::string path_str(opt->Get("Last/Subtitle")->GetString()); - Decode(path_str); - path.replace(0, 5, path_str); - return; - } - - throw PathErrorInvalid("Invalid cookie used"); - - } catch (OptionErrorNotFound&) { - throw PathErrorInternal("Failed to find key in Decode"); - } -} - -void Path::Encode(std::string &path) { -} - - -} // namespace agi diff --git a/aegisub/libaegisub/common/validator.cpp b/aegisub/libaegisub/common/validator.cpp deleted file mode 100644 index 0fefa27f7..000000000 --- a/aegisub/libaegisub/common/validator.cpp +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2010, Amar Takhar -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file validator.cpp -/// @brief Input validation. -/// @ingroup libaegisub - -#include - -namespace agi { - -bool ValidAny::CheckType(std::string &value) { - return true; -} - -bool ValidAny::Check(std::string &value) { - return true; -} - - -bool ValidString::CheckType(std::string &value) { - return true; -} - -bool ValidString::Check(std::string &value) { - return CheckType(value); -} - - -bool ValidInt::CheckType(std::string &value) { - return true; -} - -bool ValidInt::Check(std::string &value) { - return CheckType(value); -} - -bool ValidBool::CheckType(std::string &value) { - return true; -} - -bool ValidBool::Check(std::string &value) { - return CheckType(value); -} - -bool ValidColour::Check(std::string &value) { - - if (ValidString::CheckType(value)) { - // check if it's a valid colour - return 1; - } - return 0; -} - - -} // namespace agi - diff --git a/aegisub/libaegisub/include/libaegisub/path.h b/aegisub/libaegisub/include/libaegisub/path.h deleted file mode 100644 index 82f5064b7..000000000 --- a/aegisub/libaegisub/include/libaegisub/path.h +++ /dev/null @@ -1,112 +0,0 @@ -// Copyright (c) 2010-2011, Amar Takhar -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file path.h -/// @brief Common paths. -/// @ingroup libaegisub - -#include -#include - -namespace agi { - -DEFINE_BASE_EXCEPTION_NOINNER(PathError, Exception) -DEFINE_SIMPLE_EXCEPTION_NOINNER(PathErrorNotFound, PathError, "path/not_found") -DEFINE_SIMPLE_EXCEPTION_NOINNER(PathErrorInvalid, PathError, "path/invalid") -DEFINE_SIMPLE_EXCEPTION_NOINNER(PathErrorInternal, PathError, "path") - -class Options; - -/// @class Path -// Internal representation of all paths in aegisub. -class Path { -public: - // For unit testing. - friend class PathTest; - - /// Constructor - Path(const std::string &file, const std::string& default_path); - - /// Destructor - ~Path(); - - /// @brief Get a path, this is automatically decoded. - /// @param name Path to get - /// @return Full path name in UTF-8 - std::string Get(const char *name); - - /// @brief Set a path, this will be automaticalled encoded if a cookie matches. - /// @param[in] name Path name to save to. - void Set(const char *name, const std::string &path); - - /// @brief Set a list of paths - /// @param name Path name. - /// @param out[out] Map to load list into - void ListGet(const char *name, std::vector &out); - - /// @brief Set a list of paths. - /// @param name Path name. - /// @param list List to set. - void ListSet(const char *name, std::vector list); - - /// @brief Get the default 'open' directory when no alternative is available. - /// @return Directory - /// This returns several different values based on OS: - /// Windows: Documents folder - /// OS X: ~/Documents - /// Unix: ~ or Documents folder if set in the environment - std::string Default(); - - /// @brief Decode a path - /// @param path Decode a path in-place. - void Decode(std::string &path); - - /// Configuration directory - static std::string Config(); - -private: - /// Location of path config file. - const std::string path_file; - - /// Internal default config. - const std::string path_default; - - /// @brief Encode a path. - /// @param path Encode a path in-place. - /// ^CONFIG - Configuration directory (not changable) - /// ^USER - Users home directory - /// ^DATA - Aegisub data files - /// ^VIDEO - Last opened video directory - /// ^SUBTITLE - Last opened subtitle directory - /// ^AUDIO - Last opened audio directory - void Encode(std::string &path); - - /// Options object. - scoped_ptr opt; - - /// @brief Locale files - /// @return Locale location - /// This is directly assessibly as the Locale directory will never change on any platform. - std::string Locale(); - -protected: - std::string Data(); ///< Shared resources - std::string Doc(); ///< Documents - std::string User(); ///< User config directory - std::string Temp(); ///< Temporary storage -}; - -} // namespace agi diff --git a/aegisub/libaegisub/include/libaegisub/validator.h b/aegisub/libaegisub/include/libaegisub/validator.h deleted file mode 100644 index 8734025e5..000000000 --- a/aegisub/libaegisub/include/libaegisub/validator.h +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) 2010, Amar Takhar -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file validator.h -/// @brief Input validation. -/// @ingroup libaegisub - -#include - -namespace agi { - -class Validator { -public: - /// Types supported. - enum ValidType { - Type_Any = 0, ///< Any (should be used instead of "String" - /// to accept any value for code clarity.) - Type_String = 1, ///< String - Type_Int = 2, ///< Integer - Type_Bool = 3, ///< Bool - Type_Colour = 4 ///< Colour - }; - - /// @brief Check value type. - /// @param value Value - /// @return true/false - /// - /// If the value type is "int" or "string" it will return true/false based on this alone. - /// This should validate against full values or single characters to make it suitable for input boxes. - virtual bool CheckType(std::string &value)=0; - - /// @brief Check value including constraints. - /// @param value Value - /// @return true/false - /// - /// Check value including bounds checking. - /// CheckType() should always be the first function called. - virtual bool Check(std::string &value)=0; - - /// @brief Return validation type. - /// @return Type - virtual ValidType GetType()=0; -}; - - -#define VALID_BASE(type_name) \ - class Valid##type_name : public Validator { \ - public: \ - ValidType GetType() { return Type_##type_name; } \ - bool CheckType(std::string &value); \ - virtual bool Check(std::string &value); \ - }; - -VALID_BASE(Any) -VALID_BASE(String) -VALID_BASE(Int) -VALID_BASE(Bool) - - -class ValidColour: public ValidString { -public: - ValidType GetType() { return Type_Colour; } - virtual bool Check(std::string &value); -}; - -} // namespace agi diff --git a/aegisub/libaegisub/unix/path.cpp b/aegisub/libaegisub/unix/path.cpp deleted file mode 100644 index e30aeadce..000000000 --- a/aegisub/libaegisub/unix/path.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2010-2011, Amar Takhar -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file path.cpp -/// @brief Common paths. -/// @ingroup libaegisub - - -#include "config.h" - -#ifndef LAGI_PRE -#include -#include - -#include -#include -#endif - -#include - - -namespace agi { - - -std::string home() { - char *ehome; - ehome = getenv("HOME"); - if (ehome == NULL) { - printf("The HOME environment variable must be set\n"); - exit(1); - } - return ehome; -} - - -std::string Path::Data() { - return P_DATA; -} - -std::string Path::Doc() { - return P_DOC; -} - -std::string Path::User() { - return home(); -} - -std::string Path::Locale() { - return P_LOCALE; -} - -std::string Path::Config() { - return home() + "/.aegisub/"; -} - -std::string Path::Temp() { - return "/tmp/"; -} - -} // namespace agi diff --git a/aegisub/libaegisub/windows/path_win.cpp b/aegisub/libaegisub/windows/path_win.cpp deleted file mode 100644 index 3a9f79163..000000000 --- a/aegisub/libaegisub/windows/path_win.cpp +++ /dev/null @@ -1,110 +0,0 @@ -// Copyright (c) 2011, Niels Martin Hansen -// -// Permission to use, copy, modify, and distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -// ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -// OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// -// $Id$ - -/// @file path.cpp -/// @brief Common paths. -/// @ingroup libaegisub - -#ifndef LAGI_PRE -#include -#endif - -#include - -#include -#include - - -namespace { -#include -#include - -std::string WinGetFolderPath(int folder) { - wchar_t path[MAX_PATH+1] = {0}; - HRESULT res = SHGetFolderPathW( - 0, // hwndOwner - folder, // nFolder - 0, // hToken - 0, // dwFlags - path // pszPath - ); - if (FAILED(res)) - throw agi::PathErrorInternal("SHGetFolderPath() failed"); //< @fixme error message? - - return agi::charset::ConvertW(path); -} - -std::string get_install_path() { - static std::string install_path; - if (install_path.empty()) { - // Excerpt from : - // lpCmdLine [in] - // If this parameter is an empty string the function returns - // the path to the current executable file. - int argc; - LPWSTR *argv = CommandLineToArgvW(L"", &argc); - - wchar_t path[MAX_PATH+1] = {0}; - wchar_t *fn; - DWORD res = GetFullPathNameW(argv[0], MAX_PATH, path, &fn); - LocalFree(argv); - - if (res > 0 && GetLastError() == 0) { - *fn = '\0'; // fn points to filename part of path, set an end marker there - install_path = agi::charset::ConvertW(std::wstring(path)); - } else { - throw agi::PathErrorInternal(agi::util::ErrorString(GetLastError())); - } - } - - return install_path; -} - -} - - -namespace agi { - -std::string Path::Data() { - return get_install_path(); -} - -std::string Path::Doc() { - return Data() + "docs\\"; -} - -std::string Path::User() { - return WinGetFolderPath(CSIDL_PERSONAL); -} - -std::string Path::Locale() { - return Data() + "locale\\"; -} - -std::string Path::Config() { - return WinGetFolderPath(CSIDL_APPDATA) + "Aegisub3"; - /// @fixme should get version number in a more dynamic manner -} - -std::string Path::Temp() { - wchar_t path[MAX_PATH+1] = {0}; - if (GetTempPath(MAX_PATH, path) == 0) - throw PathErrorInternal(util::ErrorString(GetLastError())); - else - return charset::ConvertW(path); -} - -} // namespace agi diff --git a/aegisub/src/dialog_version_check.cpp b/aegisub/src/dialog_version_check.cpp index 40a76653e..903f16ff8 100644 --- a/aegisub/src/dialog_version_check.cpp +++ b/aegisub/src/dialog_version_check.cpp @@ -80,6 +80,7 @@ #include "version.h" #include +#include #ifdef __APPLE__ #include diff --git a/aegisub/src/main.cpp b/aegisub/src/main.cpp index 445b319d1..b6607886e 100644 --- a/aegisub/src/main.cpp +++ b/aegisub/src/main.cpp @@ -82,7 +82,6 @@ namespace config { agi::Options *opt = 0; agi::MRUManager *mru = 0; - agi::Path *path = 0; } @@ -190,9 +189,6 @@ bool AegisubApp::OnInit() { wxMessageBox("Configuration file is invalid. Error reported:\n" + lagi_wxString(err.GetMessage()), "Error"); } - std::string path(agi::Path::Config()); - config::path = new agi::Path(path.append("path.json"), GET_DEFAULT_CONFIG(default_path)); - // Init commands. cmd::init_builtin_commands(); @@ -305,7 +301,6 @@ int AegisubApp::OnExit() { delete config::opt; delete config::mru; hotkey::clear(); - delete config::path; cmd::clear(); delete global_scripts; @@ -363,7 +358,6 @@ void AegisubApp::OnUnhandledException() { UnhandledExeception(false); } - /// @brief Called during a fatal exception. void AegisubApp::OnFatalException() { UnhandledExeception(true); @@ -389,8 +383,6 @@ void AegisubApp::HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEven #undef SHOW_EXCEPTION } - - #if wxUSE_STACKWALKER == 1 /// @brief Called at the start of walking the stack. /// @param cause cause of the crash. @@ -421,7 +413,6 @@ StackWalker::StackWalker(wxString cause) { } } - /// @brief Callback to format a single frame /// @param frame frame to parse. /// @@ -444,12 +435,9 @@ void StackWalker::OnStackFrame(const wxStackFrame &frame) { } } - /// @brief Called at the end of walking the stack. StackWalker::~StackWalker() { - if ((crash_text->IsOpened()) && (crash_xml->IsOpened())) { - crash_text->Write("End of stack dump.\n"); crash_text->Write("----------------------------------------\n\n"); @@ -463,10 +451,6 @@ StackWalker::~StackWalker() { } #endif - -/// @brief Call main loop -/// @return -/// int AegisubApp::OnRun() { wxString error; @@ -510,13 +494,7 @@ int AegisubApp::OnRun() { return 1; } -//////////////// -// Apple events #ifdef __WXMAC__ - -/// @brief DOCME -/// @param filename -/// void AegisubApp::MacOpenFile(const wxString &filename) { if (frame != NULL && !filename.empty()) { frame->LoadSubtitles(filename); diff --git a/aegisub/src/main.h b/aegisub/src/main.h index c926eed41..1709ec3e7 100644 --- a/aegisub/src/main.h +++ b/aegisub/src/main.h @@ -45,13 +45,11 @@ #include #include #include -#include #ifndef wxUSE_EXCEPTIONS #error wxWidgets is compiled without exceptions support. Aegisub requires exceptions support in wxWidgets to run safely. #endif - class FrameMain; class PluginManager; @@ -59,10 +57,8 @@ class PluginManager; namespace config { extern agi::Options *opt; ///< Options extern agi::MRUManager *mru; ///< Most Recently Used - extern agi::Path *path; ///< Paths } -/// DOCME namespace Automation4 { class AutoloadScriptManager; } /// Macro to get OptionValue object. @@ -74,23 +70,7 @@ namespace Automation4 { class AutoloadScriptManager; } /// Macro to subscribe to OptionValue changes #define OPT_SUB(x, ...) config::opt->Get(x)->Subscribe(__VA_ARGS__) -/// Macro to unsubscribe from OptionValue changes -#define OPT_UNSUB(x, ...) config::opt->Get(x)->Unsubscribe(__VA_ARGS__) - -/// Macro to get a path. -#define PATH_GET(x) AegisubApp::Get()->path->Get(x) - -/// Macro to set a path. -#define PATH_SET(x, y) AegisubApp::Get()->path->Set(x, y) - - -/// DOCME -/// @class AegisubApp -/// @brief DOCME -/// -/// DOCME class AegisubApp: public wxApp { - /// DOCME PluginManager *plugins; bool OnInit(); @@ -113,13 +93,8 @@ class AegisubApp: public wxApp { void HandleEvent(wxEvtHandler *handler, wxEventFunction func, wxEvent& event) const; public: - /// DOCME AegisubLocale locale; - - /// DOCME FrameMain *frame; - - /// DOCME Automation4::AutoloadScriptManager *global_scripts; #ifdef __WXMAC__ @@ -130,15 +105,8 @@ public: wxDECLARE_APP(AegisubApp); - #if wxUSE_STACKWALKER == 1 -/// @class StackWalker -/// @brief DOCME -/// -/// DOCME class StackWalker: public wxStackWalker { -private: - wxFile *crash_text; // FP to the crash text file. wxFile *crash_xml; // FP to the crash xml file.