Commit Graph

106 Commits

Author SHA1 Message Date
Chris Hennes
ca8609ef3a Start: Remove Py2 code 2022-11-09 14:08:54 +01:00
VM4Dim
b180512664 [StartPage] Fix Wiki Link to Reverse_Engineering WB Page 2022-09-05 15:34:06 +03:00
0penBrain
530333a3c8 [Bugfix] Prevent start page loading to fail if WB doesn't define an icon 2022-05-02 14:30:24 +02:00
wmayer
1a62c2024d lgtm: removes unused imports in Python scripts 2022-03-20 23:00:55 +01:00
Yorik van Havre
82c2868416 Start: Added possibility to provide custom CSS for the start page 2022-03-04 14:06:13 +01:00
wmayer
0b70be452c StartPage: fix regression of #5515 2022-02-14 08:37:53 +01:00
luz paz
da847fab35 StartWB: Remove superfluous paranthesis [skip ci] 2022-02-10 17:17:32 +01:00
luz paz
139387fee4 StartWB: Remove python2 support
* removed six module  
* removed encode() function
2022-02-10 17:17:32 +01:00
luz paz
80250eafb2 Start: header uniformity + whitespace management + misc. pep8 fixes 2022-01-08 18:28:27 +01:00
wmayer
45632cc32e Start: if a corrupted file is part of the Recent File List then ignore it 2021-10-11 10:13:49 +02:00
Yorik van Havre
5177a5f051 Start: Fixed faling test 2021-08-30 15:36:13 +02:00
川島和津実
0f9cb4caab Start: Correct hash for thumbnail filename (py3)
Image file names need to be quoted before hashing to generate thumbnail file names. This is related to pull requests #4931 and #4972, so please refer to discussions therein. Only Python3 is supported, not Python2.
2021-08-18 22:27:39 +08:00
川島和津実
7b32264b63 Start: Correct hash for thumbnail filename
Image file names need to be quoted before hashing to generate thumbnail file names.
This is related to pull requests #4931 and #4972, so please refer to discussions therein.
2021-08-18 22:15:18 +08:00
Chris Hennes
6f185eb14f Revert "Start: Properly hash thumbnail filenames" 2021-08-17 14:28:47 -05:00
GUAN Xin
9d5e707350 Start: Properly hash thumbnail filenames
Image filenames should be encoded as URI before being hashed.

Also assume that filenames are already utf8 because the community
has been advertiseing utf8 usage since the beginning of this centry.

Calling .encode("utf8") on strings that are already in utf8 simply
raises the following exception:

  UnicodeDecodeError: 'ascii' codec can't decode byte ...
for non-ascii (already utf8) strings.

It's in fact impossible to precisely determine pathname encoding
because different components within the path may have different
encodings, e.g., a utf8 directory name followed by an MBCS filename
is valid on Linux native filesystems.
It's the user's responsibility to keep the iocharset consistent.
2021-07-21 16:49:06 +08:00
Heewa Barfchin
0b1daf7fba Start: fix bug when custom dir missing 2021-05-10 13:24:17 -04:00
Chris Hennes
4f3cc41d65 Modify Start HTML to be valid HTML
Using the W3C validator, a number of minor issues were found with the Start page
HTML. Those items were:
* Missing language setting on the body of the document
* Deprecated attributes set for the style and script tags
* Image tags require alt text
* List tags can only contain list items
* All file:/// URLs must not contain backslashes, even on Windows
2021-01-31 22:13:47 -06:00
Chris Hennes
76e25a3a96 Minor tweaks to Start recommended by LGTM
Using the results of the vulnerability scan at lgtm.com, some minor
changes were made. First, all Python exception handling now explicitly
catches Exception, rather than BaseException (which would include SystemExit
and KeyboardInterrupt). Second, unused imports were removed. Third, a
couple of unnecessary or unused assignments were addressed. Finally, the
JavaScript was modified to explicitly declare the local ddiv variable when
needed.
2021-01-26 20:38:51 -06:00
Chris Hennes
c7f1a49ba4 Add SHADOW replacement 2021-01-08 21:48:31 -06:00
Yorik van Havre
6c7366f76e Start: Fixed freedesktop thumbnail retrieval 2021-01-07 15:36:06 +01:00
Łukasz Stelmach
d1aa56e6b1 Start: encode basename to avoid crashes on non-ascii file names 2020-12-01 14:56:38 +01:00
Yorik van Havre
0b89de1911 Start: Allow to display more than one custom folder on the start page 2020-10-20 12:03:27 +02:00
wmayer
b3d292865f Coverity: [skip ci] Bad use of null-like value 2020-07-21 12:23:10 +02:00
triplus
873769d021 Use relative path to stylesheet fix #4130 2020-03-19 14:25:03 +01:00
Yorik van Havre
58ab713eb5 Start: Added settings button and allow to turn tips off 2020-01-22 12:46:45 +01:00
Markus Lampert
d5820329c5 Added <last> as an option to the workbench selection. 2019-11-01 17:42:14 -03:00
Yorik van Havre
29334052ba Start: Small cosmetic fixes 2019-09-07 16:45:14 -03:00
Yorik van Havre
0fc0476bd8 StartPage: thumbnails for image formats, + use freedesktop thumbnails if available 2019-07-03 10:52:43 -03:00
Yorik van Havre
32ff1c2bf6 Start: Fixed bad default icon in start page 2019-05-02 18:01:08 -03:00
cclauss
361c44c6dc Unicode fixes for Python3 2019-03-17 20:58:00 +01:00
easyw
25b5685a33 fixing kicad StepUp wiki page link 2019-02-26 14:40:02 -03:00
triplus
90d24159aa Start module Py2 encoding
https://forum.freecadweb.org/viewtopic.php?p=287690#p287600
2019-02-19 10:31:00 -03:00
rokuster
a10b865af2 Fix Images Display Issues
- Replace relative Add-On Image Path with full file uri in StartPage.js file
- Fix a missing absolute file path
- Fix a duplicated data folder entry in the Resourcepath
2019-02-06 10:13:11 -02:00
Kurt Kremitzki
0b75a92231 Fix Start WB behavior for missing examples dir in Debian package 2019-01-20 00:36:35 +01:00
Yorik van Havre
6299e11c70 Start: Handle addons with non-standard WB name 2019-01-15 20:01:23 -02:00
Yorik van Havre
61f2633d02 Start: Fixed image file paths 2019-01-14 20:20:12 -02:00
Yorik van Havre
03b84e3a7b Start: Show 'New' button even if recent files list is empty 2019-01-07 19:44:49 -02:00
Yorik van Havre
13981b83ae Start: Don't switch workbenches if we're not in Start anymore 2018-12-31 16:45:16 -02:00
Yorik van Havre
776b7a1e45 Start: Better handling of unicode on py2 2018-12-29 14:41:25 -02:00
Yorik van Havre
112e0e3436 Start: Fixed translation on py2 2018-12-28 11:38:21 -02:00
Yorik van Havre
d59951e814 Start: Use default file icon if mime-based one is unavailable for some reason 2018-11-08 17:56:21 -02:00
luz.paz
ce91b1f766 Misc. typo fix
Found via `codespell`
2018-10-11 16:21:28 -04:00
lorenz
1faca7ee67 StartPage - handle should always return unicode 2018-10-05 11:33:30 +02:00
lorenz
e965b1a8d7 py3: fix unicode problem 2018-10-05 11:33:17 +02:00
Yorik van Havre
c78854ba2e Start: Write test page in non-binary format 2018-10-04 11:11:48 -03:00
Yorik van Havre
f96390883e Start: Fixed freeze when trying to read corrupt fcstd file 2018-10-03 16:33:11 -03:00
Yorik van Havre
4731c17b1e Start: Added pref option to use gradient icon for new files 2018-09-29 12:52:04 -03:00
Pablo Gil
c31dae7c9a Start:
1) replaced link element before li item in order to make the whole box clickable
2) placed "New file" item as first one so that it is always at the same place no matter what session or recent files you have
3) created a thumbnail for "New file" item
2018-09-05 16:07:25 +02:00
Yorik van Havre
9b2082581c Start: additional py3 fixes 2018-08-24 23:10:31 -03:00
Yorik van Havre
dd19005c95 Start: misc improvements
- Hide recent files section if recent files prefs is set to 0
- Better filetype management
- Better tooltip on file thumbnails
- Added notes section (enable in preferences)
2018-08-23 16:00:18 -03:00