Skip to content

Commit 236b25a

Browse files
committed
tools/script_manager.lua - clean up formatting and documentation
1 parent a4f6af7 commit 236b25a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

tools/script_manager.lua

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--[[
22
This file is part of darktable,
3-
copyright (c) 2018, 2020 Bill Ferguson <[email protected]>
3+
copyright (c) 2018, 2020, 2023 Bill Ferguson <[email protected]>
44
55
darktable is free software: you can redistribute it and/or modify
66
it under the terms of the GNU General Public License as published by
@@ -289,7 +289,6 @@ local function get_repo_branches(repo)
289289
return branches
290290
end
291291

292-
293292
local function is_repo_clean(repo_data)
294293
local old_log_level = set_log_level(sm.log_level)
295294
if string.match(repo_data, "\n%s-%a.-%a:%s-%a%g-\n") then
@@ -309,6 +308,10 @@ local function checkout_repo_branch(repo, branch)
309308
restore_log_level(old_log_level)
310309
end
311310

311+
--------------------
312+
-- utility functions
313+
--------------------
314+
312315
local function update_combobox_choices(combobox, choice_table, selected)
313316
local old_log_level = set_log_level(sm.log_level)
314317
local items = #combobox
@@ -341,6 +344,10 @@ local function string_dequote(str)
341344
return string.gsub(str, "['\"]", "")
342345
end
343346

347+
------------------
348+
-- script handling
349+
------------------
350+
344351
local function add_script_category(category)
345352
local old_log_level = set_log_level(sm.log_level)
346353
if #sm.categories == 0 or not string.match(du.join(sm.categories, " "), ds.sanitize_lua(category)) then
@@ -555,6 +562,10 @@ local function update_scripts()
555562
return result
556563
end
557564

565+
--------------
566+
-- UI handling
567+
--------------
568+
558569
local function update_script_update_choices()
559570
local old_log_level = set_log_level(sm.log_level)
560571
local installs = {}
@@ -678,7 +689,7 @@ local function clear_button(number)
678689
button.label = ""
679690
button.tooltip = ""
680691
button.sensitive = false
681-
--button.name = ""
692+
--button.name = ""
682693
restore_log_level(old_log_level)
683694
end
684695

@@ -1235,6 +1246,7 @@ sm.widgets.main_box = dt.new_widget("box"){
12351246
}
12361247

12371248
script_manager_running_script = nil
1249+
12381250
-- - - - - - - - - - - - - - - - - - - - - - - -
12391251
-- D A R K T A B L E I N T E G R A T I O N
12401252
-- - - - - - - - - - - - - - - - - - - - - - - -

0 commit comments

Comments
 (0)