Replace deprecated functions in many scripts
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- description = "AIO wrapper for the Amdroid Next alarm app widget"
|
||||
-- type = "widget"
|
||||
-- author = "Theodor Galanis (t.me/TheodorGalanis)"
|
||||
-- version = "1.10"
|
||||
-- version = "1.11"
|
||||
-- foldable = "false"
|
||||
-- uses_app = "com.amdroidalarmclock.amdroid"
|
||||
|
||||
@@ -46,7 +46,7 @@ function on_click(idx)
|
||||
end
|
||||
|
||||
function on_settings()
|
||||
ui:show_dialog("Amdroid app Next Alarm widget", "This script wrapper uses Amdroid app's Next alarm widget to display the next scheduled alarm. No settings are required.")
|
||||
dialogs:show_dialog("Amdroid app Next Alarm widget", "This script wrapper uses Amdroid app's Next alarm widget to display the next scheduled alarm. No settings are required.")
|
||||
end
|
||||
|
||||
function setup_app_widget()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
-- description = "Shows upcoming birthdays from the contacts"
|
||||
-- type = "widget"
|
||||
-- author = "Andrey Gavrilov"
|
||||
-- version = "1.2"
|
||||
-- version = "1.3"
|
||||
|
||||
local prefs = require "prefs"
|
||||
local fmt = require "fmt"
|
||||
@@ -104,7 +104,7 @@ function on_click(idx)
|
||||
end
|
||||
|
||||
function on_settings()
|
||||
ui:show_radio_dialog("Number of events", {1,2,3,4,5,6,7,8,9,10}, prefs.count)
|
||||
dialogs:show_radio_dialog("Number of events", {1,2,3,4,5,6,7,8,9,10}, prefs.count)
|
||||
end
|
||||
|
||||
function on_dialog_action(idx)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- description = "Скрипт показывает историю вызов через прямое чтение базы звонков"
|
||||
-- type = "widget"
|
||||
-- author = "Andrey Gavrilov"
|
||||
-- version = "1.0"
|
||||
-- version = "1.1"
|
||||
-- lang = "ru"
|
||||
-- root = "true"
|
||||
|
||||
@@ -77,7 +77,7 @@ end
|
||||
|
||||
function on_click(idx)
|
||||
if math.ceil(idx/3) > #tab then
|
||||
ui:show_radio_dialog("Выберите тип вызовов",types,typ)
|
||||
dialogs:show_radio_dialog("Выберите тип вызовов",types,typ)
|
||||
else
|
||||
local cmd = "am start -a android.intent.action.DIAL -d tel:"..tab[math.ceil(idx/3)].number
|
||||
system:exec(cmd)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- description = "Game"
|
||||
-- type = "widget"
|
||||
-- author = "Andrey Gavrilov"
|
||||
-- version = "1.0"
|
||||
-- version = "1.1"
|
||||
|
||||
local json = require "json"
|
||||
local folded = "15 puzzle"
|
||||
@@ -96,7 +96,7 @@ end
|
||||
|
||||
function on_click(idx)
|
||||
if idx == 0 then
|
||||
ui:show_dialog("Select Action","","Cancel","Reload")
|
||||
dialogs:show_dialog("Select Action","","Cancel","Reload")
|
||||
return
|
||||
else
|
||||
local tab = tabs_to_tab(tabs_to_desk(tab_to_tabs(json.decode(files:read("fifteen")))))
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- description = "AIO wrapper for the Google search app widget - open widget settings for options"
|
||||
-- type = "widget"
|
||||
-- author = "Theodor Galanis (t.me/TheodorGalanis)"
|
||||
-- version = "2.6"
|
||||
-- version = "2.7"
|
||||
-- foldable = "false"
|
||||
-- uses_app: "com.google.android.googlequicksearchbox"
|
||||
|
||||
@@ -59,7 +59,7 @@ end
|
||||
|
||||
function on_settings()
|
||||
local tab = {"Left-handed mode with weather", "Left-handed mode, no weather", "Right-handed mode with weather", "Right-handed mode, no weather" }
|
||||
ui:show_radio_dialog("Select mode", tab, mode)
|
||||
dialogs:show_radio_dialog("Select mode", tab, mode)
|
||||
end
|
||||
|
||||
function on_long_click(idx)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- data_source = "https://translate.google.com"
|
||||
-- type = "widget"
|
||||
-- author = "Andrey Gavrilov"
|
||||
-- version = "1.2"
|
||||
-- version = "1.3"
|
||||
|
||||
local json = require "json"
|
||||
local uri = "http://translate.googleapis.com/translate_a/single?client=gtx&sl=auto"
|
||||
@@ -13,7 +13,7 @@ function on_resume()
|
||||
end
|
||||
|
||||
function on_click()
|
||||
ui:show_edit_dialog("Enter text")
|
||||
dialogs:show_edit_dialog("Enter text")
|
||||
end
|
||||
|
||||
function on_dialog_action(text)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
-- arguments_help = "Long click button for options, open widget settings for list of buttons"
|
||||
--foldable = "true"
|
||||
-- author = "Theodor Galanis"
|
||||
-- version = "2.5"
|
||||
-- version = "2.6"
|
||||
|
||||
md_colors = require "md_colors"
|
||||
|
||||
@@ -72,7 +72,7 @@ lav = get_label(actions[i])
|
||||
table.insert(lab, lav)
|
||||
end
|
||||
end
|
||||
ui:show_checkbox_dialog("Select actions", lab, get_checkbox_idx())
|
||||
dialogs:show_checkbox_dialog("Select actions", lab, get_checkbox_idx())
|
||||
end
|
||||
|
||||
--utilities--
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- name = "ТВ-Программа"
|
||||
-- description = "Программа передач россиийского ТВ"
|
||||
-- type = "widget"
|
||||
-- version = "1.0"
|
||||
-- version = "1.1"
|
||||
-- lang = "ru"
|
||||
-- author = "Andrey Gavrilov"
|
||||
|
||||
@@ -23,9 +23,9 @@ end
|
||||
|
||||
function on_click(idx)
|
||||
if math.ceil(idx/2) > #tab_desc then
|
||||
ui:show_edit_dialog("Введите название канала","",title)
|
||||
dialogs:show_edit_dialog("Введите название канала","",title)
|
||||
else
|
||||
ui:show_dialog(tab_name[math.ceil(idx/2)].."\n"..tab_time[math.ceil(idx/2)],tab_desc[math.ceil(idx/2)],"Перейти к каналу")
|
||||
dialogs:show_dialog(tab_name[math.ceil(idx/2)].."\n"..tab_time[math.ceil(idx/2)],tab_desc[math.ceil(idx/2)],"Перейти к каналу")
|
||||
link = tab_link[math.ceil(idx/2)]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
-- description = "Turns screen widgets on and off when buttons are pressed"
|
||||
-- type = "widget"
|
||||
-- author = "Andrey Gavrilov"
|
||||
-- version = "3.0"
|
||||
-- version = "3.1"
|
||||
|
||||
prefs = require "prefs"
|
||||
|
||||
@@ -56,7 +56,7 @@ function on_dialog_action(data)
|
||||
end
|
||||
|
||||
function on_settings()
|
||||
ui:show_checkbox_dialog("Select widgets", widgets.label, indexes)
|
||||
dialogs:show_checkbox_dialog("Select widgets", widgets.label, indexes)
|
||||
end
|
||||
|
||||
function get_indexes(tab1,tab2)
|
||||
|
||||
@@ -32,7 +32,7 @@ end
|
||||
|
||||
function on_settings()
|
||||
dialog_id = "settings"
|
||||
ui:show_checkbox_dialog("Check calendars", get_all_cals()[3],cal_id_to_id(settings:get()))
|
||||
dialogs:show_checkbox_dialog("Check calendars", get_all_cals()[3],cal_id_to_id(settings:get()))
|
||||
end
|
||||
|
||||
function on_click(i)
|
||||
@@ -51,7 +51,7 @@ function on_click(i)
|
||||
on_resume()
|
||||
elseif i > 1 and i < 8 then
|
||||
dialog_id = "date"
|
||||
ui:show_edit_dialog("Enter month and year", "Format - 12.2020. Empty value - current month", string.format("%02d.%04d", month, year))
|
||||
dialogs:show_edit_dialog("Enter month and year", "Format - 12.2020. Empty value - current month", string.format("%02d.%04d", month, year))
|
||||
return
|
||||
elseif (i-1)%8 ~= 0 and tab[i] ~= " " then
|
||||
day = tab[i]:match(">(%d+)<"):gsub("^0","")
|
||||
|
||||
@@ -20,7 +20,7 @@ function redraw()
|
||||
end
|
||||
|
||||
function on_click(idx)
|
||||
ui:show_edit_dialog("Enter command")
|
||||
dialogs:show_edit_dialog("Enter command")
|
||||
end
|
||||
|
||||
function on_dialog_action(text)
|
||||
|
||||
@@ -37,10 +37,10 @@ end
|
||||
function on_click(idx)
|
||||
if idx == 1 then
|
||||
dialog_id ="amount"
|
||||
ui:show_edit_dialog("Enter amount", "", amount)
|
||||
dialogs:show_edit_dialog("Enter amount", "", amount)
|
||||
elseif idx == 2 then
|
||||
dialog_id = "unit_from"
|
||||
ui:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_from))
|
||||
dialogs:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_from))
|
||||
elseif idx == 3 then
|
||||
local unit_tmp = unit_from
|
||||
unit_from = unit_to
|
||||
@@ -50,10 +50,10 @@ function on_click(idx)
|
||||
system:copy_to_clipboard(sum)
|
||||
elseif idx == 5 then
|
||||
dialog_id = "unit_to"
|
||||
ui:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_to))
|
||||
dialogs:show_radio_dialog("Select unit",get_radio_tab(unit),get_radio_idx(unit_to))
|
||||
elseif idx == 6 then
|
||||
dialog_id = "unit"
|
||||
ui:show_radio_dialog("Select converter",get_radio_tab(""),get_radio_idx(unit))
|
||||
dialogs:show_radio_dialog("Select converter",get_radio_tab(""),get_radio_idx(unit))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user