diff options
author | Robin Krahl <me@robin-krahl.de> | 2015-06-27 21:27:07 +0200 |
---|---|---|
committer | Robin Krahl <me@robin-krahl.de> | 2015-06-27 21:27:07 +0200 |
commit | 2aa81315b96cd59fd469799d4d7847a682116163 (patch) | |
tree | c40a9fcc2763c2176508b78283bec1fdd4d9759c /mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua | |
parent | d513bc565782965d66c6307bfefe21dc3fd36c1a (diff) | |
download | LrMediaWiki-2aa81315b96cd59fd469799d4d7847a682116163.tar.gz LrMediaWiki-2aa81315b96cd59fd469799d4d7847a682116163.tar.bz2 |
Add configuration for snapshot creation.
The creation of snapshots after the export now depends on a new setting.
The snapshots now are created after the successful export instead of before any
export.
- move the snapshot creation in
MediaWikiExportServiceProvider.processRenderedPhotos after the successful
upload
- check the ‘Snapshot creation’ setting before creating the snapshot in
MediaWikiExportServiceProvider.processRenderedPhotos
Diffstat (limited to 'mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua')
-rw-r--r-- | mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua b/mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua index 7bd76ab..d2ee2c6 100644 --- a/mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua +++ b/mediawiki.lrdevplugin/MediaWikiPluginInfoProvider.lua @@ -18,17 +18,17 @@ local LrView = import 'LrView' local MediaWikiUtils = require 'MediaWikiUtils'
local bind = LrView.bind
-local prefs = import 'LrPrefs'.prefsForPlugin()
local MediaWikiPluginInfoProvider = {}
MediaWikiPluginInfoProvider.startDialog = function(propertyTable)
- propertyTable.logging = prefs.logging or false
+ propertyTable.logging = MediaWikiUtils.getLogging()
+ propertyTable.create_snapshots = MediaWikiUtils.getCreateSnapshots()
end
MediaWikiPluginInfoProvider.endDialog = function(propertyTable)
- prefs.logging = propertyTable.logging
- MediaWikiUtils.setLogging(prefs.logging)
+ MediaWikiUtils.setLogging(propertyTable.logging)
+ MediaWikiUtils.setCreateSnapshots(propertyTable.create_snapshots)
end
MediaWikiPluginInfoProvider.sectionsForBottomOfDialog = function(viewFactory, propertyTable)
@@ -52,6 +52,20 @@ MediaWikiPluginInfoProvider.sectionsForBottomOfDialog = function(viewFactory, pr },
viewFactory:checkbox {
+ value = bind 'create_snapshots',
+ title = LOC '$$$/LrMediaWiki/Section/Config/Snapshots=Create snapshots on export',
+ },
+ },
+
+ viewFactory:row {
+ spacing = viewFactory:label_spacing(),
+
+ viewFactory:static_text {
+ alignment = labelAlignment,
+ width = LrView.share "label_width",
+ },
+
+ viewFactory:checkbox {
value = bind 'logging',
title = LOC '$$$/LrMediaWiki/Section/Config/Logging=Enable logging',
},
|