summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/templatelayout.h
diff options
context:
space:
mode:
authorGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-11-24 22:54:54 +0200
committerGravatar Lubomir I. Ivanov <neolit123@gmail.com>2017-11-24 23:06:52 +0200
commit65f0600679a72d13b64b20c575c05b5313a80635 (patch)
tree65af0a1b9bf6f619f252ad756956c3c9bab71078 /desktop-widgets/templatelayout.h
parentfc48cde77c98385c69bc4d951de6867cf2f652a0 (diff)
downloadsubsurface-65f0600679a72d13b64b20c575c05b5313a80635.tar.gz
printing: update the coping of bundled templates
This update includes: - Instead of copyPath() use a new specialized function: copy_bundled_templates() - The new function supports overwriting of templates in the user path, but only if a template file is read-only - If the file is RW create a backup of the file in the form of: <file-name>-User.html - Collect backup files and store them in a QStringList which is then shown in a QMessageBox from MainWindow to notifying the user about the backup This change allows moving the maintenance of the bundled templates back to the application developers and contributors as currently the only one who can edit the templates in the user path was the user. Suggested-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'desktop-widgets/templatelayout.h')
-rw-r--r--desktop-widgets/templatelayout.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/desktop-widgets/templatelayout.h b/desktop-widgets/templatelayout.h
index 8ec4eadc7..cb60cc03d 100644
--- a/desktop-widgets/templatelayout.h
+++ b/desktop-widgets/templatelayout.h
@@ -2,6 +2,7 @@
#ifndef TEMPLATELAYOUT_H
#define TEMPLATELAYOUT_H
+#include <QStringList>
#include <grantlee_templates.h>
#include "mainwindow.h"
#include "printoptions.h"
@@ -13,6 +14,7 @@
int getTotalWork(print_options *printOptions);
void find_all_templates();
void set_bundled_templates_as_read_only();
+void copy_bundled_templates(QString src, QString dst, QStringList *templateBackupList);
extern QList<QString> grantlee_templates, grantlee_statistics_templates;