Package conduit :: Package gtkui :: Module SimpleConfigurator :: Class SimpleConfigurator
[hide private]

Class SimpleConfigurator

source code

Provides a simple modal configuration dialog for dataproviders.

Simply provide a list of dictionarys in the following format:
   maps = [
               {
               "Name" : "Setting Name",
               "Widget" : gtk.TextView,
               "Callback" : function,
               "InitialValue" : value
               }
           ]


Instance Methods [hide private]
 
__init__(self, window, dp_name, config_mappings=[]) source code
 
on_ok_clicked(self, widget)
on_ok_clicked
source code
 
on_cancel_clicked(self, widget)
on_cancel_clicked
source code
 
on_help_clicked(self, widget)
on_help_clicked
source code
 
on_dialog_close(self, widget)
on_dialog_close
source code
 
run(self)
run
source code
 
build_child(self)
For each item in the mappings list create the appropriate widget
source code
Class Variables [hide private]
  CONFIG_WINDOW_TITLE_TEXT = "Configure "
Method Details [hide private]

__init__(self, window, dp_name, config_mappings=[])
(Constructor)

source code 
Parameters:
  • window (gtk.Window) - Parent window (this dialog is modal)
  • dp_name (string) - The dataprovider name to display in the dialog title
  • config_mappings ([{}]) - The list of dicts explained earlier