Aleksey Lim | 1 Jul 11:44
Picon

Re: [API proposal] toolbox.get_toolbars()

On Wed, Jul 01, 2009 at 11:38:51AM +0200, Tomeu Vizoso wrote:
> On Wed, Jul 1, 2009 at 11:31, Aleksey Lim<alsroot <at> member.fsf.org> wrote:
> > On Wed, Jul 01, 2009 at 11:11:30AM +0200, Tomeu Vizoso wrote:
> >> On Tue, Jun 30, 2009 at 04:55, Lucian Branescu<lucian.branescu <at> gmail.com> wrote:
> >> > While adding the bookmarklet functionality to Browse, I realised that
> >> > the toolbox API is hard to work with if your toolbars change. For
> >> > example, set_current_toolbar() takes the index of the toolbar as a
> >> > parameter, something which you can't really know if your toolbars move
> >> > around.
> >> >
> >> > Tomeu suggested I propose to extend the toolbox API with a
> >> > get_toolbars() method. This method returns a list of the actual
> >> > Toolbar objects, in the order they currently have in the gtk.Notebook.
> >> > This method allows for things like if toolbar in
> >> > toolbox.get_toolbars() or toolbar_index =
> >> > toolbox.get_toolbars().index(toolbar), giving a lot more flexibility
> >> > in manipulating toolbars.
> >> > It could also kill off the ugly _TOOLBAR_FOO globals in Browse.
> >> >
> >> > I've made toolbox.toolbars a property for get_toolbars().
> >> >
> >> > I have attached a patch to toolbox.py, in the sugar.graphics package.
> >>
> >> Could you please follow
> >> http://wiki.sugarlabs.org/go/Development_Team/CodeReview#Patch_guidelines
> >> ?
> >>
> >> I would also like to hear from the activity team (Gary?) if they have
> >> any objection to this API addition (I would like to see sugar-toolkit
> >> changes being driven by them at some point in the future).
(Continue reading)

Tomeu Vizoso | 1 Jul 12:04
Favicon
Gravatar

Re: [API proposal] toolbox.get_toolbars()

On Wed, Jul 1, 2009 at 11:44, Aleksey Lim<alsroot <at> member.fsf.org> wrote:
> On Wed, Jul 01, 2009 at 11:38:51AM +0200, Tomeu Vizoso wrote:
>> On Wed, Jul 1, 2009 at 11:31, Aleksey Lim<alsroot <at> member.fsf.org> wrote:
>> > On Wed, Jul 01, 2009 at 11:11:30AM +0200, Tomeu Vizoso wrote:
>> >> On Tue, Jun 30, 2009 at 04:55, Lucian Branescu<lucian.branescu <at> gmail.com> wrote:
>> >> > While adding the bookmarklet functionality to Browse, I realised that
>> >> > the toolbox API is hard to work with if your toolbars change. For
>> >> > example, set_current_toolbar() takes the index of the toolbar as a
>> >> > parameter, something which you can't really know if your toolbars move
>> >> > around.
>> >> >
>> >> > Tomeu suggested I propose to extend the toolbox API with a
>> >> > get_toolbars() method. This method returns a list of the actual
>> >> > Toolbar objects, in the order they currently have in the gtk.Notebook.
>> >> > This method allows for things like if toolbar in
>> >> > toolbox.get_toolbars() or toolbar_index =
>> >> > toolbox.get_toolbars().index(toolbar), giving a lot more flexibility
>> >> > in manipulating toolbars.
>> >> > It could also kill off the ugly _TOOLBAR_FOO globals in Browse.
>> >> >
>> >> > I've made toolbox.toolbars a property for get_toolbars().
>> >> >
>> >> > I have attached a patch to toolbox.py, in the sugar.graphics package.
>> >>
>> >> Could you please follow
>> >> http://wiki.sugarlabs.org/go/Development_Team/CodeReview#Patch_guidelines
>> >> ?
>> >>
>> >> I would also like to hear from the activity team (Gary?) if they have
>> >> any objection to this API addition (I would like to see sugar-toolkit
(Continue reading)

Tomeu Vizoso | 1 Jul 12:04
Favicon
Gravatar

Re: [API proposal] toolbox.get_toolbars()

On Wed, Jul 1, 2009 at 11:44, Aleksey Lim<alsroot <at> member.fsf.org> wrote:
> On Wed, Jul 01, 2009 at 11:38:51AM +0200, Tomeu Vizoso wrote:
>> On Wed, Jul 1, 2009 at 11:31, Aleksey Lim<alsroot <at> member.fsf.org> wrote:
>> > On Wed, Jul 01, 2009 at 11:11:30AM +0200, Tomeu Vizoso wrote:
>> >> On Tue, Jun 30, 2009 at 04:55, Lucian Branescu<lucian.branescu <at> gmail.com> wrote:
>> >> > While adding the bookmarklet functionality to Browse, I realised that
>> >> > the toolbox API is hard to work with if your toolbars change. For
>> >> > example, set_current_toolbar() takes the index of the toolbar as a
>> >> > parameter, something which you can't really know if your toolbars move
>> >> > around.
>> >> >
>> >> > Tomeu suggested I propose to extend the toolbox API with a
>> >> > get_toolbars() method. This method returns a list of the actual
>> >> > Toolbar objects, in the order they currently have in the gtk.Notebook.
>> >> > This method allows for things like if toolbar in
>> >> > toolbox.get_toolbars() or toolbar_index =
>> >> > toolbox.get_toolbars().index(toolbar), giving a lot more flexibility
>> >> > in manipulating toolbars.
>> >> > It could also kill off the ugly _TOOLBAR_FOO globals in Browse.
>> >> >
>> >> > I've made toolbox.toolbars a property for get_toolbars().
>> >> >
>> >> > I have attached a patch to toolbox.py, in the sugar.graphics package.
>> >>
>> >> Could you please follow
>> >> http://wiki.sugarlabs.org/go/Development_Team/CodeReview#Patch_guidelines
>> >> ?
>> >>
>> >> I would also like to hear from the activity team (Gary?) if they have
>> >> any objection to this API addition (I would like to see sugar-toolkit
(Continue reading)


Gmane