Commit Graph

4686 Commits

Author SHA1 Message Date
Paddle
3c1c84cd1c Add 'Tree settings' menu to the tree contextual menu. Also adds 'Show description column' setting in it. 2023-06-02 10:52:29 +02:00
Paddle
9611bac313 Core: Tree: Change the default of the preference to hide the seldomly used 'Description' colum.
On top of that the headers are now hidden if the description column is hidden.
2023-06-02 10:52:29 +02:00
Paddle
c456a4e533 Core: Tree: Remove useless "Application" root item. 2023-06-02 10:52:28 +02:00
Abdullah Tahiri
6cced4defb Gui: Command execution output for Developer only
================================================

Problem:
Command execution templates currently are send to Console() error,
which sends messages to both developers and users.

A user sees an error message (for example in the notifications area)
which is just the Python command that FreeCAD executed due to user's
input. This annoys users who do not understand Python and it is not
informative for them.

It is however informative for a developer, who can associate which
command produced which error/exception.

Solution:
To make these messages intended for the Developer only. So that regular
users are not annoyed.

Of course, Developers and power users can always select in preferences,
under Notification Area to be shown debug errors and warnings. In which
case nothing really changes.
2023-06-01 19:25:00 +02:00
Jolbas
7fdfdcde49 Fix clipping near camera in orthogonal view
Fix #6836
2023-05-31 20:10:28 -04:00
Abdullah Tahiri
667095e856 Gui: Unavailable toolbars default to visible when made available
================================================================

https://github.com/FreeCAD/FreeCAD/issues/9208#issuecomment-1567469254

Issue:
- Unavailable toolbars default to not visible (as they are unavailable)
- However, when made available, they remain not visible. There may be
  cases when this is indeed the wanted behaviour, but they are not the
  ones we are facing.
- In the latter, the user expects the toolbars to show (and the
  configuration file to be saved with all toolbars showing.

Solution:
- Change the default behaviour of Unavailable toolbars when forcing
  them to be available, so that they are visible when made available.
- If then the case arises that we have toolbars where we would prefer
  then to be left not visible when making them available (so they are
  listed in the toolbar context menu to make them visible, but not
  visible per default), then we would need to create another toolbar
  policy class "UnavailableHidden".
- I chose not to add it directly (although it is straightforward) in
  fear that we will never need it, and it would make the code more
  complex to understand and thus maintain.
2023-05-30 16:37:53 +02:00
Abdullah Tahiri
554ede35d2 Sketcher/Gui: Extend toolbar framework and fix toolbar visibility not preserved
=================================================================================

fixes #9208

Essentially:
- The regular mechanism to save toolbar state when changing from one WB to another
is not designed to support changes within one WB (e.g. from edit mode and back).
- At creation time, toolbars can be initialised with default visible or default hidden
state. Additionally, there is third configuration "Unavailable", which refers to a
toolbar that is hidden, and the control to enable it is also hidden by default.
- The ToolBarManager is extended to enable to set the State of one or more toolbars.
- The State refers to changes to be effected on one or more toolbars by client code:
* ForceHidden allows to hide a toolbar and also hide its control (a toolbar not available
in a mode).
* ForceAvailable allows to make a toolbar available by making its control visible, the
toolbar itself is visible or not depending on user settings.
* RestoreDefault allows to bring the control visibility to the default of the toolbar, the
toolbar itself is visible or not depending on user settings.
* SaveState allows to store the current visibility state of a toolbar. It enables client
code to save the state when appropriate. It provides the only option for default "Unavailable"
toolbars, which are fully managed by client code. It provides additional flexibility to save
other toolbar visibility on request.

For the Sketcher this means:
- That edit mode toolbars are not shown outside edit mode.
- That edit mode toolbars and non-edit mode toolbars can be configured independently.
- that edit mode toolbars' state is saved when leaving edit mode if and only if, the
workbench that is selected when leaving edit mode is the Sketcher WB.
- it won't save the state if the user manually selected another WB and then left edit
mode (why? see limitation above).

Limitation:
- When switching to another WB while in edit mode, the other WB is activated before the
current WB (sketcher WB) is deactivated. This means that at sketcher level, the sketcher
has no chance to save states or do other tidy up actions before the tools of the other WB
are activated.
- This, however, is understood as not relevant enough as to warrant changing the mechanisms
in place.
2023-05-30 16:37:53 +02:00
Chris Hennes
2686ad58b9 Update translations 2023-05-25 21:32:26 -05:00
Chris Hennes
1ea981c34a Gui: Don't show raw exception to user 2023-05-24 20:57:43 +02:00
Abdullah Tahiri
6a797bc1e9 Gui: Notifications Framework - accept more notifier types
=========================================================

Extends notifier types to Gui::Document, App::Document, Gui::ViewProviderDocumentObject.

This allows to pass these objects as notifiers, and the framework gets the right string
from the Label or FullLabel as appropriate.
2023-05-24 18:35:41 +02:00
Abdullah Tahiri
28b7176691 NotificationArea/Preferences: Allow Opt-in for Developer warnings and errors
============================================================================

The old preferences had errors and warnings ON by default and allowed to opt-out.
It was not possible to separate errors/warnings intended for users from those intended for developers.

The new version has developer errors and warnings OFF by default. User intended ones are ON.
It is possible to opt-in for developer errors and warnings from the preferences dialog.

As developer errors and warnings are NOT translated, if opting-in, they won't be localised.

User errors and warnings should be translated. If they are not, it is a bug.
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
5e5d863968 Console: Remove Translated Notification message
===============================================

With the new console extension, the translation state is coded separatedly.

Therefore, it is possible to code a Notification as translated without needing a specific type.

Additionally, any other message, such as Error of Warning can be translated.

It does not make sense to leave this message, if only for reasons of coherence and to simplify
maintainance of code.
2023-05-23 14:24:45 +02:00
Abdullah Tahiri
3b04601ade Gui: Adapt Notifications Framework 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
3097892d08 App: NotificationArea adaptation to the new messages 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
5f52885fbf Ilogger - Separate behaviour for user exposed and not exposed loggers 2023-05-23 14:24:45 +02:00
Abdullah Tahiri
9d9f928b2d Console: Extend framework with intended recipient and content type metainformation
==================================================================================

Limitations of the current framework:
- Codes the translated state only for TranslatedNotification as part of the type.
- Does not code the intended recipient (user, developer, ...)

Problems:
- Some errors are intended for developers, some errors may only be intended for users,
if, for example, there is another developer error which already contains all the information.
The current framework may lead to information duplication or to showing to the user developer
information, which is perceived as annoying.
- Logs shall be in English (report view), while every message to the user (UI) shall be translated.
The current framework can only differentiate where to report based on subscription (legacy logs do not
subscribe to notifications), and for notifications, whether it is translated or not depends on the type.
It is not possible to code errors or warnings that are already translated.

Solution:
- To extend the ILogger interface with additional metainformation, indicating the intended recipient
(User, Developer, All), and the content of the message (translated, untranslated, untranslatable). The latter
is useful for dynamic strings that won't find a match in the translation framework.

Bonus:
- This extended version allows to do away with translatednotification, as now any message can be independently
marked as translated or untranslated or untraslatable.
- It is now possible to provide the right icon of severity (error, warning, info), even when it is only user intended
and already translated.
2023-05-23 14:24:45 +02:00
Chris Hennes
452067c43c Update translations 2023-05-21 19:13:11 -05:00
Chris Hennes
38230171f4 Merge pull request #9614 from chennes/fixPrefPageContext
Gui: Correct translation context of pref pages
2023-05-20 19:53:32 -05:00
Chris Hennes
37a7eef2ac Merge pull request #9215 from marioalexis84/gui-window_parameter
Gui: Add function in WindowParameter class to connect slot to ParameterManager signal
2023-05-19 22:45:48 -05:00
Chris Hennes
b8c15bdcaa Merge pull request #9603 from chennes/windowsVersionHack
Gui: Hack to get Windows 11 version
2023-05-19 21:12:19 -05:00
Chris Hennes
c0726b8481 Gui: Correct translation context of pref pages
Preference page title strings must be in QObject
2023-05-19 20:46:12 -05:00
Chris Hennes
19b5e8bce9 Gui: Hack to get Windows 11 version 2023-05-19 10:27:21 -05:00
Chris Hennes
2798528b8f Update translations 2023-05-18 07:49:08 -05:00
Chris Hennes
ba5e7b184d Merge pull request #9596 from chennes/macVersionInfoHack
Gui: Mac version info hack
2023-05-17 20:07:46 -05:00
Chris Hennes
9be9f2f8d1 Merge pull request #9582 from chennes/translateUnitSchemes
Gui: Translate unit system UI
2023-05-17 11:06:27 -05:00
Chris Hennes
de6b9f0848 Merge pull request #9551 from chennes/syncQtTranslations
Gui: Sync translation files with Qt project
2023-05-17 11:04:43 -05:00
Chris Hennes
456371590b Gui: Hack to ensure good macOS version number 2023-05-16 21:34:07 -05:00
Chris Hennes
8b73653633 Gui: Translate unit system UI 2023-05-15 20:16:46 -05:00
wmayer
10758b02f5 [skip ci] Gui: PrintWarning has been moved to Console module 2023-05-15 15:58:48 +02:00
wmayer
286b8088d8 Gui: check for QApplication instance to avoid crash 2023-05-14 18:50:35 +02:00
Chris Hennes
087ab20fb9 Gui: Sync translation files with Qt project 2023-05-11 22:06:18 -05:00
Chris Hennes
b0dc472aca Merge pull request #9541 from Ondsel-Development/wb_prevent_duplicates
Pref: Wb: prevent duplicate workbenches in the lists.
2023-05-11 19:33:22 -05:00
Paddle
710cb5d81f Pref: Wb: prevent duplicate workbenches in the lists. 2023-05-11 10:25:29 +02:00
Chris Hennes
b9e589ebad Merge pull request #9497 from wwmayer/generate_qm_files
Generate qm files
2023-05-10 18:18:25 -05:00
wmayer
b6951d2bb6 Gui: when loading SVG images get default size and keep aspect ratio
See forum: https://forum.freecad.org/viewtopic.php?p=680800#p680800
2023-05-10 11:59:44 +02:00
Rexbas
15462488ba Fix typo 2023-05-09 10:31:38 +02:00
Rexbas
5b3957b43a Add method to find the nearest orientation 2023-05-09 10:31:38 +02:00
Rexbas
fac1a5b3de Cleanup unused NaviCube methods 2023-05-09 10:31:38 +02:00
Rexbas
dc0f6c9534 Apply the rotation that is stored in the NaviCube face 2023-05-09 10:31:38 +02:00
Rexbas
fed59b3584 Determine rotation direction of NaviCube buttons 2023-05-09 10:31:38 +02:00
Rexbas
e75f0cb247 Determine standard orientations of NaviCube faces 2023-05-09 10:31:38 +02:00
wmayer
478b5e0628 Gui: fix NaviCube in split views (fixes #9500)
* initialize base and hilite color with more sensible default values
* handle case if no font name is set
* apply user preferences to NaviCube
2023-05-08 10:05:01 +02:00
wmayer
cc35c6167c Gui: Create .qm out of .ts files 2023-05-07 08:52:49 +02:00
Chris Hennes
e30a768e0a Merged crowdin translations 2023-05-06 11:56:32 -05:00
wmayer
c268d8e3d7 Gui: disable lighting for the label of an axis
This way the backside of the label is displayed with the same color as the front side. Otherwise it may be black.
2023-05-05 22:00:55 -04:00
Ronny Standtke
f8ae7ba722 Origin axis: use same colors as axis cross and make bigger than planes
for easier selection and visualization
2023-05-05 03:09:36 -04:00
Ronny Standtke
adb40e5634 Origin plane: make plane faces unpickable 2023-05-05 03:09:36 -04:00
Ronny Standtke
28d5f47b14 Origin plane: add semi transparent face 2023-05-05 03:09:36 -04:00
Jolbas
3fd1f4b7da Compability with OpenGL ES
Replace glPolygonMode() and GL_POLYGON with GL_LINE_LOOP
Replace glDepthRange() with glPolygonOffset()
Some cleanup in configuring openGL
2023-05-04 17:38:48 -04:00
wmayer
b0c9871722 Use View3DInventorViewer::setSelectionEnabled instead of SoFCUnifiedSelection::selectionRole 2023-05-04 08:03:11 +02:00