diff --git a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
index 59fa42eb7..32bc99594 100644
--- a/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
+++ b/aegisub/build/aegisub_vs2008/aegisub_vs2008.vcproj
@@ -621,14 +621,6 @@
RelativePath="..\..\src\base_grid.h"
>
-
-
-
-
diff --git a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj
index 90c6cd304..079f5e217 100644
--- a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj
+++ b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj
@@ -94,7 +94,6 @@
-
@@ -270,7 +269,6 @@
-
diff --git a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters
index e29115b59..1ad000a0f 100644
--- a/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters
+++ b/aegisub/build/msbuild/Aegisub/Aegisub.vcxproj.filters
@@ -228,9 +228,6 @@
Commands
-
- Controls
-
Config
@@ -737,9 +734,6 @@
Automation
-
- Controls
-
Commands
diff --git a/aegisub/src/Makefile b/aegisub/src/Makefile
index 90110b241..5b39dd04c 100644
--- a/aegisub/src/Makefile
+++ b/aegisub/src/Makefile
@@ -146,7 +146,6 @@ SRC += \
auto4_base.cpp \
avisynth_wrap.cpp \
base_grid.cpp \
- browse_button.cpp \
charset_conv.cpp \
charset_detect.cpp \
colorspace.cpp \
diff --git a/aegisub/src/browse_button.cpp b/aegisub/src/browse_button.cpp
deleted file mode 100644
index ada9bdd89..000000000
--- a/aegisub/src/browse_button.cpp
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) 2007, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-//
-// $Id$
-
-/// @file browse_button.cpp
-/// @brief Push-button that opens a file browsing dialogue and sets value of a text edit when user confirms
-/// @ingroup custom_control
-///
-
-
-///////////
-// Headers
-#include "config.h"
-
-#ifndef AGI_PRE
-#include
-#include
-#include // Keep this last so wxDirDialog is set.
-#endif
-
-#include "browse_button.h"
-#include "standard_paths.h"
-#include "utils.h"
-
-
-/// @brief Constructor
-/// @param parent
-/// @param id
-/// @param text
-/// @param _type
-/// @param position
-/// @param size
-///
-BrowseButton::BrowseButton(wxWindow *parent,int id,wxString text,BrowseType _type,wxPoint position,wxSize size)
-: wxButton (parent,id,text == wxString("") ? wxString(_("Browse...")) : text,position,size)
-{
- type = _type;
- ctrl[0] = NULL;
- ctrl[1] = NULL;
- Connect(GetId(),wxEVT_COMMAND_BUTTON_CLICKED,wxCommandEventHandler(BrowseButton::OnPressed));
-}
-
-
-
-/// @brief Bind
-/// @param control
-/// @param pos
-///
-void BrowseButton::Bind(wxTextCtrl *control,int pos) {
- ctrl[pos] = control;
-}
-
-
-
-/// @brief Pressed
-/// @param event
-///
-void BrowseButton::OnPressed(wxCommandEvent &event) {
- // Folder
- if (type == BROWSE_FOLDER) {
- // For some reason I can't make this work on Mac... -jfs
- wxString def = StandardPaths::DecodePathMaybeRelative(ctrl[0]->GetValue(), "?user/");
- wxDirDialog dlg(0, _("Please choose the folder:"), def);
- if (dlg.ShowModal() == wxID_OK) {
- wxString dir = StandardPaths::EncodePath(dlg.GetPath());
- if (dir != "") ctrl[0]->SetValue(dir);
- }
- }
-
- // File
- else if (type == BROWSE_FILE) {
- }
-
- // Font
- else if (type == BROWSE_FONT) {
- wxFont font;
- long size;
- ctrl[1]->GetValue().ToLong(&size);
- font.SetFaceName(ctrl[0]->GetValue());
- font.SetPointSize(size);
- font = wxGetFontFromUser(NULL,font);
- if (font.IsOk()) {
- ctrl[0]->SetValue(font.GetFaceName());
- ctrl[1]->SetValue(wxString::Format("%i",font.GetPointSize()));
- }
- }
-}
-
-
-
-
diff --git a/aegisub/src/browse_button.h b/aegisub/src/browse_button.h
deleted file mode 100644
index 7e2387c5c..000000000
--- a/aegisub/src/browse_button.h
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright (c) 2007, Rodrigo Braz Monteiro
-// All rights reserved.
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// * Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above copyright notice,
-// this list of conditions and the following disclaimer in the documentation
-// and/or other materials provided with the distribution.
-// * Neither the name of the Aegisub Group nor the names of its contributors
-// may be used to endorse or promote products derived from this software
-// without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
-// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-// POSSIBILITY OF SUCH DAMAGE.
-//
-// Aegisub Project http://www.aegisub.org/
-//
-// $Id$
-
-/// @file browse_button.h
-/// @see browse_button.cpp
-/// @ingroup custom_control
-///
-
-
-
-
-////////////
-// Includes
-#ifndef AGI_PRE
-#include
-#include
-#endif
-
-
-/// DOCME
-enum BrowseType {
-
- /// DOCME
- BROWSE_FILE,
-
- /// DOCME
- BROWSE_FOLDER,
-
- /// DOCME
- BROWSE_FONT
-};
-
-
-
-/// DOCME
-/// @class BrowseButton
-/// @brief DOCME
-///
-/// DOCME
-class BrowseButton : public wxButton {
-private:
-
- /// DOCME
- wxTextCtrl *ctrl[2];
-
- /// DOCME
- BrowseType type;
-
- void OnPressed(wxCommandEvent &event);
-
-public:
- BrowseButton(wxWindow *parent,int id=-1,wxString text="",BrowseType type=BROWSE_FILE,wxPoint position=wxDefaultPosition,wxSize size=wxDefaultSize);
- void Bind(wxTextCtrl *control,int pos=0);
-};
-
-
diff --git a/aegisub/src/preferences.cpp b/aegisub/src/preferences.cpp
index 0c0ee5ee8..ff2cebe9c 100644
--- a/aegisub/src/preferences.cpp
+++ b/aegisub/src/preferences.cpp
@@ -22,29 +22,33 @@
#ifndef AGI_PRE
#include
+#include
#include
#include
+#include
#include
+#include
#include
#include
#include
#include
#include
+#include
#endif
#include
+#include "preferences.h"
+
#include "colour_button.h"
#include "compat.h"
-#include "libresrc/libresrc.h"
-#include "preferences.h"
-#include "main.h"
#include "include/aegisub/audio_player.h"
#include "include/aegisub/audio_provider.h"
#include "include/aegisub/subtitles_provider.h"
-#include "video_provider_manager.h"
-
+#include "libresrc/libresrc.h"
+#include "main.h"
#include "preferences_base.h"
+#include "video_provider_manager.h"
/// General preferences page
General::General(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("General")) {
@@ -145,14 +149,12 @@ Video::Video(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _(
/// Interface preferences page
Interface::Interface(wxTreebook *book, Preferences *parent): OptionPage(book, parent, _("Interface")) {
wxFlexGridSizer *grid = PageSizer(_("Subtitle Grid"));
- OptionBrowse(grid, _("Font face"), BROWSE_FONT, "Subtitle/Grid/Font Face");
- OptionAdd(grid, _("Font size"), "Subtitle/Grid/Font Size", 3, 42);
+ OptionFont(grid, "Subtitle/Grid/");
OptionAdd(grid, _("Hide overrides symbol"), "Subtitle/Grid/Hide Overrides Char");
wxFlexGridSizer *edit_box = PageSizer(_("Edit Box"));
- OptionBrowse(edit_box, _("Font face"), BROWSE_FONT, "Subtitle/Edit Box/Font Face");
- OptionAdd(edit_box, _("Font size"), "Subtitle/Edit Box/Font Size", 3, 42);
+ OptionFont(edit_box, "Subtitle/Edit Box/");
SetSizerAndFit(sizer);
}
@@ -245,13 +247,13 @@ Backup::Backup(wxTreebook *book, Preferences *parent): OptionPage(book, parent,
wxFlexGridSizer *save = PageSizer(_("Automatic Save"));
OptionAdd(save, _("Enable"), "App/Auto/Backup");
CellSkip(save);
- OptionAdd(save, _("Interval in seconds."), "App/Auto/Save Every Seconds");
- OptionBrowse(save, _("Path"), BROWSE_FOLDER, "Path/Auto/Save");
+ OptionAdd(save, _("Interval in seconds"), "App/Auto/Save Every Seconds");
+ OptionBrowse(save, _("Path"), "Path/Auto/Save");
wxFlexGridSizer *backup = PageSizer(_("Automatic Backup"));
- CellSkip(backup);
OptionAdd(backup, _("Enable"), "App/Auto/Backup");
- OptionBrowse(backup, _("Path"), BROWSE_FOLDER, "Path/Auto/Backup");
+ CellSkip(backup);
+ OptionBrowse(backup, _("Path"), "Path/Auto/Backup");
SetSizerAndFit(sizer);
}
@@ -326,7 +328,7 @@ Advanced_Audio::Advanced_Audio(wxTreebook *book, Preferences *parent): OptionPag
wxArrayString ct_choice(3, ct_arr);
OptionChoice(cache, _("Cache type"), ct_choice, "Audio/Cache/Type");
- OptionBrowse(cache, _("Path"), BROWSE_FOLDER, "Audio/Cache/HD/Location");
+ OptionBrowse(cache, _("Path"), "Audio/Cache/HD/Location");
OptionAdd(cache, _("File name"), "Audio/Cache/HD/Name");
wxFlexGridSizer *spectrum = PageSizer(_("Spectrum"));
diff --git a/aegisub/src/preferences.h b/aegisub/src/preferences.h
index 01cdcb601..1a93fdcf8 100644
--- a/aegisub/src/preferences.h
+++ b/aegisub/src/preferences.h
@@ -22,13 +22,13 @@
#ifndef AGI_PRE
#include