|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
Hacking GIMP - Gimp top level menuHi, I was wondering how the top level menu for GIMP is created (The one with these items: "File", "Edit", "Select", "View", "Image", etc. ). I want to add a menu item to this menu and I'm kind of lost as to where to start. If someone could tell me where to hunt around in the code for this and give me an explanation of how it's done, that would be great! Even better, is there some documentation online about this kind of thing?
Thanks in advance, Jordan _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menuJordan Stinson wrote:
> Hi, > I was wondering how the top level menu for GIMP is created (The one > with these items: "File", "Edit", "Select", "View", "Image", etc. ). I > want to add a menu item to this menu and I'm kind of lost as to where > to start. If someone could tell me where to hunt around in the code > for this and give me an explanation of how it's done, that would be > great! Even better, is there some documentation online about this kind > of thing? The GIMP menus are created using the GTK+ menu APIs, often with some thin wrapper on top. The actual instantiation of the menu is in the gimp_display_shell_new() function: shell->menubar = gtk_ui_manager_get_widget (GTK_UI_MANAGER (shell->menubar_manager), "/image-menubar"); Some keywords to look up: GtkUIManager, GtkAction. The menu structure is in menus/image-menu.xml.in. Note that you will need to install the modified file before GIMP can find it. To add a new menu item these are the rough steps: 1. Edit image-menu.xml.in 2. Add a GimpAction in <menu>-actions.c, e.g. image-actions.c if you are going to add something under the Image menu. Then just follow the pattern from there. As a general tip, you will learn a lot from studying the commit history. There have been several occasions where menu items have been added and modified for example, so just looking up a commit for this and studying the diff will tell you how to do it. / Martin _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
|
|
|
Re: Hacking GIMP - Gimp top level menuJordan Stinson (jordan.stinson83@...) wrote:
> Hi,I'm trying (for starters) to make the hue saturation tool visible in the > toolbox. Uhm, actually there is no need to start hacking for this: 1) Go to Windows -> Dockable Dialogs -> Tools 2) toggle the "eye" icon next to the hue-saturation tool 3) watch it appear in the toolbox. Hope this helps, Simon -- simon@... http://simon.budig.de/ _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menuThanks for the quick response. It looks like this will get me closer to what i'm actually after. When I use this method to add the hue saturation tool to the toolbox, it persists after I close gimp and reopen it. Could anyone tell me what file it's saved to?
Thanks again, Jordan On Tue, Jun 16, 2009 at 8:33 PM, Simon Budig <simon@...> wrote:
_______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menutoolrc
On Wed, Jun 17, 2009 at 11:00 AM, Jordan Stinson<jordan.stinson83@...> wrote: > Thanks for the quick response. It looks like this will get me closer to what > i'm actually after. When I use this method to add the hue saturation tool to > the toolbox, it persists after I close gimp and reopen it. Could anyone tell > me what file it's saved to? _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menuHi,
Could someone tell me the location of this file? I found it way back when I originally asked the question, but I can't find it anymore. Thanks, Jordan
On Tue, Jun 16, 2009 at 9:36 PM, David Gowers <00ai99@...> wrote: toolrc _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menuOn 07/13/2009 09:27 PM, Jordan Stinson wrote:
> Hi, > > Could someone tell me the location of this file? Hi, Do you mean menus/image-menu.xml.in ? / Martin _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: Hacking GIMP - Gimp top level menuHi,
I meant toolrc. Sorry if that wasn't clear. Thanks, Jordan On Mon, Jul 13, 2009 at 3:35 PM, Martin Nordholts <enselic@...> wrote:
_______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
| Free embeddable forum powered by Nabble | Forum Help |