ocarina: Added universal open button
I want to redo the chooser for this, but I'll need to redo the sources first. I guess it'll have to wait for 4.5?
This commit is contained in:
parent
8891cb8c36
commit
3b131f33ef
|
@ -1,6 +1,7 @@
|
||||||
# Bryan Schumaker (2 / 20 / 2011)
|
# Bryan Schumaker (2 / 20 / 2011)
|
||||||
|
|
||||||
import gtk
|
import gtk
|
||||||
|
from libsaria.path import files
|
||||||
from libsaria.path import export
|
from libsaria.path import export
|
||||||
from libsaria import controls
|
from libsaria import controls
|
||||||
from libsaria import sources
|
from libsaria import sources
|
||||||
|
@ -84,6 +85,11 @@ def export_button(show):
|
||||||
def update_button(show):
|
def update_button(show):
|
||||||
return make_button(gtk.STOCK_REFRESH, sources.library.update_bg, "Update Library", show)
|
return make_button(gtk.STOCK_REFRESH, sources.library.update_bg, "Update Library", show)
|
||||||
|
|
||||||
|
def open_button(show):
|
||||||
|
def open_func():
|
||||||
|
fsselect.run_chooser2(files.universal_open)
|
||||||
|
return make_button(gtk.STOCK_OPEN, open_func, "Open Anything", show)
|
||||||
|
|
||||||
def save_button(show):
|
def save_button(show):
|
||||||
def save_func():
|
def save_func():
|
||||||
loc = fsselect.select_save()
|
loc = fsselect.select_save()
|
||||||
|
|
|
@ -18,6 +18,7 @@ def add_button(name, button):
|
||||||
header_body.pack_start(button, False, False)
|
header_body.pack_start(button, False, False)
|
||||||
|
|
||||||
header_body.pack_start(entry.entry)
|
header_body.pack_start(entry.entry)
|
||||||
|
add_button( "OPEN", button.open_button(True))
|
||||||
add_button( "SAVE", button.save_button(True))
|
add_button( "SAVE", button.save_button(True))
|
||||||
add_button("EXPORT", button.export_button(True))
|
add_button("EXPORT", button.export_button(True))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user