Commit Graph

421 Commits

Author SHA1 Message Date
wmayer
2bd89e5771 Start: fixes #10221: /tmp/FreeCADStartThumbnails* directories are not removed when FreeCAD terminates
The commit adds some new functions:

* getThumbnailDir()
  Returns the path to the thumbnail directory which is a sub-directory of the Cache directory.
  There is no need to always create a unique directory after each restart because it doesn't harm
  if the thumbnail directoy contains deprecated files.

* createThumbnailDir()
  Creates the thumbnail directoy if it doesn't exist yet.

* getSha1Hash
  Helper function to compute a SHA-1 hash of a given path. If the same path is passed
  then the hash value will be the same.
  This way it can be avoided to create a different image file from a project file
  after each restart.

* getUniquePNG
  Computes the path of a PNG image file for a given project file. It's also possible
  to pass an arbitrary string as argument.

* useCachedPNG
  If the PNG image exists and if it's newer than the project file True is returned
  and False otherwise.

The changes in detail are:
1. For a given project file it is checked if the thumbnail directory already contains
   a cached image. If it's newer than the project file it will used, otherwise it will
   be re-created.

2. For the system icon to a given file format it is only checked if the icon already exists.
   If yes, it will be used.
2023-10-09 13:54:11 +02:00
wmayer
0398716487 Gui: fixes #10807: By default keep the old tabulated layout of ComboView and TaskView 2023-09-30 17:33:33 +02:00
Chris Hennes
5dfd4d5190 Update translations 2023-09-29 22:57:37 -05:00
Roy-043
2257f3291c Start: use Gui::FileChooser::Directory where applicable 2023-09-22 20:14:57 +02:00
Chris Hennes
730d471fb1 Update translations 2023-09-19 22:25:14 -05:00
Yorik van Havre
1b5565ea9f Merge pull request #10535 from Syres916/Py_311_Unicode_Fix
[Start] Fix Python 3.11 Unicode Errors
2023-09-13 11:41:53 +02:00
pre-commit-ci[bot]
222a2520b1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-12 13:02:35 -04:00
Chris Hennes
857ddacb6e Update translations (#10613)
* Update translations
* Start: Remove Start.ts
2023-09-10 13:06:26 -05:00
Roy-043
22ea529925 Start: Improve "Switch workbench after loading" tooltip
Make it clearer that this property is different from the "Start up workbench".
2023-09-07 09:39:08 -05:00
pre-commit-ci[bot]
a849f752bc [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-09-04 17:32:18 +00:00
Syres916
4c1057c36d [Start] Fix Python 3.11 Unicode Errors
Example Error :
  File "/home/john/freecad-daily-build/Mod/Start/StartPage/StartPage.py", line 422, in handle
    ALTCSS = f.read()
             ^^^^^^^^
  File "/usr/lib/python3.11/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 421: ordinal not in range(128)
2023-09-04 18:15:20 +01:00
Chris Hennes
331b764850 Merge pull request #10520 from qewer33/startpage-quickstart-open
StartPage: Add custom CSS option, re-organize preferences and further fixes
2023-09-04 11:54:39 -05:00
Chris Hennes
70e046bbd5 Start: Final application of pre-commit 2023-09-04 08:18:51 -05:00
qewer33
9dec8d320b Apply pre-commit 2023-09-03 23:51:49 +03:00
qewer33
8bff25d057 Fix CI tests failing 2023-09-03 20:52:58 +03:00
qewer
3656abc578 Merge branch 'master' into startpage-quickstart-open 2023-09-03 19:47:28 +03:00
qewer33
9767898eef StartPage remove hide scrollbars option 2023-09-03 19:30:57 +03:00
qewer33
4e15aa1bfb StartPage fixes 2023-09-03 19:23:13 +03:00
qewer33
2046d8e5a0 Fix StartPage preference widget names 2023-09-03 16:40:58 +03:00
qewer33
f09d503d7b StartPage implement custom CSS preference 2023-09-03 16:21:49 +03:00
wmayer
17bf44ec9a Start: apply clang format 2023-09-03 14:21:53 +02:00
luzpaz
9ed299a57a Fix typos 2023-08-31 22:29:17 -05:00
qewer33
4269c9f4a0 Turn StartPage "Import" quickstart button into "Open" 2023-08-31 22:04:50 +03:00
qewer33
3d251e4986 StartPage CSS fixes 2023-08-31 17:39:34 +03:00
Chris Hennes
6bfafc62dc Update translations 2023-08-29 07:38:09 -05:00
qewer33
2f352b3383 Add StartPage CSS warning comment 2023-08-28 18:15:15 +03:00
qewer33
1c13ce1b11 Add file thumbnail icons hide and size options to StartPage 2023-08-28 18:07:33 +03:00
qewer33
1c446b1161 Make StartPage tips use BackgroundTextColor 2023-08-28 16:52:34 +03:00
qewer33
65a826dbfc Change default StartPage BackgroundTextColor value 2023-08-28 16:50:19 +03:00
qewer
0a093e1ed1 StartPage: Visual overhaul and CSS fixes (#10391)
* StartPage visual overhaul and CSS fixes
* Add qewer33 to CONTRIBUTORS
2023-08-27 13:27:53 -05:00
qewer
62251818c7 StartPage: Fix new file templates issues (#10291)
* Make StartPage new file template buttons use if instead of match

* Make StartPage Part design new file template not create a sketch

* Remove StartPage Part new file template and rename Part Design template based on community feedback

* StartPage LoadNew.py fix indentation
2023-08-21 13:58:29 -05:00
wmayer
9a749e51c8 Mod: modernize C++: use equals default 2023-08-21 20:21:30 +02:00
luzpaz
ed9ff68935 Fix typos 2023-08-21 20:20:47 +02:00
Chris Hennes
09edbbebaf Merge pull request #10258 from chennes/translations20230814
Update translations
2023-08-18 08:52:13 -05:00
wmayer
7750ff78b7 Start: the Start workbench should show the basic commands in the various context-menus.
See also https://forum.freecad.org/viewtopic.php?t=80498
2023-08-18 08:45:02 -05:00
Chris Hennes
28f396cc75 Update translations
Adds the ten units strings from Base as well.
2023-08-16 22:50:39 -05:00
Chris Hennes
7d92236c22 Merge pull request #10171 from qewer33/master
StartPage: Add new file templates and fix javascript error
2023-08-16 15:02:18 -05:00
qewer33
58b9a9f65e Remove StartPage new file button gradient option 2023-08-16 14:33:55 +03:00
wmayer
f24ada3151 Start: modernize C++: use range-based for loop 2023-08-15 14:00:43 +02:00
qewer33
da0defbb8a Tweak StartPage new file template descriptions and make arch template work with the BIM workbench 2023-08-13 21:42:19 +03:00
qewer33
74d02a69f2 Fix StartPage javascript error when switching tabs 2023-08-11 20:02:33 +03:00
qewer33
0e606ec1d1 Add new file section and file templates to StartPage 2023-08-11 19:50:26 +03:00
Chris Hennes
d3c08a2da9 Update translations 2023-08-08 17:52:59 -06:00
Yorik van Havre
ebc65ee713 Merged crowdin translations 2023-07-26 11:05:11 +02:00
Yorik van Havre
9f1e2c9f37 Merge pull request #9970 from bdieterm/patch-4
fix encoding on StartPage file information
2023-07-26 10:52:00 +02:00
Chris Hennes
6838740153 Update translations 2023-07-24 13:37:52 +00:00
bdieterm
e992fe291b fix encoding on StartPage file information 2023-07-22 17:37:46 +02:00
Petter Reinholdtsen
8fe64be7d1 Removed trailing whitespace discovered by github linter.
While working on https://github.com/FreeCAD/FreeCAD/pull/9880,
I discovered a lot of linter issues.  These fixes all of them.
2023-07-10 16:06:52 +02:00
Chris Hennes
6f97b74fdb Apply translations 2023-07-09 18:09:53 -05:00
Petter Reinholdtsen
c5f885dfb9 Change Start page to no longer dial home by default.
When starting FreeCAD for the first time, it load the HTML content of
src/Mod/Start/StartPage/StartPage.html and show it as a friendly startup page.
Unfortunately, one of the tabs in the startup page is an iframe loading the content of
https://blog.freecadorg/.  The effect is that every time one start FreeCAD, it dial
home over the Internet with a HTTP request to the mentioned URL.  This is a privacy
problem.  At the moment the blog page in turn will connect to https//i0.wp.com/ and
https//s0.wp.com/, in effect also reporting the startup to Wordpress.  Please do not
dial out without the expressed approval and on request of the user of the program.

This patch change the startup page to instead of putting the blog posts in a tab, it
will link to the blog and the connection is only established when the user click on
'BLOG' in the start page.  It include a link tooltop to make it easier to understand
that this will bring the user to a new page.
2023-07-07 14:37:54 +02:00