AddInstrumentDialog
index
/home/david/Projects/Jokosher/trunk/Jokosher/AddInstrumentDialog.py

#       THIS FILE IS PART OF THE JOKOSHER PROJECT AND LICENSED UNDER THE GPL. SEE
#       THE 'COPYING' FILE FOR DETAILS
#
#       AddInstrumentDialog.py
#       
#       This module handles the dialog for adding instruments to a project. Don't
#       you just love instruments. We do. In fact, I suspect Laszlo has printed a
#       picture of the dialog box out and sleeps next to it.
#
#-------------------------------------------------------------------------------

 
Modules
       
Globals
gettext
gtk
textwrap

 
Classes
       
AddInstrumentDialog

 
class AddInstrumentDialog
    This class handles all of the processing associated with the Add Instrument dialog.
 
  Methods defined here:
OnCancel(self, button)
Called when the cancel button in the dialog has been clicked.
 
Parameters:
        button -- reserved for GTK callbacks, dont't use it explicity.
OnOK(self, button=None)
This method is called when the ok button in the dialog has been clicked.
It will then add the selected instrument into the main jokosher window (JokosherApp).  
 
Parameters:
        button -- reserved for GTK callbacks, don't use it explicity.
OnSearchChange(self, widget)
This method will be called when a new letter has been added to the search box.
It will then update the search results accordingly.
 
Parameters:
        widget -- reserved for GTK callbacks, dont't use it explicity.
OnSelected(self, iconview, path)
Calls the OnOK method when an instrument has been selected.
 
Parameters:
        iconview -- reserved for GTK callbacks, don't use it explicitly.
        path -- reserved for GTK callbacks, don't use it explicitly.
OnSelectionChanged(self, button)
Called when a new instrument icon is chosen.
The ok button in the dialog will appear inactive if there are no instruments selected.
 
Parameters:
        button -- reserved for GTK callbacks, dont't use it explicity.
__init__(self, project, parent, instr=None)
Creates a new instance of AddInstrumentDialog.
 
Parameters:
        project -- the Project to add instruments to.
        parent -- parent window of the AddInstrumentDialog (JokosherApp).
        instr -- if present, indicates the Instrument whose type wants to be changed.