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



Thanks for replying. I have added call for bonobo_activate, and it
returns true (poa manager is initialized). Still, I cant receive
notification/callback.

Situation:
gtk_main runs already by main application (remember my program is a
plugin that does bonobo activation), I am not able to receive callback
notification.

Is this order of calls necessary -- first bonobo_activate and then
start listening loop (like of gtk_main) ?

Could there be some work around in my situation?


On Apr 4, 2005 8:41 PM, Nickolay V. Shmyrev <nshmyrev yandex ru> wrote:
> 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
> 
> 


-- 
Aditya Kumar Pandey
----------------------------------------
Contact:  +91-9868263500; +91-11-25165432



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