forked from mia/Aegisub
Kill AegiFloatToString and AegiIntegerToString
This commit is contained in:
parent
ed7151a7a5
commit
151b1cb6ac
3 changed files with 2 additions and 12 deletions
|
@ -132,7 +132,7 @@ static void add_with_label(wxSizer *sizer, wxWindow *parent, wxString const& lab
|
||||||
}
|
}
|
||||||
|
|
||||||
static wxSpinCtrl *spin_ctrl(wxWindow *parent, float value, int max_value) {
|
static wxSpinCtrl *spin_ctrl(wxWindow *parent, float value, int max_value) {
|
||||||
return new wxSpinCtrl(parent, -1, AegiFloatToString(value), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 0, max_value, value);
|
return new wxSpinCtrl(parent, -1, wxString::Format("%g", value), wxDefaultPosition, wxSize(60, -1), wxSP_ARROW_KEYS, 0, max_value, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static wxTextCtrl *num_text_ctrl(wxWindow *parent, double value, bool allow_negative, wxSize size = wxSize(70, 20)) {
|
static wxTextCtrl *num_text_ctrl(wxWindow *parent, double value, bool allow_negative, wxSize size = wxSize(70, 20)) {
|
||||||
|
@ -161,7 +161,7 @@ DialogStyleEditor::DialogStyleEditor(wxWindow *parent, AssStyle *style, agi::Con
|
||||||
SetIcon(GETICON(style_toolbutton_16));
|
SetIcon(GETICON(style_toolbutton_16));
|
||||||
|
|
||||||
// Prepare control values
|
// Prepare control values
|
||||||
wxString EncodingValue = AegiIntegerToString(style->encoding);
|
wxString EncodingValue = std::to_wstring(style->encoding);
|
||||||
wxString alignValues[9] = { "7", "8", "9", "4", "5", "6", "1", "2", "3" };
|
wxString alignValues[9] = { "7", "8", "9", "4", "5", "6", "1", "2", "3" };
|
||||||
wxArrayString fontList = wxFontEnumerator::GetFacenames();
|
wxArrayString fontList = wxFontEnumerator::GetFacenames();
|
||||||
fontList.Sort();
|
fontList.Sort();
|
||||||
|
|
|
@ -65,14 +65,6 @@
|
||||||
#include <libaegisub/util_osx.h>
|
#include <libaegisub/util_osx.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxString AegiFloatToString(double value) {
|
|
||||||
return wxString::Format("%g",value);
|
|
||||||
}
|
|
||||||
|
|
||||||
wxString AegiIntegerToString(int value) {
|
|
||||||
return wxString::Format("%i",value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// @brief There shall be no kiB, MiB stuff here Pretty reading of size
|
/// @brief There shall be no kiB, MiB stuff here Pretty reading of size
|
||||||
wxString PrettySize(int bytes) {
|
wxString PrettySize(int bytes) {
|
||||||
const char *suffix[] = { "", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
const char *suffix[] = { "", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" };
|
||||||
|
|
|
@ -50,8 +50,6 @@
|
||||||
class wxMouseEvent;
|
class wxMouseEvent;
|
||||||
class wxWindow;
|
class wxWindow;
|
||||||
|
|
||||||
wxString AegiFloatToString(double value);
|
|
||||||
wxString AegiIntegerToString(int value);
|
|
||||||
wxString PrettySize(int bytes);
|
wxString PrettySize(int bytes);
|
||||||
|
|
||||||
void StatusTimeout(wxString const& msg, int ms = 10000);
|
void StatusTimeout(wxString const& msg, int ms = 10000);
|
||||||
|
|
Loading…
Reference in a new issue