Re: [gedit-list] Bonobo usage in Gedit



On Sat, 2005-12-02 at 10:58 +0100, Paolo Borelli wrote:
> Ryan McDougall wrote:
> 
> >Hello,
> >
> >I hope this is the correct place to talk about developing gedit, if not
> >please let me know.
> >
> >
> Sure!

Excellent, someone who's willing to explain things so that I can
help! ;)
> 
> If you want you may also drop by in #gedit on irc and take a look at 
> live.gnome.org/Gedit

I will. I take it your in Italy wrt timezones. I'm in Japan, so
sometimes I miss people in real time, like on IRC.

> 
> >I decided to look around gedit, and maybe start hacking it, and I
> >noticed that it uses Bonobo. Bonobo is still a bit of black magic to me,
> >so I was wondering what it is used for in gedit? Would d-bus be suitable
> >given the trend of removing Bonobo from components due to its
> >complexity?
> >  
> >
> Yes, bonobo is still used in gedit, but getting rid of it is definately 
> on the plan!
> 
> It is used for two things:
> 
> 1 - libbonoboui is used for menus and toolbars: this is due to the fact 
> that when a plugin system was added to gedit we needed a way to 
> merge/unmerge menu items dinamically and libbonoboui was the only viable 
> solution. As of gtk 2.4, GtkUIManager has been integrated in gtk and we 
> should migrate our menus to use it.
> However this is a *big* task, it requires redesigning how the gedit MDI 
> works and to modify all the plugins: the wiki page has some more details 
> about this.
> 
> 2 - bonobo-activation-server is used to ensure that only one instance of 
> gedit is running. The basic idea is this: the first time gedit is run, 
> it starts a sessionwide server, if another instance of gedit is launched 
> before the first one is closed it connects to the server and requests it 
> to open a new window or tab and then it exits. This design allows to not 
> duplicate memory usage for all the instances running and also allows 
> interactions between a window an another (like dragging a tab from a 
> window to another) without out of process communication.
> D-BUS is definately one of the candidates to replace bonobo in (2), but 
> we haven't yet investigated the details (Note that properly implementing 
> this solution is not specific to gedit, enforcing a unique instance with 
> bonobo-activation-server is quite common in gnome applications)
> 
> 
> That said, note that gedit doesn't use the real bonobo black magic 
> (bonobo components, property bags, monickers and all that stuff) and 
> more than possible hack on gedit ignoring how bonobo works.
> 
> 
> Hope that helps, if you have more questions just ask.
> 
Excellent that does! Is the a CVS branch for such experimentation? I'll
probably cut my teeth on some simple bugs first though.

> 
> Ciao,
>     Paolo

Cheers,
Ryan




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