Commit Graph

146 Commits

Author SHA1 Message Date
luz paz
eef27b845f Start: header uniformity + whitespace management + misc. pep8 fixes 2022-01-08 18:28:27 +01:00
Chris Hennes
768a0f086f Addon Manager: Rework backend to use package.xml
This shifts to use the model-view-controller pattern for the list of addons,
and moves to using a full model class rather than an indexed array for the
data storage and management. This enables much more information to be stored
as part of the new AddonManagerRepo data type. It now wraps the Macro class
for macros, supports Preference Packs, and provides access to the Metadata
object.
2021-12-18 20:29:42 -06:00
wmayer
bce8c25421 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
b8f4a152d3 Start: Fixed faling test 2021-08-30 15:36:13 +02:00
川島和津実
a95e9549a6 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
川島和津実
3b6c442187 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
1d74880ac2 Revert "Start: Properly hash thumbnail filenames" 2021-08-17 14:28:47 -05:00
GUAN Xin
dab4168008 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
8cefceaf99 Start: fix bug when custom dir missing 2021-05-10 13:24:17 -04:00
Syres916
4d3ecdab68 Added missing </a> as per review 2021-02-15 20:12:39 +01:00
Syres916
baf5e5398e [Start] Enable hyperlink for installed Addons
as per discussion https://forum.freecadweb.org/viewtopic.php?f=8&t=55623
2021-02-15 20:12:39 +01:00
Chris Hennes
1958e30f84 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
ba8e0aa863 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
a0aaae7ead Add SHADOW replacement 2021-01-08 21:48:31 -06:00
Yorik van Havre
d339e40671 Start: Fixed freedesktop thumbnail retrieval 2021-01-07 15:36:06 +01:00
Yorik van Havre
55219f85d4 Start: Added tooltip to preferences button 2021-01-05 16:54:23 +01:00
Łukasz Stelmach
a8da70e7ff Start: encode basename to avoid crashes on non-ascii file names 2020-12-01 14:56:38 +01:00
luz paz
d238da0fab StartWB: Make all file headers uniform and trim whitespace [skip-ci]
[skip ci]
2020-11-19 13:42:23 +01:00
Yorik van Havre
eee68a314b Start: Allow to display more than one custom folder on the start page 2020-10-20 12:03:27 +02:00
wmayer
617668a7f2 Coverity: [skip ci] Bad use of null-like value 2020-07-21 12:23:10 +02:00
Yorik van Havre
66d7583e45 Start: Fixed loading of non-FCStd files from Start page 2020-05-29 12:04:58 +02:00
triplus
af5e7abe46 Use relative path to stylesheet fix #4130 2020-03-19 14:25:03 +01:00
donovaly
f2c83ac46b remove program-specific SVG namespaces
while fixing a SVG export issue for techDraw I noticed that some SVG files have program-dependent (and thus not clean) code in it. These are traces of the programs Sodipodi and Inkscape, like e.g. this line:
inkscape:export-filename="/home/yorik/PartDesign_Groove.png

This is unnecessary and FC should not use program-dependent code in the SVG but use instead plain SVG strictly following the SVG specification.

This PR transforms the few affected SVGs to a plain version.
2020-02-07 07:34:49 -05:00
Zheng, Lei
992dc49ece Do not throw error when open an already opened document 2020-02-05 11:12:00 +01:00
Yorik van Havre
6fee2cda22 Start: Added settings button and allow to turn tips off 2020-01-22 12:46:45 +01:00
Markus Lampert
c6c761b812 Added <last> as an option to the workbench selection. 2019-11-01 17:42:14 -03:00
Yorik van Havre
96e5d20a73 Start: Small cosmetic fixes 2019-09-07 16:45:14 -03:00
Yorik van Havre
622eadc80c StartPage: thumbnails for image formats, + use freedesktop thumbnails if available 2019-07-03 10:52:43 -03:00
Yorik van Havre
d4ed08f75a Start: Fixed bad default icon in start page 2019-05-02 18:01:08 -03:00
cclauss
e3545c8c06 Unicode fixes for Python3 2019-03-17 20:58:00 +01:00
easyw
29ae44e083 fixing kicad StepUp wiki page link 2019-02-26 14:40:02 -03:00
triplus
99b289e541 Start module Py2 encoding
https://forum.freecadweb.org/viewtopic.php?p=287690#p287600
2019-02-19 10:31:00 -03:00
rokuster
59f39e2a33 file uri instead of relative path for images
Windows conda build needs a file uri to the image. This fix needs also changes in StartPage.py
2019-02-06 10:13:11 -02:00
rokuster
ddc27357f5 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
luz.paz
06967e2b4d Crowdin: StartPage/TranslationTexts.py grammatical fix 2019-01-30 11:08:03 -02:00
Yorik van Havre
090fc64284 Misc translation fixes from https://forum.freecadweb.org/viewtopic.php?p=281670 2019-01-23 18:20:43 -02:00
Kurt Kremitzki
2e03740572 Fix Start WB behavior for missing examples dir in Debian package 2019-01-20 00:36:35 +01:00
Yorik van Havre
71d57b3760 Start: Handle addons with non-standard WB name 2019-01-15 20:01:23 -02:00
Yorik van Havre
3f51e25b26 Start: Fixed image file paths 2019-01-14 20:20:12 -02:00
wmayer
24f1b023ef also set default view orientation when creating document from Start workbench 2019-01-14 14:43:41 +01:00
Yorik van Havre
6efd6de4c1 Start: Show 'New' button even if recent files list is empty 2019-01-07 19:44:49 -02:00
wmayer
2c838bfc7d fix typo in StartPage module 2019-01-04 10:56:34 +01:00
Yorik van Havre
1a7d3d9a37 Start: Don't switch workbenches if we're not in Start anymore 2018-12-31 16:45:16 -02:00
Yorik van Havre
6cdeab9c14 Start: Fixed single quotes display 2018-12-30 12:47:19 -02:00
Yorik van Havre
e83c44200a Start: Better handling of unicode on py2 2018-12-29 14:41:25 -02:00
Yorik van Havre
42e6650ac0 Start: Fixed translation on py2 2018-12-28 11:38:21 -02:00
triplus
9fc8446c95 Notepad reliability
Notepad save/load functionality should work without the need to enable "Authorize FreeCAD to access the internet".

https://forum.freecadweb.org/viewtopic.php?f=10&t=30340&start=110#p269908
2018-11-22 10:24:44 -03:00
Yorik van Havre
4d0c856fa0 Start: minor py3 fix 2018-11-09 17:59:36 -02:00
Yorik van Havre
7d197ce829 Start: Use default file icon if mime-based one is unavailable for some reason 2018-11-08 17:56:21 -02:00
luz.paz
125f41e3e8 Misc. typo fix
Found via `codespell`
2018-10-11 16:21:28 -04:00