RSS/Atom feed Twitter
Site is read-only, email is disabled

How to create a new tool?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

6 of 6 messages available
Toggle history

Please log in to manage your subscriptions.

How to create a new tool? Bear 14 Jun 05:39
  How to create a new tool? Bill Skaggs 14 Jun 07:56
  How to create a new tool? Alexia Death 14 Jun 09:53
  How to create a new tool? oliver@first.in-berlin.de 14 Jun 21:49
How to create a new tool? Bear 14 Jun 11:30
How to create a new tool? Bear 14 Jun 11:46
Bear
2010-06-14 05:39:27 UTC (over 14 years ago)

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

Bill Skaggs
2010-06-14 07:56:08 UTC (over 14 years ago)

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

Alexia Death
2010-06-14 09:53:07 UTC (over 14 years ago)

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.

Bear
2010-06-14 11:30:36 UTC (over 14 years ago)

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.

Bear
2010-06-14 11:46:47 UTC (over 14 years ago)

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

oliver@first.in-berlin.de
2010-06-14 21:49:54 UTC (over 14 years ago)

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