How to add a custom event to Gtk::Statusbar?

Hello list,

How can I make a Gtk::Statusbar respond to a “new signal”, like :clicked

status_bar = Gtk::Statusbar.new
status_bar.signal_connect(:clicked) do
puts “test - click works!”
end

I believe one has to use Glib, type_register and signal_new, but
this confuses me right now. Maybe one of you has an easy example for
doing this?

PS: I believe I could use EventBox, but I wanted to solve this
without it using EventBox this time (if possible, else i will
just settle for EventBox)

Thanks

=


Powered by Outblaze


This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

On 8/22/07, Roebe XXX [email protected] wrote:

this confuses me right now. Maybe one of you has an easy example for
doing this?

This doesn’t look to be enough. The signal must be emitted somehow. In
order to be emitted, the mouse click must be somehow received by the
widget.

You should really use GtkEventBox if you want to handle mouse clicks.
It’s aimed at your problem.


Guillaume C. - http://zarb.org/~gc/


This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs