[Solved] [Feature Request] Rename macro

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

[Solved] [Feature Request] Rename macro

Postby Sam » Mon Aug 21, 2017 7:54 pm

Code: Select all

OS: Ubuntu 16.04.3 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.11827 (Git)
Build type: None
Branch: master
Hash: ca4488f4387f761df47322038585b23cb5a1bd73
Python version: 2.7.12
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: English/UnitedKingdom (en_GB)
It occurred to me that it'd save me some time, and probably a bunch of others, if you were able to rename macros from the macro dialog. A rename button, or F2 on the name.

Not important. Just an idle thought about some polish.
Last edited by Sam on Thu Sep 07, 2017 11:08 pm, edited 1 time in total.
jaisejames
Posts: 320
Joined: Sat Sep 24, 2016 6:51 am

Re: [Feature Request] Rename macro

Postby jaisejames » Tue Aug 22, 2017 9:24 am

+1
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: [Feature Request] Rename macro

Postby Sam » Wed Aug 30, 2017 1:14 pm

Disclaimer: I was fooling around. I have not reviewed the coding standards documentation.

I compiled FreeCAD today because I was hoping to test a couple of patches that haven't been merged yet. But I got distracted.

I have no idea what the local procedure is for this, but here's a patch to rename macros from the macro dialog. I also tidied up the button behaviour a little and clobbered a bit of white space.

It's late, so I'm sure it could do with some rounding out, but it works for me as it is.
Attachments
0001-Add-a-rename-option-to-the-macro-dialog.patch.txt
(7.2 KiB) Downloaded 36 times
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: [Feature Request] Rename macro

Postby easyw-fc » Thu Aug 31, 2017 12:18 pm

Sam wrote:
Wed Aug 30, 2017 1:14 pm
I have no idea what the local procedure is for this, but here's a patch to rename macros from the macro dialog.
normally you should clone the FC repo, modify it and make a PR, announcing the PR at the forum as a new topic with the title referring to the PR
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: [Feature Request] Rename macro

Postby Sam » Thu Aug 31, 2017 12:25 pm

Fair enough. I got the impression from the sticky that a PR is kind of the last thing on the agenda.

I'll get my word censored together eventually... :D

BTW, thanks for the stuff you do with kicad!
User avatar
kkremitzki
Posts: 2155
Joined: Thu Mar 03, 2016 9:52 pm
Location: Texas

Re: [Feature Request] Rename macro

Postby kkremitzki » Thu Aug 31, 2017 2:29 pm

easyw-fc wrote:
Thu Aug 31, 2017 12:18 pm
Sam wrote:
Wed Aug 30, 2017 1:14 pm
I have no idea what the local procedure is for this, but here's a patch to rename macros from the macro dialog.
normally you should clone the FC repo, modify it and make a PR, announcing the PR at the forum as a new topic with the title referring to the PR
It isn't really necessary to announce PRs on the Pull Request forum anymore, I believe Yorik and Werner have said they just prefer reviewing stuff on the Github PR itself.
Like my FreeCAD work? I'd appreciate any level of support via Patreon, Liberapay, or PayPal! Read more about what I do at my blog.
User avatar
easyw-fc
Posts: 2905
Joined: Thu Jul 09, 2015 9:34 am

Re: [Feature Request] Rename macro

Postby easyw-fc » Thu Aug 31, 2017 5:22 pm

Sam wrote:
Thu Aug 31, 2017 12:25 pm
BTW, thanks for the stuff you do with kicad!
you are welcome!
thx for the positive feedback :D
wmayer
Site Admin
Posts: 16460
Joined: Thu Feb 19, 2009 10:32 am

Re: [Feature Request] Rename macro

Postby wmayer » Thu Aug 31, 2017 6:55 pm

It isn't really necessary to announce PRs on the Pull Request forum anymore, I believe Yorik and Werner have said they just prefer reviewing stuff on the Github PR itself.
It's absolutely sufficient to announce a PR at one place and doing so at several places turned out to be annoying because it's always extra work to accordingly mark the PR when it's merged.

@Sam The easiest for the devs is to make a branch on github but it's also OK to open a report in the bug tracker and attach a patch. When opening a feature request in the forum you should at least put it into the Pull Request section then because due to the amount of posts each day we will easily overlook it there.
User avatar
Sam
Posts: 171
Joined: Sun Mar 20, 2016 6:19 pm

Re: [Feature Request] Rename macro

Postby Sam » Fri Sep 01, 2017 12:36 am

wmayer wrote:
Thu Aug 31, 2017 6:55 pm
It's absolutely sufficient to announce a PR at one place and doing so at several places turned out to be annoying
Understood
wmayer wrote:
Thu Aug 31, 2017 6:55 pm
@Sam The easiest for the devs is to make a branch on github
Branch rename-macro
wmayer wrote:
Thu Aug 31, 2017 6:55 pm
When opening a feature request in the forum you should at least put it into the Pull Request section
Fair call. When I asked for this I didn't think I'd be the dude trying to implement it.

I will try to be as cooperative and convenient as possible. But I might not always get it right.

I've turned this thread into a bit of a dogs breakfast now, unfortunately, but I won't make any other noise around the forum about patches/pull requests until I've worked through this one.
User avatar
PrzemoF
Posts: 3048
Joined: Fri Jul 25, 2014 4:52 pm
Contact:

Re: [Feature Request] Rename macro

Postby PrzemoF » Fri Sep 01, 2017 8:02 am

Sam wrote:
Fri Sep 01, 2017 12:36 am
[..]
Fair call. When I asked for this I didn't think I'd be the dude trying to implement it.

I will try to be as cooperative and convenient as possible. But I might not always get it right.[..]
If you do-it-yourself it's done exactly as you want it! :D Don't worry about "getting it right" - it's all about learning. My first patch for FreeCAD got a comment: "IMHO your patch does more harm than good" :D