26 lines
544 B
Python
26 lines
544 B
Python
#! /usr/bin/python
|
|
|
|
# To change this template, choose Tools | Templates
|
|
# and open the template in the editor.
|
|
|
|
__author__="bjschuma"
|
|
__date__ ="$May 16, 2010 10:08:35 PM$"
|
|
|
|
|
|
from gtknodes.menu import MenuNode
|
|
|
|
|
|
class MenuSelectSong(MenuNode):
|
|
def __init__(self,elm):
|
|
MenuNode.__init__(self, elm, "Select a song")
|
|
self.file = None
|
|
|
|
|
|
def onactivate(self, menu):
|
|
from gtkextras import dialog
|
|
song = dialog.FileChooser("Select a song", self.file).choose()
|
|
if song != None:
|
|
from ct import call
|
|
self.file = song
|
|
call.load(song)
|