mirror of
https://github.com/IgorTimofeev/MineOS.git
synced 2025-12-20 02:59:20 +01:00
)))))))
This commit is contained in:
parent
7523cab658
commit
f8e7cf3f3b
@ -154,21 +154,9 @@
|
|||||||
inCurrentDirectory = "In current directory",
|
inCurrentDirectory = "In current directory",
|
||||||
|
|
||||||
settings = "Preferences",
|
settings = "Preferences",
|
||||||
months = {
|
dateAndTime = "Date and time",
|
||||||
Jan = "Jan",
|
|
||||||
Feb = "Feb",
|
|
||||||
Mar = "Mar",
|
|
||||||
Apr = "Apr",
|
|
||||||
May = "May",
|
|
||||||
Jun = "Jun",
|
|
||||||
Jul = "Jul",
|
|
||||||
Aug = "Aug",
|
|
||||||
Sep = "Sep",
|
|
||||||
Oct = "Oct",
|
|
||||||
Nov = "Nov",
|
|
||||||
Dec = "Dec",
|
|
||||||
},
|
|
||||||
timezone = "Timezone",
|
timezone = "Timezone",
|
||||||
|
dateFormat = "Date format",
|
||||||
|
|
||||||
errorWhileRunningProgram = "Error while running ",
|
errorWhileRunningProgram = "Error while running ",
|
||||||
sendedFeedback = "Feedback was sent",
|
sendedFeedback = "Feedback was sent",
|
||||||
|
|||||||
@ -154,21 +154,9 @@
|
|||||||
inCurrentDirectory = "Dans le répertoire actuel",
|
inCurrentDirectory = "Dans le répertoire actuel",
|
||||||
|
|
||||||
settings = "Préférences",
|
settings = "Préférences",
|
||||||
months = {
|
dateAndTime = "Date et heure",
|
||||||
Jan = "Jan",
|
|
||||||
Feb = "Fev",
|
|
||||||
Mar = "Mar",
|
|
||||||
Apr = "Avr",
|
|
||||||
May = "Mai",
|
|
||||||
Jun = "Jui",
|
|
||||||
Jul = "Juil",
|
|
||||||
Aug = "Aou",
|
|
||||||
Sep = "Sep",
|
|
||||||
Oct = "Oct",
|
|
||||||
Nov = "Nov",
|
|
||||||
Dec = "Dec",
|
|
||||||
},
|
|
||||||
timezone = "Fuseau horaire",
|
timezone = "Fuseau horaire",
|
||||||
|
dateFormat = "Format de date",
|
||||||
|
|
||||||
errorWhileRunningProgram = "Erreur lors de l'exécution ",
|
errorWhileRunningProgram = "Erreur lors de l'exécution ",
|
||||||
sendedFeedback = "Votre commantaire a bien été envoyé",
|
sendedFeedback = "Votre commantaire a bien été envoyé",
|
||||||
|
|||||||
@ -154,21 +154,9 @@
|
|||||||
inCurrentDirectory = "В текущей директории",
|
inCurrentDirectory = "В текущей директории",
|
||||||
|
|
||||||
settings = "Настройки",
|
settings = "Настройки",
|
||||||
months = {
|
dateAndTime = "Дата и время",
|
||||||
Jan = "Января",
|
|
||||||
Feb = "Февраля",
|
|
||||||
Mar = "Марта",
|
|
||||||
Apr = "Апреля",
|
|
||||||
May = "Мая",
|
|
||||||
Jun = "Июня",
|
|
||||||
Jul = "Июля",
|
|
||||||
Aug = "Августа",
|
|
||||||
Sep = "Сентября",
|
|
||||||
Oct = "Октября",
|
|
||||||
Nov = "Ноября",
|
|
||||||
Dec = "Декабря",
|
|
||||||
},
|
|
||||||
timezone = "Часовой пояс",
|
timezone = "Часовой пояс",
|
||||||
|
dateFormat = "Формат даты",
|
||||||
|
|
||||||
errorWhileRunningProgram = "Ошибка при выполнении ",
|
errorWhileRunningProgram = "Ошибка при выполнении ",
|
||||||
sendedFeedback = "Отчет отправлен",
|
sendedFeedback = "Отчет отправлен",
|
||||||
|
|||||||
25
OS.lua
25
OS.lua
@ -942,20 +942,31 @@ local function createOSWidgets()
|
|||||||
showHiddenFilesSwitch.onStateChanged, showApplicationIconsSwitch.onStateChanged = showExtensionSwitch.onStateChanged, showExtensionSwitch.onStateChanged
|
showHiddenFilesSwitch.onStateChanged, showApplicationIconsSwitch.onStateChanged = showExtensionSwitch.onStateChanged, showExtensionSwitch.onStateChanged
|
||||||
end
|
end
|
||||||
|
|
||||||
menu:addItem(MineOSCore.localization.timezone).onTouch = function()
|
menu:addItem(MineOSCore.localization.dateAndTime).onTouch = function()
|
||||||
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.timezone)
|
local container = MineOSInterface.addBackgroundContainer(MineOSInterface.mainContainer, MineOSCore.localization.timezone)
|
||||||
|
|
||||||
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
local comboBox = container.layout:addChild(GUI.comboBox(1, 1, 36, 3, 0xE1E1E1, 0x2D2D2D, 0x4B4B4B, 0x969696))
|
||||||
comboBox.dropDownMenu.itemHeight = 1
|
comboBox.dropDownMenu.itemHeight = 1
|
||||||
|
|
||||||
|
local label = container.layout:addChild(GUI.label(1, 1, container.width, 1, 0xE1E1E1, MineOSCore.localization.dateFormat):setAlignment(GUI.ALIGNMENT_HORIZONTAL_CENTER, GUI.ALIGNMENT_VERTICAL_TOP))
|
||||||
|
|
||||||
|
local input = container.layout:addChild(GUI.input(1, 1, 36, 3, 0xE1E1E1, 0x696969, 0x878787, 0xE1E1E1, 0x2D2D2D, MineOSCore.properties.dateFormat or ""))
|
||||||
|
input.onInputFinished = function()
|
||||||
|
MineOSCore.properties.dateFormat = input.text
|
||||||
|
MineOSCore.OSUpdateDate()
|
||||||
|
|
||||||
|
MineOSInterface.mainContainer:drawOnScreen()
|
||||||
|
MineOSCore.saveProperties()
|
||||||
|
end
|
||||||
|
|
||||||
for i = -12, 12 do
|
for i = -12, 12 do
|
||||||
comboBox:addItem("GMT" .. (i >= 0 and "+" or "") .. i).onTouch = function()
|
comboBox:addItem("GMT" .. (i >= 0 and "+" or "") .. i).onTouch = function()
|
||||||
MineOSCore.properties.timezone = i
|
MineOSCore.properties.timezone = i
|
||||||
MineOSCore.saveProperties()
|
|
||||||
|
|
||||||
MineOSCore.OSUpdateTimezone(i)
|
MineOSCore.OSUpdateTimezone(i)
|
||||||
MineOSCore.OSUpdateDate()
|
MineOSCore.OSUpdateDate()
|
||||||
|
|
||||||
MineOSInterface.mainContainer:drawOnScreen()
|
MineOSInterface.mainContainer:drawOnScreen()
|
||||||
|
MineOSCore.saveProperties()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -1026,12 +1037,10 @@ local function createOSWidgets()
|
|||||||
fs.remove(name)
|
fs.remove(name)
|
||||||
end
|
end
|
||||||
|
|
||||||
local firstPart, month, secondPart = os.date(
|
dateWidgetText = os.date(
|
||||||
"%d %b %Y %T",
|
MineOSCore.properties.dateFormat,
|
||||||
realTimestamp + computerDateUptime - computerUptimeOnBoot + timezoneCorrection
|
realTimestamp + computerDateUptime - computerUptimeOnBoot + timezoneCorrection
|
||||||
):match("(%d+%s)(%a+)(.+)")
|
)
|
||||||
|
|
||||||
dateWidgetText = firstPart .. (MineOSCore.localization.months[month] or "monthNotAvailable:" .. month) .. secondPart
|
|
||||||
dateWidget.width = unicode.len(dateWidgetText)
|
dateWidget.width = unicode.len(dateWidgetText)
|
||||||
|
|
||||||
batteryWidgetPercent = computer.energy() / computer.maxEnergy()
|
batteryWidgetPercent = computer.energy() / computer.maxEnergy()
|
||||||
|
|||||||
@ -85,6 +85,7 @@ function MineOSCore.loadPropeties()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local defaultValues = {
|
local defaultValues = {
|
||||||
|
dateFormat = "%d %b% %Y %H:%M:%S",
|
||||||
packageUnloading = true,
|
packageUnloading = true,
|
||||||
transparencyEnabled = true,
|
transparencyEnabled = true,
|
||||||
showApplicationIcons = true,
|
showApplicationIcons = true,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user