Fixed incorrect localization that led to an error in 'Save' from tab menu.
This commit is contained in:
@@ -765,7 +765,7 @@ function debuggerCreateStackWindow()
|
||||
return true
|
||||
end)
|
||||
|
||||
local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
@@ -781,7 +781,7 @@ function debuggerCreateStackWindow()
|
||||
end
|
||||
|
||||
local function debuggerCreateWatchWindow()
|
||||
local watchCtrl = wx.wxListCtrl(frame, wx.wxID_ANY,
|
||||
local watchCtrl = wx.wxListCtrl(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wx.wxLC_REPORT + wx.wxLC_EDIT_LABELS)
|
||||
|
||||
@@ -871,7 +871,7 @@ local function debuggerCreateWatchWindow()
|
||||
event:Skip()
|
||||
end)
|
||||
|
||||
local notebook = wxaui.wxAuiNotebook(frame, wx.wxID_ANY,
|
||||
local notebook = wxaui.wxAuiNotebook(ide.frame, wx.wxID_ANY,
|
||||
wx.wxDefaultPosition, wx.wxDefaultSize,
|
||||
wxaui.wxAUI_NB_DEFAULT_STYLE + wxaui.wxAUI_NB_TAB_EXTERNAL_MOVE
|
||||
- wxaui.wxAUI_NB_CLOSE_ON_ACTIVE_TAB + wx.wxNO_BORDER)
|
||||
|
||||
@@ -667,7 +667,7 @@ function CreateEditor()
|
||||
local keycode = event:GetKeyCode()
|
||||
local mod = event:GetModifiers()
|
||||
local first, last = 0, notebook:GetPageCount()-1
|
||||
if keycode == wx.WXK_ESCAPE and frame:IsFullScreen() then
|
||||
if keycode == wx.WXK_ESCAPE and ide.frame:IsFullScreen() then
|
||||
ShowFullScreen(false)
|
||||
-- Ctrl-Home and Ctrl-End don't work on OSX with 2.9.5+; fix it
|
||||
elseif ide.osname == 'Macintosh' and ide.wxver >= "2.9.5"
|
||||
|
||||
@@ -5,7 +5,7 @@ local ide = ide
|
||||
|
||||
-- Pick some reasonable fixed width fonts to use for the editor
|
||||
local function setFont(style, config)
|
||||
return wx.wxFont(config.fontsize or size or 10, wx.wxFONTFAMILY_MODERN, style,
|
||||
return wx.wxFont(config.fontsize or 10, wx.wxFONTFAMILY_MODERN, style,
|
||||
wx.wxFONTWEIGHT_NORMAL, false, config.fontname or "",
|
||||
config.fontencoding or wx.wxFONTENCODING_DEFAULT)
|
||||
end
|
||||
@@ -33,7 +33,7 @@ end
|
||||
-- Create the wxFrame
|
||||
-- ----------------------------------------------------------------------------
|
||||
local function createFrame()
|
||||
frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, GetIDEString("editor"),
|
||||
local frame = wx.wxFrame(wx.NULL, wx.wxID_ANY, GetIDEString("editor"),
|
||||
wx.wxDefaultPosition, wx.wxSize(1000, 700))
|
||||
-- wrap into protected call as DragAcceptFiles fails on MacOS with
|
||||
-- wxwidgets 2.8.12 even though it should work according to change notes
|
||||
@@ -180,7 +180,7 @@ local function createNotebook(frame)
|
||||
|
||||
notebook:Connect(ID_SAVE, wx.wxEVT_COMMAND_MENU_SELECTED, function ()
|
||||
local editor = GetEditor(selection)
|
||||
SaveFile(editor, openDocuments[editor:GetId()].filePath)
|
||||
SaveFile(editor, ide.openDocuments[editor:GetId()].filePath)
|
||||
end)
|
||||
notebook:Connect(ID_SAVE, wx.wxEVT_UPDATE_UI, IfModified)
|
||||
notebook:Connect(ID_SAVEAS, wx.wxEVT_COMMAND_MENU_SELECTED, function()
|
||||
|
||||
@@ -253,8 +253,8 @@ local function saveNotebook(nb)
|
||||
return t
|
||||
end
|
||||
|
||||
sortedX = sortedPages(pagesX)
|
||||
sortedY = sortedPages(pagesY)
|
||||
local sortedX = sortedPages(pagesX)
|
||||
local sortedY = sortedPages(pagesY)
|
||||
|
||||
-- for now only support "1D" splits and prefer
|
||||
-- dimension which has more, anything else
|
||||
|
||||
@@ -264,6 +264,7 @@ local function executeShellCode(tx)
|
||||
|
||||
local addedret, forceexpression = true, tx:match("^%s*=%s*")
|
||||
tx = tx:gsub("^%s*=%s*","")
|
||||
local fn
|
||||
fn, err = loadstring("return "..tx)
|
||||
if not forceexpression and err and
|
||||
(err:find("'?<eof>'? expected near '") or
|
||||
|
||||
Reference in New Issue
Block a user