Re: signal emit



Lourdes Maldonado wrote: 

> Is their a signal or event I can detect when the gtk_main() is
> entered?  I need to issue some commands right at the time when the
> loop is entered.

Why not schedule an idle process that runs itself once and then 
unschedules itself?  This worked for me in Ruby-GTK:

idle = Gtk::idle_add do
  Gtk::idle_remove(idle)
  puts 'foo'
end

Gtk::main

It prints 'foo' once the main loop starts.  You might have to schedule
with a high priority if you need your code to run before any realize
events etc.

Of course, this may not be the best way to do it, but it succeeded it
getting my code run after the main loop started.

Regards, 

Jeremy 
-- 
Oh, wouldn't it be great if I *was* crazy?  Then the world would be okay!
 -- Twelve Monkeys 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]