How to create a new tool?

ForumsFor GIMP developers (read-only) ► How to create a new tool?

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.h

add rename them to

app/tools/gimptext2.c
app/tools/gimptext2.h
app/tools/gimptext2-editor.c
app/tools/gimptext2-editor.h

When 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

Welcome!


Lost password?

Not a member? Sign up!

Random tutorials | Latest tutorials

  1. Hot Wallpaper with Flames Hot Wallpaper with Flames 52
  2. Generate a stripe-like texture Generate a stripe-like texture 6
  3. Create a shocking sphere/ball Create a shocking sphere/ball 20
  4. Create futuristic looking tech pattern Create futuristic looking tech pattern 12

Latest comments

But I just have 1 more prob (bear with me) I am really having troub... (2 days ago in [AVATAR] Become a real Na'Vi using GIMP!)

I got it to work :) I had to close the image and restart it. I thin... (2 days ago in Create cool rifts with translucent lights!)

there was a second and 3rd release of 2.6.12. we included the lates... (2 days ago in Last stable 2.6 release: 2.6.12 has arrived)

Poll

Is GIMP an adequate application for you to create printed graphics like flyers, advertisments etc?

View results

Latest forum activities

Your Ad Here

facts & numbers

gimpusers.com RSS feed

48 identi.ca followers
750 Twitter followers

powered by bitfire it services