Features/GTK3: Difference between revisions

Line 74: Line 74:
One easy way to achieve this would be to give the GTK3 version of sugar-toolkit a different name. The unported GTK2 activities could continue to <tt>import sugar.foo</tt> and ported GTK3 activities would <tt>import sugar1.foo</tt>. "sugar1" is chosen as an example to indicate Sugar-1.0, but other naming schemes would obviously work equally well.
One easy way to achieve this would be to give the GTK3 version of sugar-toolkit a different name. The unported GTK2 activities could continue to <tt>import sugar.foo</tt> and ported GTK3 activities would <tt>import sugar1.foo</tt>. "sugar1" is chosen as an example to indicate Sugar-1.0, but other naming schemes would obviously work equally well.


If the community has strongly desires it, it would be possible maintain the <tt>sugar</tt> module name through a Python trick which could be deployed during the transition period, and then removed once the GTK2 version is dropped. Here is how it could be done:
If the community has strong desires, it would be possible maintain the <tt>sugar</tt> module name through a Python trick which could be deployed during the transition period, and then removed once the GTK2 version is dropped. Here is how it could be done:


* The new GTK3 version of sugar toolkit would be installed with name <tt>sugar</tt>, and the old GTK2 version would be installed with name <tt>sugar_gtk2</tt>.
* The new GTK3 version of sugar toolkit would be installed with name <tt>sugar</tt>, and the old GTK2 version would be installed with name <tt>sugar_gtk2</tt>.