forked from mia/Aegisub
Misc fixes for building on GCC
Originally committed to SVN as r697.
This commit is contained in:
parent
8d069ffad5
commit
326fbe8961
9 changed files with 16 additions and 14 deletions
|
@ -46,6 +46,7 @@ aegisub_SOURCES = \
|
|||
dialog_automation.cpp \
|
||||
dialog_colorpicker.cpp \
|
||||
dialog_export.cpp \
|
||||
dialog_fonts_collector.cpp \
|
||||
dialog_hotkeys.cpp \
|
||||
dialog_jumpto.cpp \
|
||||
dialog_options.cpp \
|
||||
|
@ -68,7 +69,6 @@ aegisub_SOURCES = \
|
|||
export_fixstyle.cpp \
|
||||
export_framerate.cpp \
|
||||
fft.cpp \
|
||||
fonts_collector.cpp \
|
||||
frame_main.cpp \
|
||||
frame_main_events.cpp \
|
||||
hilimod_textctrl.cpp \
|
||||
|
@ -78,6 +78,7 @@ aegisub_SOURCES = \
|
|||
main.cpp \
|
||||
md5.c \
|
||||
mkv_wrap.cpp \
|
||||
mythes.cxx \
|
||||
options.cpp \
|
||||
spellchecker.cpp \
|
||||
spellchecker_hunspell.cpp \
|
||||
|
|
|
@ -118,7 +118,7 @@ wxColour AssColor::GetWXColor() {
|
|||
|
||||
//////////////////////
|
||||
// Sets color from wx
|
||||
void AssColor::SetWXColor(wxColor &color) {
|
||||
void AssColor::SetWXColor(const wxColor &color) {
|
||||
r = color.Red();
|
||||
g = color.Green();
|
||||
b = color.Blue();
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
AssColor(wxColour &color);
|
||||
|
||||
wxColor GetWXColor(); // Return as a wxColor
|
||||
void SetWXColor(wxColor &color); // Sets from a wxColor
|
||||
void SetWXColor(const wxColor &color); // Sets from a wxColor
|
||||
void ParseASS(const wxString value); // Parse ASS-style color
|
||||
void ParseSSA(const wxString value); // Parse SSA-style color
|
||||
wxString GetASSFormatted(bool alpha,bool stripped=false,bool isStyle=false); // Gets color formated in ASS format
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace Automation4 {
|
|||
for (unsigned int i = 0; i < text.length(); i++) {
|
||||
int a, b, c, d;
|
||||
thedc.GetTextExtent(text[i], &a, &b, &c, &d);
|
||||
width += a + spacing;
|
||||
width += a + style->spacing;
|
||||
height = b > height ? b : height;
|
||||
descent = c > descent ? c : descent;
|
||||
extlead= d > extlead ? d : extlead;
|
||||
|
|
|
@ -109,8 +109,8 @@ namespace Automation4 {
|
|||
|
||||
const wxString& GetDescription() const;
|
||||
|
||||
virtual bool Validate(AssFile *subs, std::vector<int> &selected, int active) = 0;
|
||||
virtual void Process(AssFile *subs, std::vector<int> &selected, int active, wxWindow *progress_parent) = 0;
|
||||
virtual bool Validate(AssFile *subs, const std::vector<int> &selected, int active) = 0;
|
||||
virtual void Process(AssFile *subs, const std::vector<int> &selected, int active, wxWindow * const progress_parent) = 0;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -478,7 +478,7 @@ namespace Automation4 {
|
|||
lua_remove(L, -2);
|
||||
}
|
||||
|
||||
void LuaFeature::CreateIntegerArray(std::vector<int> &ints)
|
||||
void LuaFeature::CreateIntegerArray(const std::vector<int> &ints)
|
||||
{
|
||||
// create an array-style table with an integer vector in it
|
||||
// leave the new table on top of the stack
|
||||
|
@ -533,7 +533,7 @@ namespace Automation4 {
|
|||
lua_pop(L, 1);
|
||||
}
|
||||
|
||||
bool LuaFeatureMacro::Validate(AssFile *subs, std::vector<int> &selected, int active)
|
||||
bool LuaFeatureMacro::Validate(AssFile *subs, const std::vector<int> &selected, int active)
|
||||
{
|
||||
if (no_validate)
|
||||
return true;
|
||||
|
@ -557,7 +557,7 @@ namespace Automation4 {
|
|||
return result;
|
||||
}
|
||||
|
||||
void LuaFeatureMacro::Process(AssFile *subs, std::vector<int> &selected, int active, wxWindow *progress_parent)
|
||||
void LuaFeatureMacro::Process(AssFile *subs, const std::vector<int> &selected, int active, wxWindow * const progress_parent)
|
||||
{
|
||||
GetFeatureFunction(1); // 1 = processing function
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace Automation4 {
|
|||
void RegisterFeature();
|
||||
|
||||
void GetFeatureFunction(int functionid);
|
||||
void CreateIntegerArray(std::vector<int> &ints);
|
||||
void CreateIntegerArray(const std::vector<int> &ints);
|
||||
void ThrowError();
|
||||
};
|
||||
|
||||
|
@ -213,8 +213,8 @@ namespace Automation4 {
|
|||
static int LuaRegister(lua_State *L);
|
||||
virtual ~LuaFeatureMacro() { }
|
||||
|
||||
virtual bool Validate(AssFile *subs, std::vector<int> &selected, int active);
|
||||
virtual void Process(AssFile *subs, std::vector<int> &selected, int active, wxWindow *progress_parent);
|
||||
virtual bool Validate(AssFile *subs, const std::vector<int> &selected, int active);
|
||||
virtual void Process(AssFile *subs, const std::vector<int> &selected, int active, wxWindow * const progress_parent);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -236,7 +236,7 @@ nospin:
|
|||
if (hasspin) {
|
||||
return cw = new wxSpinCtrl(parent, -1, wxString::Format(_T("%d"), value), wxDefaultPosition, wxDefaultSize, min, max, value);
|
||||
} else {
|
||||
return cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0, IntTextValidator());
|
||||
return cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0); //, IntTextValidator());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -281,7 +281,7 @@ nospin:
|
|||
typedef wxValidator FloatTextValidator;
|
||||
wxControl *Create(wxWindow *parent)
|
||||
{
|
||||
return cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0, FloatTextValidator());
|
||||
return cw = new wxTextCtrl(parent, -1, text, wxDefaultPosition, wxDefaultSize, 0); //, FloatTextValidator());
|
||||
}
|
||||
|
||||
void ControlReadBack()
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
#include <wx/treebook.h>
|
||||
#endif
|
||||
#include "options.h"
|
||||
#include <wx/spinctrl.h>
|
||||
#include "frame_main.h"
|
||||
#include "main.h"
|
||||
#include "validators.h"
|
||||
|
|
Loading…
Reference in a new issue