Swapped "automation" and "view" menus, and added option to settings to auto-check for update on program start.

Originally committed to SVN as r738.
This commit is contained in:
Rodrigo Braz Monteiro 2007-01-07 23:14:21 +00:00
parent 85ca326bc9
commit 91ac4bef10
3 changed files with 18 additions and 12 deletions

View File

@ -85,12 +85,17 @@ DialogOptions::DialogOptions(wxWindow *parent)
{
wxSizer *genMainSizer = new wxBoxSizer(wxVERTICAL);
wxSizer *genSizer1 = new wxStaticBoxSizer(wxHORIZONTAL,generalPage,_("Startup"));
wxCheckBox *box1 = new wxCheckBox(generalPage,-1,_("Show Splash Screen"));
Bind(box1,_T("Show splash"));
wxCheckBox *box2 = new wxCheckBox(generalPage,-1,_("Show Tip of the Day"));
Bind(box2,_T("Tips enabled"));
genSizer1->Add(box1,1,wxALL,5);
genSizer1->Add(box2,1,wxALL,5);
wxSizer *genSizer4 = new wxFlexGridSizer(2,2,5,5);
wxCheckBox *box = new wxCheckBox(generalPage,-1,_("Show Splash Screen"));
Bind(box,_T("Show splash"));
genSizer4->Add(box,1,wxALL,0);
box = new wxCheckBox(generalPage,-1,_("Show Tip of the Day"));
Bind(box,_T("Tips enabled"));
genSizer4->Add(box,1,wxALL,0);
box = new wxCheckBox(generalPage,-1,_("Auto Check for Updates"));
Bind(box,_T("Auto check for updates"));
genSizer4->Add(box,1,wxALL,0);
genSizer1->Add(genSizer4,1,wxEXPAND|wxALL,5);
wxSizer *genSizer2 = new wxStaticBoxSizer(wxVERTICAL,generalPage,_("Limits for Levels and Recent Files"));
wxFlexGridSizer *genSizer3 = new wxFlexGridSizer(8,2,5,5);
wxString options[8] = { _T("Undo levels"), _T("Recent timecodes max"), _T("Recent keyframes max"), _T("Recent sub max"), _T("Recent vid max"), _T("Recent aud max"), _T("Recent find max"), _T("Recent replace max") };

View File

@ -386,6 +386,12 @@ void FrameMain::InitMenu() {
audioMenu->Append(RecentAudParent);
MenuBar->Append(audioMenu, _("&Audio"));
// Create Automation menu
automationMenu = new wxMenu();
AppendBitmapMenuItem (automationMenu,Menu_Tools_Automation, _("&Automation..."),_("Open automation manager"), wxBITMAP(automation_toolbutton));
automationMenu->AppendSeparator();
MenuBar->Append(automationMenu, _("&Automation"));
// Create view menu
viewMenu = new wxMenu();
AppendBitmapMenuItem(viewMenu,Menu_View_Language, _T("&Language..."), _("Select Aegisub interface language"), wxBITMAP(blank_button));
@ -398,12 +404,6 @@ void FrameMain::InitMenu() {
viewMenu->AppendRadioItem(Menu_View_Standard, _("Full view"), _("Display audio, video and subtitles"));
MenuBar->Append(viewMenu, _("Vie&w"));
// Create Automation menu
automationMenu = new wxMenu();
AppendBitmapMenuItem (automationMenu,Menu_Tools_Automation, _("&Automation..."),_("Open automation manager"), wxBITMAP(automation_toolbutton));
automationMenu->AppendSeparator();
MenuBar->Append(automationMenu, _("&Automation"));
// Create help menu
helpMenu = new wxMenu();
AppendBitmapMenuItem (helpMenu,Menu_Help_Contents, _("&Contents...\t") + Hotkeys.GetText(_T("Help")), _("Help topics"), wxBITMAP(contents_button));

View File

@ -168,6 +168,7 @@ void VariableData::ResetWith(wxString value) {
// Reads as an int
int VariableData::AsInt() const {
if (!value) throw _T("Null parameter");
if (type == VARDATA_BOOL) return (*value_bool)?1:0;
if (type == VARDATA_INT) return *value_int;
if (type == VARDATA_FLOAT) return (int)(*value_float);
throw _T("Wrong parameter type, should be int");