fix file chooser in macro dialog
do not remove GUI text from translation
remove friend class declaration, use Qt's introspection mechanism
create dialogs on the stack because they are modal
some minor optimizations
* allow user to disable seeing first messagebox again in the future
* check if macro action already exists, if so skip first dialog
* pre-select macro for user in macro command list in toolbars tab
* expand all custom macro toolbars in the toolbar tree list
With the Duplicate button a macro is duplicated with a new name, e.g. duplicate a macro named "MyMacro.FCMacro" and you get a new duplicate file named "MyMacro@001.FCMacro", but the user has opportunity to override the new name with a name of his own or to cancel the operation.
Functionality is similar to already existing ability to create copies of the .FCStd file, only for macros, and this must be done manually for each new file. Will be useful to coders mostly. Expected use case could be to save a history of the macro periodically as changes are made or perhaps to duplicate the macro first, and then make changes to the duplicate, eventually replacing the original once satisfied with the changes.
New code is based largely on existing code from rename operation, but with QFile.copy() instead of QFile.rename() used, along with other changes needed, such as generating the new suggested filenames.
link to forum discussion and demonstration video:
https://forum.freecadweb.org/viewtopic.php?f=8&p=254014&sid=98243801791920b69086a3fcd4699e34#p254014
Not sure how to make the Duplicate button label text translate when changing languages.
Adds a button labeled Addons... to the macros dialog below the create, edit, delete, and rename buttons. Clicking the Addons... button will open the same dialog available from Tools -> Addon Manager menu.
Convenience for experienced users, but new users who might not know about the addon manager will be able to see it here, too.
+ remove check for write-protected macro because this still can be renamed
+ do nothing if the user didn't define a different file name
+ keep the item in the list view selected
===============================================
What?
Implementation of triplus' idea of making user-specific and system-specific macros
having a different list in different tabs.
Fixing of a bug related to the previous "separator".
Suggested terminology.
=====================================================
What?
It was suggested that the macros should be moved to AppUserHome/Macro
http://forum.freecadweb.org/viewtopic.php?f=10&t=13433
Solution:
The solution is backwards compatible in the sense that if you have a running
configuration, updating should not change anything.
For new installations the macro directory will default to AppUserHome/Macro. However
this would break all the installation scripts (probably also ME's plugin manager).
Conflicts:
src/Mod/Path/Gui/AppPathGuiPy.cpp
===============================================
What?
Support for executing system-wide macros in /usr/lib/freecad/Macro
http://forum.freecadweb.org/viewtopic.php?f=10&t=13433
Why?
To allow to package macros and install them system-wide so that they are available to all users.