Skip to content

Commit

Permalink
Add "button_construct" interface for drawing additional buttons.
Browse files Browse the repository at this point in the history
  • Loading branch information
onto committed Mar 17, 2012
1 parent 4525f44 commit dbae280
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sonata/main.py
Expand Up @@ -662,6 +662,10 @@ def __init__(self, args, window=None, _sugar=False):
toptophbox.pack_start(mediabutton, False, False, 0)
if not self.config.show_playback:
ui.hide(mediabutton)
button_constructors = pluginsystem.get('button_construct')
if button_constructors:
for plugin, button in button_constructors:
toptophbox.pack_start(button(), False, False, 0)
self.progressbox = gtk.VBox()
self.progresslabel = ui.label(w=-1, h=6)
self.progressbox.pack_start(self.progresslabel)
Expand Down

5 comments on commit dbae280

@multani
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, OK, but this is not used at the moment...

I'm not willing to merge it if it's not directly useful, especially if it's a new feature for plugin writer, which doesn't seem to be documented somewhere.

@onto
Copy link
Owner Author

@onto onto commented on dbae280 Mar 20, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it will useful in future (i want to add "loved" button from lastfm plugin).

@multani
Copy link

@multani multani commented on dbae280 Mar 20, 2012 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onto
Copy link
Owner Author

@onto onto commented on dbae280 Aug 14, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I understand from the code, the order of plugins in the list and, accordingly, the order of the buttons are in alphabetical order if all plugins in one folder.

@onto
Copy link
Owner Author

@onto onto commented on dbae280 Aug 21, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now it renamed to "add_toolbar_button" ae532ed and used in a53de59

Please sign in to comment.