Re: [bonobo_main] What to do when gtk_main is already called



bonobo_main is just a wrapper on GMainLoop creation and start. It only activates bonobo with bonobo_activate and then start main loop. So as gtk_main.
Moreover some developers want to deprecate even gtk_main in the future, and use the replacement from glib. 

So you can just use gtk_main, everything will work. But don't forget to call bonobo_activate first.

>I checked the code for gnopernicus as a reference. It is not calling
>bonobo_main and calls gtk_main as well. I am wondering how their
>bonobo callbacks work?
>Any ideas?
>
>On Apr 4, 2005 5:53 PM, Aditya Pandey <aditya kumar pandey gmail com> wrote:
>> I have written a plugin to a gtk+ application [so it has already
>> started gtk_main].
>> My plugin integrates with gnome-speech which requires bonobo.
>> 
>> For some speech drivers which support callbacks, I need to do
>> bonobo_main. But since gtk_main is already running, it somehow
>> interferes with that (I understand that gtk_main_quit is called by
>> bonobo_main). By interference I mean that dialogs
>> fail to respond to ok event to close themselves when bonobo_main is called etc.
>> 
>> Is there some alternative to bonobo_main ? I cant replace gtk_main
>> code and neither can I make sure that gtk_main [part of main app] is
>> called after bonobo_main [part of plugin].
>> 
>> I could think of 2 alternatives:
>> 
>> 1. since bonobo_main calls gtk_main_quit, I do gtk_main after it again [Not sure
>> if this is the correct method, looks like a hack to me].
>> 
>> 2. is bonobo_ui_main for this situation?
>> 
>> Please advise/suggest on which way to go.
>> 
>> --
>> Aditya Kumar Pandey
>> ----------------------------------------
>> Contact:  +91-9868263500; +91-11-25165432
>> 
>
>
>-- 
>Aditya Kumar Pandey
>----------------------------------------
>Contact:  +91-9868263500; +91-11-25165432
>_______________________________________________
>gnome-components-list mailing list
>gnome-components-list gnome org
>http://mail.gnome.org/mailman/listinfo/gnome-components-list




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