-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPluginInfo.lua
More file actions
executable file
·44 lines (38 loc) · 1.38 KB
/
PluginInfo.lua
File metadata and controls
executable file
·44 lines (38 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
--[[-------------------------------------------------------
@file PluginInfo.lua
@bried Define plugin manager dialogs at SQLTable.lrplugin
@author remov-b4-flight
---------------------------------------------------------]]
local LrApplication = import 'LrApplication'
local LrTasks = import 'LrTasks'
local LrView = import 'LrView'
local bind = LrView.bind -- a local shortcut for the binding function
local prefs = import 'LrPrefs'.prefsForPlugin()
local Info = require 'Info'
local PluginInfo = {}
local CurrentCatalog = LrApplication.activeCatalog()
function PluginInfo.startDialog( propertyTable )
propertyTable.isCreate = prefs.isCreate
propertyTable.tableName = prefs.tableName
end
function PluginInfo.endDialog( propertyTable )
prefs.isCreate = propertyTable.isCreate
prefs.tableName = propertyTable.tableName
end
function PluginInfo.sectionsForTopOfDialog( viewFactory, propertyTable )
return {
{
title = Info.LrPluginName,
synopsis = LOC '$$$/sqltable/description=Create SQL Table from Lightroom Metadata.',
bind_to_object = propertyTable,
viewFactory:row {
viewFactory:static_text {width_in_chars = 7, title = LOC '$$$/sqltable/tablename=Table Name',},
viewFactory:edit_field { value = bind 'tableName',},
},
viewFactory:row {
viewFactory:checkbox {title = LOC '$$$/sqltable/create=Create Table', value = bind 'isCreate',},
},
},
}
end
return PluginInfo