In a happy (if not unreasonable) note, this is the absolute last obstacle in this particular project. If I fix this, I will have the first significant release point (1.0), and the project will become public. Thanks to everyone who is here for helping me in this project, and in my two others (the answers help in all directions, as it should be).
Now, to the real question ...
I have a toolbar in my application (Python 2.7, PyGTK) on which there are several gtk.ToolButton objects. These features are just wonderful. I have working โattachedโ events attached to them.
However, I need to also connect them to the "enter-notify-event" and "leave-notify-event" signals, so I can display the button functions in the status bar.
This is the code I have. I am not getting any errors, but status bar messages are not displayed:
new_tb = gtk.ToolButton(gtk.STOCK_NEW) toolbar.insert(new_tb, -1) new_tb.show() new_tb.connect("clicked", new_event) new_tb.connect("enter-notify-event", status_push, "Create a new, empty project.") new_tb.connect("leave-notify-event", status_pop)
I know that the problem is not related to the status_push and status_pop events, since I connected all my gtk.MenuItem objects to them, and they work smoothly.
I know that gtk.ToolButton objects are in the Widgets class, so "enter-notify-event" and "leave-notify-event" MUST technically work. My only assumption is that this particular object does not emit any signals other than โclickingโ, and therefore I will have to put them in gtk.EventBox.
What am I doing wrong here? How to fix it?
Thanks in advance!