ocarina: Added update button

I think it works... I may not have gotten updating the library correct
in v<4.3.  I'll fix it in 4.5 when I rewrite libsaria.
This commit is contained in:
Bryan Schumaker 2011-04-24 14:35:34 -04:00
parent 3f173b9468
commit 091aa3972c
3 changed files with 6 additions and 7 deletions

View File

@ -3,6 +3,7 @@
import gtk
from libsaria.path import export
from libsaria import controls
from libsaria import sources
SIZE = gtk.ICON_SIZE_MENU
@ -79,6 +80,9 @@ def next_button(show):
def export_button(show):
return make_button(gtk.STOCK_CONVERT, export.export, "Export Library", show)
def update_button(show):
return make_button(gtk.STOCK_REFRESH, sources.library.update_bg, "Update Library", show)
def up_button(show):
def up_func():
from ocarina.body import footer

View File

@ -24,8 +24,9 @@ sep = gtk.VSeparator()
sep.show()
header_body.pack_start(sep, False, False)
add_button( "GOTO", button.goto_button(True))
add_button("UPDATE", button.update_button(True))
add_button( "CLEAR", button.clear_button(True))
add_button( "GOTO", button.goto_button(True))
add_button("RANDOM", button.random_button(libsaria.prefs.get_pref("libsaria.random"), True))
add_button("VOLUME", button.volume_button(libsaria.prefs.get_pref("libsaria.audio.volume"), True))

View File

@ -48,12 +48,6 @@ class SaveButton(Button):
if loc != None:
export.save_playlist(loc)
class UpdateButton(Button):
def __init__(self):
Button.__init__(self, gtk.STOCK_REFRESH, "Update Library")
def clicked(self, button):
LS.sources.library.update_bg()
class SettingsButton(Button):
def __init__(self):
Button.__init__(self, gtk.STOCK_PREFERENCES, "Configure Preferences")