Commit graph

874 commits

Author SHA1 Message Date
Curtis Gedak 7f1671db0c Change snap makefile target to snappkg and cleanup whitespace 2019-04-02 09:45:01 -06:00
Tom Wardill e60d2a16ea Add makefile command
Fix whitespace stripping
2019-04-02 09:39:51 -06:00
Tom Wardill f45ec49d36 Add snapcraft.yaml and associated desktop support files 2019-04-02 09:39:51 -06:00
Youness Alaoui 4a947a95ac Add support for IPython Jupyter QT Console as a debugging aid
If manuskript is launched with its last argument set to "--console" an
interactive console opens up to help debug the application.
The IPython, qtconsole and matplotlib libraries must be installed for it
to work and they won't get imported unless the argument is passed to the app.
2019-03-29 10:37:53 -06:00
Youness Alaoui 7c8458b0da Fix color scheme of fullscreen editor
Color scheme was inverted if foreground was transparent, bug and fix provided
by @tildagail [1] and the text on the left side panel was ignoring text color
settings, making it unreadable in dark themes, as reported by @worstje in #527

[1] https://github.com/olivierkes/manuskript/issues/527#issuecomment-469578130
2019-03-29 10:22:55 -06:00
Jan Wester 33ac127173 Directory entries in ZIP break loading code
While tackling issue #529, I stumbled across the odd behaviour that
re-compressing the archive with 7-Zip broke what should be a valid
Manuskript project.

After investigation it turned out that the code that loads the texts
sensibly expects there to only be files tracked in the files dictionary.

It is completely valid for a zip file to contain entries describing the
contained directories. The logical fix is to simply avoid adding these
directory entries to our files dictionary in the first place.
2019-03-12 14:44:51 -06:00
Jan Wester dd56797cd7 Build manuskript.exe with the correct icon
Making sure that manuskript.exe builds with the correct icon means not
only that any shortcuts created to the file have the proper icon, but
also that we are rid of the generic PyInstaller icon we have been
shipping until now. Hurrah!

Note that relative paths do not seem to work for icon files because
PyInstaller tries to look for them in the build directory. To work
around this problem, we explicitly join the relative path on the
SPECPATH constant which seems to satisfy PyInstaller well enough.
2019-03-08 09:41:56 -07:00
Jan Wester 542a14cd5e Added Windows Icon file
Despite the existence of a logo, Manuskript lacks an icon file that can
be used on Windows operating systems. This new icon file was created
based on the existing PNG files for 16px, 32px, 64px, 128px and 256px.
2019-03-08 09:41:56 -07:00
Youness Alaoui 143500b296 Add ability to add new background images through UI.
The Cork background and fullscreen theme backgrounds images can now be added
by using the "+" icon from the combobox. Once a file is added, the combobox
is repopulated and the new image is selected.

Note on line 871, in updateThemeBackground, there was a bug where it was using
self.cmbCorkImage instead of self.cmbThemeBackgroundImage

Fixes #399
2019-03-07 10:43:35 -07:00
Youness Alaoui a6942b7923 Fix crash when right-clicking twice on fullscreen panel
If you right click once on the fullscreen panel and the context menu pop up
then you right click again somewhere else on the panel *while the previous
context menu is still visible* then it will cause a crash with :
"Windows fatal exception: access violation"
It seems to be caused by a crash in the QT event loop, trying to delete the
existing QMenu within an event handler.
2019-02-28 10:58:23 -07:00
Youness Alaoui 3f217257c4 Fix background of popup menus that was transparent (black)
In the properties view, the context menu on the title line would be black
making its content unreadable. Same in the filter line of the "Set Custom icon"
window on the outline's context menu.
2019-02-27 10:49:05 -07:00
Curtis Gedak 4fdacc24f7 Ensure text file open methods use utf-8 encoding
Several crashes were encountered opening files on operating systems
that do not default to UTF-8 encoding, such as Windows.  In each case
the project file appears to have become corrupted.  Because the only
reports to date have been on Windows, attempt to fix by specifying
utf-8 encoding for all text file open methods.

See issues #331, #470, and #502.
2019-02-27 09:30:16 -07:00
Youness Alaoui 7928ea2796 Fix corkView background image on Windows
Windows path to the image has '\' path separator instead of '/' which makes
the stylesheet fail. Background images don't appear and console gets spammed with :
Could not parse stylesheet of object corkView(0x27248eb6900, name = "corkView")
2019-02-26 13:25:30 -07:00
Youness Alaoui c3c9eef415 Do not default spellcheck to True for new editor views
default spellcheck to the settings value instead. Otherwise any new editor tab
will have spellcheck enabled regardless of setting.

Fixes #474
2019-02-25 12:58:00 -07:00
Youness Alaoui 84d0979ffb Set editor theme stylesheet to QTextEdit only.
This prevents any child widget from inheriting the same stylesheet,
more specifically, the context menu of the full screen editor will now
appear normal instead of being black text on black background, which made
it unreadable.

Fixes #440
2019-02-25 11:15:16 -07:00
Youness Alaoui 4a9937f041 Do not use a lambda function in the fullScreenEditor's myScrollBar timer signal
The lambda function will keep a reference to the scrollbar python object preventing it
from getting destroyed when the QScrollbar is destroyed. This causes the underlying
QT widget to be freed while the python object still exists, therefore the timer itself
doesn't get stopped/cleaned, so the timer will get called and cause a crash with :
"RuntimeError: Wrapped C/C++ object of type myScrollbar has been deleted"

To reproduce, press F11 repeatedly while scrolling.
2019-02-25 10:22:48 -07:00
Youness Alaoui c7605b5819 Don't crash if a typo is made in the exporter's regular expression.
When a regexp error is thrown, cancel the export and show an info dialog
with the error message to the user. Fixes #488
2019-02-15 12:49:22 -07:00
Curtis Gedak baeb5f4653 2nd try to fix macOS X blank screen when leaving fullscreen editor mode
See issue #24.

The first attempt to fix this problem was with commit:

    Try to fix macOS X blank screen when leaving editor fullscreen mode
    1ae0a77464
2019-02-12 11:23:29 -07:00
Youness Alaoui 9b774d327f Fix crash when right clicking a word in editor and enchant is not installed. 2019-02-11 12:35:23 -07:00
Youness Alaoui d7203ddacf Fix crash when previewing pandoc HTML with QTextEdit as web rendering engine. 2019-02-11 10:27:35 -07:00
Youness Alaoui caed3e9224 Fix crash when 7 pound signs are written alone on a line.
The code would look for trailing pound signs and would
count all the way to the beginning and beyond, resulting
in an out of bounds exception.
2019-02-10 09:54:50 -07:00
Curtis Gedak 1ae0a77464 Try to fix macOS X blank screen when leaving editor fullscreen mode
Ensure showNormal() is called after leaving showFullScreen().

See issue #24.

References:

https://stackoverflow.com/questions/31666744/pyqt5-can-not-close-a-topmost-fullscreen-qdialog-on-mac-osx

https://doc.qt.io/qt-5/qwidget.html#showFullScreen
  - To return from full-screen mode, call showNormal().

https://pythonprogramminglanguage.com/destructor/
2019-02-09 10:27:44 -07:00
Curtis Gedak f75bc69dd7 Fix spelling mistake "chose" should be "choose"
Mentioned in issue #470
2019-02-07 12:34:57 -07:00
Curtis Gedak 1cc7146aad Avoid crash on import
See issue #470
2019-02-07 12:34:57 -07:00
Allan Nordhøy f731e19e00 Spelling: Manuscript, may have to be restarted (#454)
* Spelling: Manuscript, may have to be restarted
2019-01-10 10:26:14 -07:00
Curtis Gedak 4ff84d328d Merge remote-tracking branch 'weblate/develop' into develop 2018-12-11 09:46:45 -07:00
LingSamuel 6a1e9111d5 Fix a translation bug 2018-12-11 09:12:13 -07:00
LingSamuel b778ca9fc1 Revise sentence 2018-12-11 09:12:13 -07:00
LingSamuel 8ceead27a4 append compiled .qm file 2018-12-11 09:12:13 -07:00
LingSamuel 8faf527110 fix wrong translation(which crashes) 2018-12-11 09:12:13 -07:00
LingSamuel 59d6e8c086 add Chinese translation 2018-12-11 09:12:13 -07:00
LingSamuel ca397271e7 add Chinese translation 2018-12-11 09:12:13 -07:00
LingSamuel 4ded8d29e0 fix #411: translator won't work in some window, such as settings 2018-12-09 11:35:34 -07:00
LingSamuel 3d6080f3c0 fix #428: zh translation suffix doesn't match system locale; new behavior: load translation from settings first 2018-12-09 11:19:26 -07:00
Joni f72070688e
Translated using Weblate (Ukrainian)
Currently translated at 5.5% (44 of 798 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/uk/
2018-12-08 20:08:47 +01:00
LingSamuel cbf35fa373 Open/Save As/Create last accessed directory 2018-12-07 12:01:33 -07:00
LingSamuel 7bbc112d25 Add last accessed directory 2018-12-07 12:01:33 -07:00
Joni 8ce1959ee6
Added translation using Weblate (Ukrainian) 2018-12-06 22:52:06 +01:00
Sarasa Kisaragi 2d335dc0d3
Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (798 of 798 strings)

Translation: Manuskript/Translations
Translate-URL: https://hosted.weblate.org/projects/manuskript/translations/zh_Hans/
2018-12-06 11:08:44 +01:00
Curtis Gedak 0cbf337f09 ========== manuskript-0.8.0 ========== 2018-12-05 11:39:28 -07:00
Curtis Gedak 92b0f016ba Add new language translations to the Settings window 2018-12-05 10:41:33 -07:00
Curtis Gedak 94dd422329 Update all language translation source .ts files
Update the language translation source '.ts' files with the
translatable strings in the source code with the following command:

$ make translation

This effectively runs the following command:

$ pylupdate5 -noobsolete i18n/manuskript.pro
2018-12-05 10:36:27 -07:00
Curtis Gedak e99ec4c486 Compile all language translation updates into respective .qm files
After updating the '.ts' translation source files from weblate,
compile all of the language translations into '.qm' files.

This was done with the following command:

$ make i18n

This effectively runs the 'lrelease' command on each '.ts' file.  For
example:

$ lrelease i18n/manuskript_es.ts
2018-12-05 10:34:24 -07:00
Pedro Albuquerque a1c7a6bb06 Manually update pt_PT translation because weblate is not up-to-date
The steps to manually update the translation were:

1. Download and extract manuskript_pt_PT.ts from issue #408
2. Manually add manuskript_pt_PT.ts to git develop branch

See issue #408 and pull request #410
2018-12-05 10:28:01 -07:00
Curtis Gedak 80676a8799 Add all current weblate languages to i18n/manuskript.pro
Prior to this step, the weblate language translations were merged into
the manuskript git repository with the following commands:

git remote update weblate
git checkout develop
git merge weblate/develop
2018-12-05 10:14:25 -07:00
Curtis Gedak 3a793f4869 Merge remote-tracking branch 'weblate/develop' into develop 2018-12-05 10:00:55 -07:00
Curtis Gedak 528ea130ee Remove unimplemented snowflake view mode menu entry
The menu option "View -> Mode -> Snowflake" has not been implemented.
This greyed out / disabled option has caused some confusion for users.
Remove the snowflake menu option to avoid confusion.

Closes issue #419
See also earlier issue #45
2018-11-30 09:42:42 -07:00
Curtis Gedak 07c9ca5c5d Remove support for macOS X El Capitan (10.11) in Travis CI build
The Travis CI builds for macOS X are failing because these now
timeout.  This happens because qt is being built from source instead
of being installed from a bottle.

Note that by default the Travis CI will terminate a build after 10
minutes if no output has been received.  Unfortunately building qt
from source code may take hours.

To address this issue, choose a macOS X version that has a homebrew
bottle for qt [1].

[1] https://formulae.brew.sh/formula/qt

The homebrew project currently lists having a qt bottle for:

  - Mojave (10.14)
  - High Sierra (10.13)
  - Sierra (10.12)

No bottle is listed for macOS El Capitan (10.11)

In order to support as many versions of macOS X as possible, choose
the lowest osx_image value [2] that is currently supported with a
homebrew bottle.

[2] https://docs.travis-ci.com/user/reference/osx#os-x-version

At this time osx_image value xcode8.3 is listed as supporting OS X
10.12.
2018-11-29 13:31:18 -07:00
Curtis Gedak 05c6dee033 Improve Travis CI logging for prepare linux script 2018-11-29 10:34:32 -07:00
Curtis Gedak 5ea37bd192 Remove plot resolution step key bindings Ctrl+Enter and Ctrl+Backspace
Many applications, including Manuskript in the Editor pane, use the
keyboard shortcut 'Ctrl+Backspace' to delete the previous word.
However in the Plot pane Manuskript uses 'Ctrl+Backspace' to delete a
plot resolution step.

Fix this inconsistent behaviour by removing the keyboard shortcuts for
'Ctrl+Enter' and 'Ctrl+Backspace' from the Plot pane.

Closes issue #375
2018-11-26 11:05:46 -07:00