Autoload

A forum for research and development of the user interface of FreeCAD

Moderator: agryson

chrisb
Posts: 24268
Joined: Tue Mar 17, 2015 9:14 am

Re: Autoload

Post by chrisb » Fri Jun 30, 2017 9:53 pm

triplus wrote:
Fri Jun 30, 2017 7:34 pm
P.S. Need to rename what?
HelloWorld.py -> Autoload_HelloWorld.py

triplus
Posts: 9428
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus » Fri Jun 30, 2017 10:18 pm

chrisb wrote:
Fri Jun 30, 2017 9:53 pm
triplus wrote:
Fri Jun 30, 2017 7:34 pm
P.S. Need to rename what?
HelloWorld.py -> Autoload_HelloWorld.py
There is no need to create HelloWorld.py first. If you plan to add some code to be loaded on FreeCAD start you need to use the Autoload_ prefix in the first place. And as for your other concern. I don't feel it clutters the macro folder to have the module to be loaded there. As i do imagine regular user does want to have it listed in the macro dialog. And to be able to create, delete and edit it at any time from the macro dialog GUI and by using built in code editor. Any other option likely involves more complex workflow to achieve the same result and therefore makes less sense to me. Whoever wants to use more complex option likely won't use Autoload module in the first place and therefore likely isn't the target audience.

chrisb
Posts: 24268
Joined: Tue Mar 17, 2015 9:14 am

Re: Autoload

Post by chrisb » Fri Jun 30, 2017 10:22 pm

Thanks for the answers, you are probably right.

fc_tofu
Posts: 481
Joined: Sun Jan 05, 2020 4:56 pm

Re: Autoload

Post by fc_tofu » Wed Jan 29, 2020 2:57 pm

triplus wrote:
Fri Jun 16, 2017 4:07 pm
Autoload.png

Autoload module for FreeCAD.

Provides ability to load more workbenches on FreeCAD start. Such ability can be useful for workbench customization purposes and in combination with modules such as PieMenu, ShortCuts, CommandPanel ...

Code repository:

https://github.com/triplus/Autoload
Thank you, triplus, I use Autoload as a workaround to prevent custom toolbar being erased before loading related workbench.
https://forum.freecadweb.org/viewtopic. ... 05#p364205
And it really worked well.

Based on Autoload 20190227 official release, I made a little revision for UI. I'm not a coder. This revision is for explanation of my suggestion.
1. change menu position under "Tools" (for my own practice)
2. resize dialog window smaller, from 800*450 to 400*400 (for low res monitor)
3. add StatusTip, "Load specified workbenches and macros on startup" (for new users)
fsc_2020-01-30_014818.jpg
fsc_2020-01-30_014818.jpg (131.42 KiB) Viewed 202 times
fsc_2020-01-30_085349.jpg
fsc_2020-01-30_085349.jpg (44.55 KiB) Viewed 172 times
Autoload_Gui.py
(7.97 KiB) Downloaded 3 times
Last edited by fc_tofu on Thu Jan 30, 2020 1:01 am, edited 4 times in total.

triplus
Posts: 9428
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus » Wed Jan 29, 2020 5:38 pm

fc_tofu wrote:
Wed Jan 29, 2020 2:57 pm
Thank you, triplus, I use Autoload as a workaround to prevent custom toolbar being erased before loading related workbench.

And it really worked well.
You're welcome and good to hear that.
As for the UI, I would like the "Autoload" menu directly put under "&Tools" menu.
There is lot of room left in "&Tools" menu, compared with those giants such as Part/PartDesign/Draft/A2plus menu.
And I dont think the up level "Accessories" menu is a good idea, it only waste mouse click.
It used to work like that, but there are issues involved on some platforms, like macOS, that don't make the Tools menu a viable option anymore. In addition it's not just Autoload module, there are a few more, available in the Addons manager, that utilize the Accessories menu. In the future some functionality will likely get upstreamed, then it should be possible again, to put the Accessories menu under the Tools menu.
Last, how to add tooltip for Autoload, just like those native menu, ie, Tools>Addon Manager.
Any suggestion on what should such tooltip say? Something like "Manage automatic loading of workbenches and macros"?

fc_tofu
Posts: 481
Joined: Sun Jan 05, 2020 4:56 pm

Re: Autoload

Post by fc_tofu » Wed Jan 29, 2020 6:16 pm

triplus wrote:
Wed Jan 29, 2020 5:38 pm

Any suggestion on what should such tooltip say? Something like "Manage automatic loading of workbenches and macros"?
I change my last post, and give my example. Thank your quick and detailed response.

triplus
Posts: 9428
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus » Wed Jan 29, 2020 6:53 pm

The part about modifying the location (Tools menu). That likely works on your local setup, but as said and if you will look at the mentioned issue report, it doesn't work cross-platform. You can continue to use that patch locally for sure. As for the tooltip, looks good to me. Any interest in creating a tooltip oriented PR on GitHub?

https://github.com/triplus/Autoload

fc_tofu
Posts: 481
Joined: Sun Jan 05, 2020 4:56 pm

Re: Autoload

Post by fc_tofu » Thu Jan 30, 2020 12:34 am

triplus wrote:
Wed Jan 29, 2020 6:53 pm
The part about modifying the location (Tools menu). That likely works on your local setup, but as said and if you will look at the mentioned issue report, it doesn't work cross-platform. You can continue to use that patch locally for sure. As for the tooltip, looks good to me. Any interest in creating a tooltip oriented PR on GitHub?

https://github.com/triplus/Autoload
I'm very happy if you adopt any of my suggestions. :D
But, I am not a coder, and dont have GitHub account. So, you should bother to add StatusTip yourself.
BTW, as an unruled common practice, menu text followed by 3 ellipsis dots means to open a dialog.
Here, menu text "Autoload..." would be better than "Autoload". IMHO.

Code: Select all

    pref = QtGui.QAction(mw)
    pref.setText("Autoload...")
    pref.setObjectName("Autoload")
    pref.setStatusTip ("Load specified workbenches and macros on startup")

triplus
Posts: 9428
Joined: Mon Dec 12, 2011 4:45 pm

Re: Autoload

Post by triplus » Thu Jan 30, 2020 8:42 pm

fc_tofu wrote:
Thu Jan 30, 2020 12:34 am
But, I am not a coder, and dont have GitHub account.
Never too late to start.
IMHO.
Done.

Post Reply