Commit Graph

31 Commits

Author SHA1 Message Date
wmayer
71818b466d Gui: implementation classes don't inherit from UI classes any more 2020-01-09 14:30:45 +01:00
wmayer
a4724b3e69 Fix some regressions in Python editor:
* show again asterisk when modifying the content
* show still only filename in tab when modifying from outside
2019-11-29 20:02:34 +01:00
mwganson
72f895571f show only filename in macro editor tab rather than full path, fixes issue #4063 2019-07-21 19:14:23 +02:00
wmayer
c3aaa69f51 Fix some regressions of PR 2330
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
2019-07-21 15:53:14 +02:00
mwganson
eb2ebe5bbf [macros toolbar walkthrough] Use command manager to check for existing macro action rather than looking through user parameters 2019-07-21 13:57:30 +02:00
mwganson
2100fe3e38 [macro toolbar walkthrough] change dialog parent to this instead of main window, for avoiding warning message when closing macro execute dialog 2019-07-21 13:57:20 +02:00
mwganson
403131211d [macros toolbar walkthrough]
* 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
2019-07-21 13:57:11 +02:00
mwganson
f89aca12ca [toolbar walkthrough] add more error checking to prevent potential crash if customize dialogs change. Remove final messagebox about switching workbenches to apply changes and add that information to the first messagebox. 2019-07-21 13:56:59 +02:00
mwganson
e15e06a166 Walkthrough for adding macros to custom global toolbar 2019-07-21 13:45:38 +02:00
Mateusz Skowroński
ac508516da Use QString's multi-arg overload to save memory allocations. [-Wclazy-qstring-arg] Thanks Clazy! 2019-02-11 15:39:14 +01:00
Mark Ganson TheMarkster
788873fc65 Add Duplicate button to Execute Macro dialog
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.
2018-09-03 11:08:16 -03:00
Mark Ganson TheMarkster
f721dd9a17 Add link button to Addon Manager to Macros dialog
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.
2018-09-01 22:21:33 +02:00
luz.paz
9167064fc1 Misc. typos
Found via `codespell`
2018-04-25 09:41:33 -03:00
wmayer
938dae033e Improvements for PR973 to rename a macro:
+ 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
2017-09-07 10:33:16 +02:00
apelly
a2465b8291 Add a rename option to the macro dialog
Forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=24005
Fixes #3173
2017-09-07 10:31:35 +02:00
Yorik van Havre
b05987fada Create the macro path if inexistant when saving a macro 2016-02-05 16:40:53 -02:00
wmayer
268e545463 + allow to open system macros in read-only mode 2016-01-12 01:26:34 +01:00
wmayer
3e4a49671c + fix whitespaces 2016-01-11 23:48:59 +01:00
Abdullah Tahiri
2dd6a72629 Gui Bug fix: Tabbed support for system-wide macros
===============================================

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.
2016-01-11 19:25:36 +01:00
Abdullah Tahiri
2c884ab5f5 Gui Enhancement: Support for macros in AppUserHome/Macro
=====================================================

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
2016-01-11 19:24:22 +01:00
Abdullah Tahiri
89c3399bb7 Gui Enhancement: Support for system-wide macros
===============================================

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.
2016-01-11 19:22:50 +01:00
Mateusz Skowroński
6942c23895 Qt4's qglobal.h defined TRUE and FALSE. Qt5 does not do it anymore. Replace it with true and false.
158f39ec78

This change is Qt4/Qt5 neutral.
2016-01-05 16:43:33 +01:00
Mateusz Skowroński
f48f0f69be Qt::WFlags is obsolete in Qt5. Replace it with Qt::WindowFlags.
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:58 +01:00
Mateusz Skowroński
c275b35d48 QString::fromAscii() is obsolete in Qt5. Replace it with fromLatin1().
This change is Qt4/Qt5 neutral.
2016-01-05 16:07:25 +01:00
wmayer
b45f321f9c + issue: #0002350, handle Python's SystemExit exceptions and do not exit application when running from macro dialog or Python editor 2015-12-27 23:00:59 +01:00
Mateusz Skowroński
05f95c0506 Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
wmayer
343bb91450 + issue #0002053: Support of themes 2015-07-12 22:54:56 +02:00
wmayer
d2501d4cc8 + use dialog button box where possible, replace old Python icon 2014-03-08 15:17:56 +01:00
wmayer
9e01b412cf + fixes #0001448: Newly created python macros don't have an asterisk in their window title. 2014-02-28 11:30:04 +01:00
wmayer
7e0d525443 + 0000484: Try to change the macro location causes crash.
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5128 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-13 22:34:19 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00