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

seeking thoughts on a crash that I caused, and more general question about message passing

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.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

seeking thoughts on a crash that I caused, and more general question about message passing David Merrill 04 Aug 16:12
  seeking thoughts on a crash that I caused, and more general question about message passing Sven Neumann 04 Aug 21:39
David Merrill
2008-08-04 16:12:31 UTC (almost 16 years ago)

seeking thoughts on a crash that I caused, and more general question about message passing

Hello all,
I am playing around with interfacing some custom hardware that I've built for my PhD to the GIMP. I spent some time yesterday learning how to add popup menus to the UI, so that I could right-click a slider (such as the Cyan / Magenta / Yellow ones in the Color Balance dialog), and bind the slider to data from my input device on-the-fly. I got the popup menu to pop and show the menu entries that I have identified, but after popping the menus a few times, GIMP always crashes with this message:

(gimp-2.4:23363): Gtk-CRITICAL **: gtk_window_set_accept_focus: assertion `GTK_IS_WINDOW (window)' failed
Bus error

Does anyone know how my popup menus caused that, and how I can fix it?

The more general question that I have is the following: If I want to route control messages to and from a Python interpreter that I instantiate in the GIMP, what would be the most elegant way to run this interpreter and to route messages? (this is for dynamically controlling the UI - for instance, to make my hardware control the aforementioned sliders, so I don't think I can use the same Python architecture that does plugins). Is there a general message-passing system that I could hook into? Where should I look, to get started?

thanks in advance!
-David Merrill

Sven Neumann
2008-08-04 21:39:10 UTC (almost 16 years ago)

seeking thoughts on a crash that I caused, and more general question about message passing

Hi,

On Mon, 2008-08-04 at 10:12 -0400, David Merrill wrote:

The more general question that I have is the following: If I want to route control messages to and from a Python interpreter that I instantiate in the GIMP, what would be the most elegant way to run this interpreter and to route messages? (this is for dynamically controlling the UI - for instance, to make my hardware control the aforementioned sliders, so I don't think I can use the same Python architecture that does plugins). Is there a general message-passing system that I could hook into? Where should I look, to get started?

Since you want to control the GUI, you probably want to look at the accessibility framework of GTK+. There are Python bindings for this, for example dogtail (http://people.redhat.com/zcerza/dogtail/).

Since this is not at all GIMP related, but purely a GTK+ question, perhaps you want to ask further questions about this on the a11y mailing lists.

Sven