mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2026-01-12 06:02:39 +01:00
Merge branch 'IgorTimofeev:master' into master
This commit is contained in:
commit
f2ff79e0ba
@ -24,7 +24,7 @@
|
||||
hotkeys = "Гарячі клавіші",
|
||||
hotkeysText = {
|
||||
"Є кілька гарячих клавіш, які працюють так само, як у справжньому Photoshop:",
|
||||
null,
|
||||
" ",
|
||||
"М та Alt - вибір області",
|
||||
"V - переміщення",
|
||||
"C - масштабування",
|
||||
@ -33,7 +33,7 @@
|
||||
"Т – текст",
|
||||
"G – заповнення",
|
||||
"F - інструмент Брайля",
|
||||
null,
|
||||
" ",
|
||||
"X - перемикання кольорів",
|
||||
"D - скидання кольорів малюнка",
|
||||
},
|
||||
|
||||
@ -952,6 +952,7 @@ end
|
||||
|
||||
function GUI.alert(...)
|
||||
local args = {...}
|
||||
|
||||
for i = 1, #args do
|
||||
if type(args[i]) == "table" then
|
||||
args[i] = text.serialize(args[i], true)
|
||||
@ -959,7 +960,10 @@ function GUI.alert(...)
|
||||
args[i] = tostring(args[i])
|
||||
end
|
||||
end
|
||||
if #args == 0 then args[1] = "nil" end
|
||||
|
||||
if #args == 0 then
|
||||
args[1] = "nil"
|
||||
end
|
||||
|
||||
local sign = image.fromString([[06030000FF 0000FF 00F7FF▟00F7FF▙0000FF 0000FF 0000FF 00F7FF▟F7FF00 F7FF00 00F7FF▙0000FF 00F7FF▟F7FF00CF7FF00yF7FF00kF7FF00a00F7FF▙]])
|
||||
local offset = 2
|
||||
@ -970,6 +974,7 @@ function GUI.alert(...)
|
||||
|
||||
lines = text.wrap(lines, textWidth)
|
||||
local height = image.getHeight(sign)
|
||||
|
||||
if #lines + 2 > height then
|
||||
height = #lines + 2
|
||||
end
|
||||
@ -981,6 +986,7 @@ function GUI.alert(...)
|
||||
workspace:addChild(GUI.panel(1, 1, workspace.width, workspace.height, 0x1D1D1D))
|
||||
workspace:addChild(GUI.image(x, y, sign))
|
||||
workspace:addChild(GUI.textBox(x + image.getWidth(sign) + 2, y, textWidth, #lines, 0x1D1D1D, 0xE1E1E1, lines, 1, 0, 0)).eventHandler = nil
|
||||
|
||||
local buttonWidth = 10
|
||||
local button = workspace:addChild(GUI.roundedButton(x + image.getWidth(sign) + textWidth - buttonWidth + 2, workspace.height - offset, buttonWidth, 1, 0x3366CC, 0xE1E1E1, 0xE1E1E1, 0x3366CC, "OK"))
|
||||
|
||||
|
||||
@ -101,20 +101,15 @@ local function flush(width, height)
|
||||
|
||||
resetDrawLimit()
|
||||
|
||||
local index
|
||||
|
||||
for i = 1, bufferWidth * bufferHeight do
|
||||
index = i
|
||||
currentFrameBackgrounds[index] = 0x010101
|
||||
newFrameBackgrounds[index] = 0x010101
|
||||
currentFrameBackgrounds[i] = 0x010101
|
||||
newFrameBackgrounds[i] = 0x010101
|
||||
|
||||
index = index + 1
|
||||
currentFrameForegrounds[index] = 0xFEFEFE
|
||||
newFrameForegrounds[index] = 0xFEFEFE
|
||||
currentFrameForegrounds[i] = 0xFEFEFE
|
||||
newFrameForegrounds[i] = 0xFEFEFE
|
||||
|
||||
index = index + 1
|
||||
currentFrameSymbols[index] = " "
|
||||
newFrameSymbols[index] = " "
|
||||
currentFrameSymbols[i] = " "
|
||||
newFrameSymbols[i] = " "
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@ -280,6 +280,13 @@ function system.call(method, ...)
|
||||
|
||||
path, line = path:match("\t+([^:]+%.lua):(%d+):")
|
||||
|
||||
-- Weird case on some server machines, unable to reproduce,
|
||||
-- seems like traceback parsing error
|
||||
-- TODO: replace this when appropriate error reason will be found
|
||||
if not path then
|
||||
return nil
|
||||
end
|
||||
|
||||
return {
|
||||
path = path,
|
||||
line = tonumber(line),
|
||||
@ -289,6 +296,7 @@ function system.call(method, ...)
|
||||
|
||||
local xpcallSuccess, xpcallReason = xpcall(launchMethod, tracebackMethod)
|
||||
|
||||
-- This shouldn't happen normally, but if so - placeholder error message will be returned
|
||||
if type(xpcallReason) == "string" or xpcallReason == nil then
|
||||
xpcallReason = {
|
||||
path = paths.system.libraries .. "System.lua",
|
||||
@ -420,7 +428,7 @@ function system.launchWithArguments(path)
|
||||
workspace:draw()
|
||||
end
|
||||
|
||||
local iconLaunchers = {
|
||||
local defaultIconLaunchers = {
|
||||
application = function(icon)
|
||||
system.execute(icon.path .. "Main.lua")
|
||||
end,
|
||||
@ -837,6 +845,7 @@ local function iconOnRightClick(selectedIcons, icon, e1, e2, e3, e4)
|
||||
end
|
||||
|
||||
local success, reason = require("Compressor").pack(where .. "/Archive.pkg", itemsToArchive)
|
||||
|
||||
if not success then
|
||||
GUI.alert(reason)
|
||||
end
|
||||
@ -1180,7 +1189,6 @@ local function anyIconFieldUpdateFileList(iconField, func)
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
func(list)
|
||||
else
|
||||
GUI.alert("Failed to update file list: " .. tostring(reason))
|
||||
@ -1634,6 +1642,7 @@ local function iconFieldBackgroundObjectEventHandler(workspace, object, e1, e2,
|
||||
end
|
||||
|
||||
if selectedIcon then
|
||||
selectedIcon.selected = nil
|
||||
selectedIcon:launch()
|
||||
workspace:draw()
|
||||
end
|
||||
@ -1737,7 +1746,8 @@ local function anyIconFieldAddInfo(iconField, path)
|
||||
|
||||
-- Duplicate icon launchers for overriding possibility
|
||||
iconField.launchers = {}
|
||||
for key, value in pairs(iconLaunchers) do
|
||||
|
||||
for key, value in pairs(defaultIconLaunchers) do
|
||||
iconField.launchers[key] = value
|
||||
end
|
||||
end
|
||||
@ -2190,7 +2200,6 @@ function system.error(path, line, traceback)
|
||||
window:addChild(GUI.panel(1, 1, window.width, 3, 0x3C3C3C))
|
||||
window:addChild(GUI.label(1, 2, window.width, 1, 0xE1E1E1, localization.errorWhileRunningProgram .. "\"" .. filesystem.name(path) .. "\"")):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP)
|
||||
local actionButtons = window:addChild(GUI.actionButtons(2, 2, true))
|
||||
local sendToDeveloperButton = window:addChild(GUI.adaptiveButton(9, 1, 2, 1, 0x4B4B4B, 0xD2D2D2, 0x2D2D2D, 0xFFFFFF, localization.sendFeedback))
|
||||
|
||||
local codeView = window:addChild(GUI.codeView(1, 4, math.floor(window.width * 0.62), window.height - 3, 1, 1, 100, {}, {[line] = 0xFF4444}, GUI.LUA_SYNTAX_PATTERNS, GUI.LUA_SYNTAX_COLOR_SCHEME, true, {}))
|
||||
|
||||
@ -2239,23 +2248,10 @@ function system.error(path, line, traceback)
|
||||
end
|
||||
end
|
||||
|
||||
sendToDeveloperButton.onTouch = function()
|
||||
if component.isAvailable("internet") then
|
||||
local internet = require("Internet")
|
||||
internet.request("https://api.mcmodder.ru/ECS/report.php?path=" .. internet.encode(path) .. "&errorMessage=" .. internet.encode(traceback))
|
||||
|
||||
sendToDeveloperButton.text = localization.sendedFeedback
|
||||
workspace:draw()
|
||||
event.sleep(1)
|
||||
end
|
||||
|
||||
actionButtons.close.onTouch()
|
||||
end
|
||||
|
||||
workspace:draw()
|
||||
|
||||
for i = 1, 3 do
|
||||
computer.beep(1500, 0.08)
|
||||
for i = 1, 2 do
|
||||
computer.beep(1900, 0.05)
|
||||
end
|
||||
end
|
||||
|
||||
@ -2475,7 +2471,7 @@ function system.updateDesktop()
|
||||
|
||||
dockContainer.updateIcons = function()
|
||||
for i = 1, #dockContainer.children - 1 do
|
||||
dockContainer.children[i]:analyseExtension(iconLaunchers)
|
||||
dockContainer.children[i]:analyseExtension(defaultIconLaunchers)
|
||||
end
|
||||
end
|
||||
|
||||
@ -2493,7 +2489,7 @@ function system.updateDesktop()
|
||||
path = system.readShortcut(path)
|
||||
end
|
||||
local icon = dockContainer:addChild(system.icon(1, 2, path, dockColors))
|
||||
icon:analyseExtension(iconLaunchers)
|
||||
icon:analyseExtension(defaultIconLaunchers)
|
||||
icon:moveBackward()
|
||||
|
||||
icon.eventHandler = dockIconEventHandler
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "في المجلد الحالي",
|
||||
|
||||
errorWhileRunningProgram = "خطأ أثناء تشغيل ",
|
||||
sendedFeedback = "ملاحظات تم إرساله",
|
||||
sendFeedback = "إرسال ملاحظات",
|
||||
yourContacts = "جهات الاتصال الخاصة بك",
|
||||
additionalInfo = "معلومات إضافية",
|
||||
stackTraceback = "Stack traceback ",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "У дзеючай дырэкторыі",
|
||||
|
||||
errorWhileRunningProgram = "Памылка пры выкананні ",
|
||||
sendedFeedback = "Справаздача адпраўлена",
|
||||
sendFeedback = "Адправіць справаздачу",
|
||||
yourContacts = "Вашы кантакты",
|
||||
additionalInfo = "Дадатковая інфармацыя",
|
||||
stackTraceback = "Стэк памылкі",
|
||||
|
||||
@ -107,8 +107,6 @@
|
||||
inCurrentDirectory = "বর্তমান ফোল্ডারে",
|
||||
errorWhileRunningProgram = "চলার সময় ত্রুটি ",
|
||||
|
||||
sendedFeedback = "প্রতিক্রিয়া পাঠানো হয়েছিল",
|
||||
sendFeedback = "প্রতিক্রিয়া পাঠান",
|
||||
yourContacts = "আপনার পরিচিতিগুলি",
|
||||
additionalInfo = "অতিরিক্ত তথ্য",
|
||||
stackTraceback = "স্ট্যাক ট্রেসব্যাক",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "В текущата папка",
|
||||
errorWhileRunningProgram = "Възникна грешка при изпълняване на ",
|
||||
|
||||
sendedFeedback = "Обратната връзка бе изпратена",
|
||||
sendFeedback = "Изпращане на обратна връзка",
|
||||
yourContacts = "Вашите контакти",
|
||||
additionalInfo = "Допълнителна информация",
|
||||
stackTraceback = "Стак на повикванията",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "在当前文件夹中",
|
||||
|
||||
errorWhileRunningProgram = "发生错误,无法执行",
|
||||
sendedFeedback = "反馈已发送",
|
||||
sendFeedback = "发送反馈",
|
||||
yourContacts = "联系方式",
|
||||
additionalInfo = "额外信息",
|
||||
stackTraceback = "堆栈跟踪",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "In huidige map",
|
||||
|
||||
errorWhileRunningProgram = "Fout tijdens ",
|
||||
sendedFeedback = "Feedback is verstuurd",
|
||||
sendFeedback = "Verstuurd feedback",
|
||||
yourContacts = "Jou contacten",
|
||||
additionalInfo = "Extra informatie",
|
||||
stackTraceback = "Stack herleiden",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "In current folder",
|
||||
|
||||
errorWhileRunningProgram = "Error while running ",
|
||||
sendedFeedback = "Feedback was sent",
|
||||
sendFeedback = "Send feedback",
|
||||
yourContacts = "Your contacts",
|
||||
additionalInfo = "Additional information",
|
||||
stackTraceback = "Stack traceback",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "Tämänhetkisessä tiedostossa",
|
||||
|
||||
errorWhileRunningProgram = "Virhe suorittaessa ",
|
||||
sendedFeedback = "Palaute lähetetty",
|
||||
sendFeedback = "Lähetä palautetta",
|
||||
yourContacts = "Yhteystietosi",
|
||||
additionalInfo = "Lisätiedot",
|
||||
stackTraceback = "Pinon jäljitys",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "Dans le répertoire actuel",
|
||||
|
||||
errorWhileRunningProgram = "Erreur lors de l'exécution ",
|
||||
sendedFeedback = "Votre commantaire a bien été envoyé",
|
||||
sendFeedback = "Envoyer un commantaire",
|
||||
yourContacts = "Vos contacts",
|
||||
additionalInfo = "Informations additionnelles",
|
||||
stackTraceback = "Trace d'appels",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "Im aktuellen Verzeichnis",
|
||||
|
||||
errorWhileRunningProgram = "Fehler beim Ausführen",
|
||||
sendedFeedback = "Fehlerbericht wurde gesendet",
|
||||
sendFeedback = "Fehlerbericht senden",
|
||||
yourContacts = "Meine Kontakte",
|
||||
additionalInfo = "Zusätzliche Informationen",
|
||||
stackTraceback = "Stacktrace",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "चालू फ़ोल्डर में",
|
||||
|
||||
errorWhileRunningProgram = "दौड़ते समय त्रुटि ",
|
||||
sendedFeedback = "प्रतिक्रिया भेजी गई",
|
||||
sendFeedback = "फीडबैक",
|
||||
yourContacts = "अपने संपर्क",
|
||||
additionalInfo = "अतिरिक्त जानकारी",
|
||||
stackTraceback = "ढेर ट्रेसबैक",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "Nella directory corrente",
|
||||
|
||||
errorWhileRunningProgram = "Errore durante l'esecuzione ",
|
||||
sendedFeedback = "È stato inviato un Feedback",
|
||||
sendFeedback = "Invia commenti",
|
||||
yourContacts = "I propri contatti",
|
||||
additionalInfo = "Informazioni supplementari",
|
||||
stackTraceback = "Traceback in pila",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "現在のフォルダ内",
|
||||
|
||||
errorWhileRunningProgram = "実行中のエラー ",
|
||||
sendedFeedback = "フィードバックが送信されました",
|
||||
sendFeedback = "フィードバックを送る",
|
||||
yourContacts = "あなたの問い合わせ先",
|
||||
additionalInfo = "追加情報",
|
||||
stackTraceback = "スタックトレースバック",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "현재 폴더에",
|
||||
|
||||
errorWhileRunningProgram = "다음을 실행중 문제가 생겼습니다 : ",
|
||||
sendedFeedback = "피드백을 보냈습니다.",
|
||||
sendFeedback = "피드백 보내기",
|
||||
yourContacts = "귀하의 연락처",
|
||||
additionalInfo = "추가 정보",
|
||||
stackTraceback = "문제 정보",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "In current foldr",
|
||||
|
||||
errorWhileRunningProgram = "Error whiel runnin ",
|
||||
sendedFeedback = "Feedback wuz sent",
|
||||
sendFeedback = "Send feedback",
|
||||
yourContacts = "ur contacts",
|
||||
additionalInfo = "Additional informashun",
|
||||
stackTraceback = "Stack traceback",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "W obecnym folderze",
|
||||
|
||||
errorWhileRunningProgram = "Błąd podczas uruchamiania ",
|
||||
sendedFeedback = "Wysłano opinię",
|
||||
sendFeedback = "Wyślij opinię",
|
||||
yourContacts = "Twoje kontakty",
|
||||
additionalInfo = "Dodatkowe informacje",
|
||||
stackTraceback = "Identyfikator",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "Na pasta atua",
|
||||
|
||||
errorWhileRunningProgram = "Erro ao executar ",
|
||||
sendedFeedback = "Feedback foi enviado",
|
||||
sendFeedback = "Enviar feedback",
|
||||
yourContacts = "Seus contatos",
|
||||
additionalInfo = "Informações adicionais",
|
||||
stackTraceback = "Rastreamento de pilha",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "В текущей директории",
|
||||
|
||||
errorWhileRunningProgram = "Ошибка при выполнении ",
|
||||
sendedFeedback = "Отчет отправлен",
|
||||
sendFeedback = "Отправить отчет",
|
||||
yourContacts = "Ваши контакты",
|
||||
additionalInfo = "Дополнительная информация",
|
||||
stackTraceback = "Стек ошибки",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "V tomto priečinku",
|
||||
|
||||
errorWhileRunningProgram = "Chyba pri behu programu ",
|
||||
sendedFeedback = "Odozva bola odoslaná",
|
||||
sendFeedback = "Odoslať odozvu",
|
||||
yourContacts = "Vaše kontakty",
|
||||
additionalInfo = "Ďaľšie informácie",
|
||||
stackTraceback = "Spätné sledovanie zásobníka",
|
||||
|
||||
@ -108,8 +108,6 @@
|
||||
inCurrentDirectory = "En la Carpeta Actual",
|
||||
|
||||
errorWhileRunningProgram = "Error al ejecutar ",
|
||||
sendedFeedback = "La Opinion ha sido Enviada",
|
||||
sendFeedback = "Enviar Opinion",
|
||||
yourContacts = "Tus Contactos",
|
||||
additionalInfo = "Informacion Adicional",
|
||||
stackTraceback = "Seguimiento de pila",
|
||||
|
||||
@ -109,8 +109,6 @@
|
||||
inCurrentDirectory = "В поточному каталозі",
|
||||
|
||||
errorWhileRunningProgram = "Помилка під час роботи ",
|
||||
sendedFeedback = "Звіт відправлений",
|
||||
sendFeedback = "Відправити звіт",
|
||||
yourContacts = "Ваші контакти",
|
||||
additionalInfo = "Додаткова інформація",
|
||||
stackTraceback = "Стек помилки",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user