How to create a new tool?
Forums ► For GIMP developers (read-only) ► How to create a new tool?
-
Bear
(over 1 year ago)
- Bill Skaggs (over 1 year ago)
- Alexia Death (over 1 year ago)
- oliver@first.in-berlin.de (over 1 year ago)
- Bear (over 1 year ago)
- Bear (over 1 year ago)
Sent: 2010-06-14 05:39:27 UTC (over 1 year ago)
From: Bear
How to create a new tool?
hi,
I am a newbie on GIMP development. Now I wanna create a new tool. For example, I wanna create a Text Tool which as same as GIMP owned. I copyed these files:
app/tools/gimptext.c
app/tools/gimptext.h
app/tools/gimptext-editor.c
app/tools/gimptext-editor.hadd rename them to
app/tools/gimptext2.c
app/tools/gimptext2.h
app/tools/gimptext2-editor.c
app/tools/gimptext2-editor.hWhen I recompiled GIMP, only one text tool is shown. What shall I do? thx!
--------------
Bear
2010-06-14_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Sent: 2010-06-14 07:56:08 UTC (over 1 year ago)
From: Bill Skaggs
How to create a new tool?
At a minimum, you need to add your new tool to the list in
app/tools/gimp-tools.c, so that it
will be registered. You'll also have to rename some things to avoid
duplicate names -- maybe
you've already done this but you didn't say so.-- Bill
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Sent: 2010-06-14 09:53:07 UTC (over 1 year ago)
From: Alexia Death
How to create a new tool?
On Mon, Jun 14, 2010 at 6:39 AM, Bear wrote:
> hi,
> I am a newbie on GIMP development. Now I wanna create a new tool. For example, I wanna create a Text Tool which as same as GIMP owned.Did you add your new files into the build system as well?
That aside, any development effort is better spent against git, so if
you are working on a stable source, just get GIT. Also, Id advise
against forking the text tool like that. Either change the existing
tool if its going to be an improved text tool(Git will help you
keeping track of your changes) or rename it to something you want to
make out of it right way. these numbered forks, even if they produce
any code worth file are near impossible to merge and sensibly
maintain.--
--Alexia
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Sent: 2010-06-14 11:30:36 UTC (over 1 year ago)
From: Bear
How to create a new tool?
hi,
Thx for ur answer.
I have added my new file into "Makefile". I fork a new tool because my teacher asked me to do...------------------
Bear
2010-06-14-------------------------------------------------------------
From:Alexia Death
Send Date:2010-06-14 15:53:08
To:Bear
CC:gimp-developer
Subject:Re: [Gimp-developer] How to create a new tool?On Mon, Jun 14, 2010 at 6:39 AM, Bear wrote:
> hi,
> I am a newbie on GIMP development. Now I wanna create a new tool. For example, I wanna create a Text Tool which as same as GIMP owned.Did you add your new files into the build system as well?
That aside, any development effort is better spent against git, so if
you are working on a stable source, just get GIT. Also, Id advise
against forking the text tool like that. Either change the existing
tool if its going to be an improved text tool(Git will help you
keeping track of your changes) or rename it to something you want to
make out of it right way. these numbered forks, even if they produce
any code worth file are near impossible to merge and sensibly
maintain.--
--Alexia_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Sent: 2010-06-14 11:46:47 UTC (over 1 year ago)
From: Bear
How to create a new tool?
hi,
thx for your help! Its helped me solved my problem!
And I have another question: How to modify the context menu?
I wanna to edit two context menu, one is the one when Text Tool is actived, the other one is the one when I right-click on canvas.
Could you tell me which file should I modify? thx!------------------
Bear
2010-06-14-------------------------------------------------------------
From:Bill Skaggs
Send Date:2010-06-14 13:56:08
To:Bear
CC:gimp-developer
Subject:Re: [Gimp-developer] How to create a new tool?At a minimum, you need to add your new tool to the list in
app/tools/gimp-tools.c, so that it
will be registered. You'll also have to rename some things to avoid
duplicate names -- maybe
you've already done this but you didn't say so.-- Bill
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer
Sent: 2010-06-14 21:49:54 UTC (over 1 year ago)
From: oliver@first.in-berlin.de
How to create a new tool?
Hi,
On Mon, Jun 14, 2010 at 11:39:27AM +0800, Bear wrote:
> hi,
> I am a newbie on GIMP development. Now I wanna create a new tool. For
> example, I wanna create a Text Tool which as same as GIMP owned. I copyed these
> files:
[...]Ah, what a good idea... instead of changing the tools that are there,
just making your own ones (and starting with Copy&Paste).Ah, fine this way I may also add some stuff... and will not need to
argue why older stuff needs to be changed. It doesn't need to be changed.
The old stuff can be there, and new stuff *might* be added later
(or not mentioned at all).Good inspiration, thanks!
Oliver
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer



