Re: [Gimp-developer] GimpToolbox (Hacking GIMP)

2009-08-06 Thread Jordan Stinson
Thanks.

On Wed, Aug 5, 2009 at 1:23 PM, Sven Neumann s...@gimp.org wrote:

 Hi,

 On Wed, 2009-08-05 at 10:16 -0400, Jordan Stinson wrote:

 
  I was wondering what property of the toolbox makes it stay above all
  other windows?

 The toolbox has the 'utility' window hint set and most window managers
 interpret that as to keep it above normal windows of the same
 application.


 Sven




___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] GimpToolbox (Hacking GIMP)

2009-08-05 Thread Jordan Stinson
Hi Everyone,
I was wondering what property of the toolbox makes it stay above all other
windows? Is it possible to have another window stay above the toolbox? I
tried to do this using the
gtk_window_set_keep_abovehttp://library.gnome.org/devel/gtk/2.15/GtkWindow.html#gtk-window-set-keep-above
function
but had no luck.

Thanks in advance,

Jordan
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Hacking GIMP - Gimp top level menu

2009-07-13 Thread Jordan Stinson
Hi,
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 00a...@gmail.com wrote:

 toolrc

 On Wed, Jun 17, 2009 at 11:00 AM, Jordan
 Stinsonjordan.stinso...@gmail.com 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@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Hacking GIMP - Gimp top level menu

2009-07-13 Thread Jordan Stinson
Hi,
I meant toolrc. Sorry if that wasn't clear.

Thanks,
Jordan

On Mon, Jul 13, 2009 at 3:35 PM, Martin Nordholts ense...@gmail.com wrote:

 On 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@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] connecting to update signal in uimanager

2009-07-01 Thread Jordan Stinson
Yes, this helps.
Thanks!

- Jordan

On Wed, Jul 1, 2009 at 12:41 AM, Martin Nordholts ense...@gmail.com wrote:

 On 07/01/2009 12:08 AM, Jordan Stinson wrote:
  static void
  toolbox_create_commands (GimpToolbox *toolbox,
 GimpContext *context)
  {
  GimpUIManager *ui_manager = GIMP_IMAGE_DOCK (toolbox)-ui_manager;
  ...
 g_signal_connect (G_OBJECT (ui_manager), update, G_CALLBACK
  (toolbox_refresh_commands),
  (gpointer) toolbox);
  }
 
  /*Callback function*/
  static void
  toolbox_refresh_commands (GimpUIManager *ui_manager, gpointer data)
  {
  GimpToolbox *toolbox = GIMP_TOOLBOX (data);
  if (toolbox)
  gimptoolbox_refresh_commands (toolbox);
  }

 Hi,

 Please don't break threads by sending to just one persion, continue the
 thread on gimp-developer.

 The update signal on GimpUIManager has a parameter, as can be seen in
 app/widgets/gimpuimanager.c:

   manager_signals[UPDATE] =
 g_signal_new (update,
   G_TYPE_FROM_CLASS (klass),
   G_SIGNAL_RUN_LAST,
   G_STRUCT_OFFSET (GimpUIManagerClass, update),
   NULL, NULL,
   gimp_marshal_VOID__POINTER,
   G_TYPE_NONE, 1,
   G_TYPE_POINTER);

 where 1, G_TYPE_POINTER means the signal has one parameter of type
 pointer. It is this parameter you get in your 'data' in your callback.
 Your callback signature shall look like it does for other clients, such
 as the tool options menu:

   g_signal_connect (manager, update,
 G_CALLBACK (tool_options_menu_update),
 (gpointer) ui_path);

   // ...

 static void
 tool_options_menu_update (GimpUIManager *manager,
   gpointer   update_data,
   const gchar   *ui_path)

 I.e. you need to make room for the update signal parameter.

 Hope this helps,

  / Martin

 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] connecting to update signal in uimanager

2009-06-30 Thread Jordan Stinson
Simon,I didn't think of subscribing to the notify::sensitive action on the
action itself; I suppose I should have though.

Martin,
I think the thing that changes the sensitivity of the actions is the
UIManager via each action group. So, that's what I'm doing or trying to do
at least.

Is there any reason why when I subscribe to the update signal in the
UIManager, the update data I set doesn't make it back to my callback
function?

Thanks,
Jordan

On Tue, Jun 30, 2009 at 12:54 AM, Martin Nordholts ense...@gmail.comwrote:

 On 06/30/2009 02:02 AM, Jordan Stinson wrote:
  Hi there,
 
  I'm trying to hack gimp. For my purposes, I want to be notified when
  certain actions become sensitive, or insensitive.

 Why not subscribe to changes to whatever it is that changes the
 sensitivity of your action instead of subscribing to changes of the
 sensitivity of the action itself?

  / Martin

 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] sensitive actions (Hacking GIMP)

2009-06-23 Thread Jordan Stinson
Hi all,
I'm trying to figure out which menu items are sensitive. It looks to me as
though this property is usually changed when the ui manager updates the
actions groups which updates the actions. I'm adding some additional items
to the toolbox (as a test, I'm adding some layer actions). At the time of
the toolbox initialization, the actions that i'm adding are all sensitive.
The menu items that correspond to these are not sensitive when i view them
and there doesn't appear to be any calls to the layer actions update
function after I've initialized the toolbox. Could someone tell me how the
sensitive property is decided initially for menu items if not by the
action's sensitive property?  Also could someone tell me how actions and
menu items are related? Hopefully my questions are clear enough.

Thanks,
Jordan
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Hacking GIMP - Gimp top level menu

2009-06-16 Thread Jordan Stinson
Hi,I'm trying (for starters) to make the hue saturation tool visible in the
toolbox. I noticed that all tools are registered in the gimp_tools_register
function. In the function a tool info structure is created for each tool and
the tool info visible property is set to true if tool is an image map tool
type. I tried hacking this to set the hue saturation tool info object to be
visible. All well and good, I thought. But when the toolbox is populated in
the tool_box_create tools function, the visible property is set back to
false. I set a memory breakpoint using gdb and it looks like there's a plug
in that's setting the visible property back to false. So far, I haven't been
able to figure out what plug in is doing this. Does anyone have any idea
what plug in may be doing this or where I can find it?

Thanks,
Jordan


On Tue, Jun 2, 2009 at 2:46 PM, Martin Nordholts ense...@gmail.com wrote:

 Jordan Stinson wrote:

 Thanks for the tips. Just one quick question though. What do you mean by
 installing the menu.xml.in http://xml.in file? What's the difference
 between that file and the menu.xml file?


 Look in menus/Makefile.am, *.xml.in is processed with xsltproc into *.xml.
 With installing the menu.xml.in file I really meant installing the
 generated menu.xml file. Sorry for being a bit unprecise ;)

 / Martin

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Hacking GIMP - Gimp top level menu

2009-06-16 Thread Jordan Stinson
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?

Thanks again,
Jordan

On Tue, Jun 16, 2009 at 8:33 PM, Simon Budig si...@budig.de wrote:

 Jordan Stinson (jordan.stinso...@gmail.com) 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


 --
  si...@budig.de  http://simon.budig.de/
 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


Re: [Gimp-developer] Hacking gimp

2009-06-02 Thread Jordan Stinson
Hi,
Thanks! That's exactly what I needed.

- Jordan

On Mon, Jun 1, 2009 at 11:44 PM, Martin Nordholts ense...@gmail.com wrote:

 Jordan Stinson wrote:
  Hi,
  I'm attempting to add new files to the app/widgets directory. I've
  added a .h and a .c file and the compiler tries to compile it. I seem
  to be able to compile code in these files however, when I try to
  include gimp.h, I get an error in gimpobject.h line 35 saying
  something like, expected specifier-qualifier-list before 'GObject'
  I'm not sure what I'm doing wrong and I can't seem to find anything on
  the gimp developer site or in any of the archives for the mailing
  list. Is there a prescribed way to add files? If so, where can I find
  this information?

 Hi!

 This doesn't sound like an add-file problem but an include-problem. More
 specifically, it seems that you include gimp.h before the GObject header
 is pulled in. Did you read the GIMP include policy in
 devel-docs/includes.txt? You can see how other files in the app/widgets
 dir include gimp.h, for example gimpcolordialog.c. That file, like most
 files in that dir, includes the GObject header indirectly by pulling in
 the GTK+ header:

  #include gtk/gtk.h

 and then after widgets-types.h comes gimp.h:

  #include core/gimp.h

 Let us know if you need further assistance.

 Best regards,
 Martin
 ___
 Gimp-developer mailing list
 Gimp-developer@lists.XCF.Berkeley.EDU
 https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] Hacking GIMP - Gimp top level menu

2009-06-02 Thread Jordan Stinson
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?

Thanks in advance,

Jordan
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer


[Gimp-developer] Hacking gimp

2009-06-01 Thread Jordan Stinson
Hi, I'm attempting to add new files to the app/widgets directory. I've added
a .h and a .c file and the compiler tries to compile it. I seem to be able
to compile code in these files however, when I try to include gimp.h, I
get an error in gimpobject.h line 35 saying something like, expected
specifier-qualifier-list before 'GObject' I'm not sure what I'm doing wrong
and I can't seem to find anything on the gimp developer site or in any of
the archives for the mailing list. Is there a prescribed way to add files?
If so, where can I find this information?

Thanks,
Jordan
___
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer