Custom themes?
How do I create custom threads to run in a gtk application?
Given this simplified example:
@w = Gtk::Window.new "testtest"
@l = Gtk::Label.new "test"
@w.add @l
@w.show_all
Gtk.main
How can I start a thread like this?
Thread.start { loop { puts 'thread running'; @l.text = Time.now.to_s; sleep 1 }}
I have a timeout based approach like this working with C # timeout_add, but it's not very nice and doesn't work for what I'm really trying to achieve: waiting for dbus signal.
I've tried a lot of things, each of which either hangs with a gtk thread or my own thread. I've also tried using http://ruby-gnome2.sourceforge.jp/hiki.cgi?tips_threads but I'm not sure if this is really the same problem)
I know Redcar switched from gtk because I believe it couldn't get the tests to work correctly.
http://redcareditor.com/blog/2009/08/redcar-is-moving-to-jruby/
so you can ask daniel or on this mailing list.
in terms of diagnostics to hang, I suppose you could use strace or not to see where it hangs. Also, starting from 1.9 might help as you can set some C calls to be "non-blocking" in binary extensions. GL. -r
source to share