Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b0da2630 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

CPMT: Make sure that the config in question is writable as well before opening it.

In case someone tries to move the file around to get around permission issues.
parent 6c1176a0
......@@ -129,7 +129,7 @@ img
<dd>The translations directory is where the POT file will be stored and where the exporter searches for translation(PO) files.</dd>
</dl>
<p>It will also allow you to edit meta data if you'd want already, but this is not mandatory.</p>
<p>Then after you finish, select <em>Open Project</em>, go to the location where you have stored your comics project. There should be a &ldquo;comicsConfig.json&rdquo; file there, next to the new folders for the pages, templates and export. Open that.</p>
<p>Since version 3 the project is immidiately opened in the docker. If you wish to work on an older project, select <em>Open Project</em>, go to the location where you have stored your comics project. There should be a &ldquo;comicsConfig.json&rdquo; file there, next to the new folders for the pages, templates and export. Open that.</p>
<p>Now, click <em>Add Page</em> to add your first page. You will get a dialog asking for the template. Here you can generate one, or import one. CPMT will remember this as the default one.</p>
<p>Double click the new page to open in Krita.</p>
<p>The second column in the docker allows you to see the &ldquo;subject&rdquo; line in the document info if it's filled in.</p>
......@@ -268,7 +268,7 @@ img
<dl>
<dt>Version 3 (Krita 4.2)</dt>
<dd>
Improved ComicBookInfo and ComicInfo.xml metadata files export. Also improved EPUB export, with support for pre-pagination and region navigation, and improved handling of the metadata files.
Improved ComicBookInfo and ComicInfo.xml metadata files export. Improved EPUB export, with support for pre-pagination and region navigation, and improved handling of the metadata files. Also added warnings for trying to deal with unwritable folders, as well as opening the project after you create it.
</dd>
<dt>Version 2 (Krita 4.1)</dt>
<dd>90% ACBF support, with improved handling of text, translation support, new keys for genres and author roles, style sheets, text-type recognition, database ref, and background color support. The Comic Page viewer has been fully rewritten to handle flipping through the pages as well as made possible to be run standalone. Furthermore, the comic page viewer has gotten its own dedicated item delegate, meaning the page metadata is drawn nicely and drag and drop is less fiddly.</dd>
......
......@@ -346,6 +346,9 @@ class comics_project_manager_docker(DockWidget):
def slot_open_config(self):
self.path_to_config = QFileDialog.getOpenFileName(caption=i18n("Please select the JSON comic config file."), filter=str(i18n("JSON files") + "(*.json)"))[0]
if os.path.exists(self.path_to_config) is True:
if os.access(self.path_to_config, os.W_OK) is False:
QMessageBox.warning(None, i18n("Config cannot be used"), i18n("Krita doesn't have write access to this folder, so new files cannot be made. Please configure the folder access or move the project to a folder that can be written to."), QMessageBox.Ok)
return
configFile = open(self.path_to_config, "r", newline="", encoding="utf-16")
self.setupDictionary = json.load(configFile)
self.projecturl = os.path.dirname(str(self.path_to_config))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment