Changeset 148
- Timestamp:
- 02/07/09 03:33:11 (3 years ago)
- Location:
- trunk/chavier
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/chavier/app.py
r135 r148 1 # Copyright (c) 2007-2008by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>1 # Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 2 2 # 3 3 # This file is part of Chavier. … … 25 25 26 26 from chavier.gui import GUI 27 27 28 28 29 class App(object): … … 127 128 return chart 128 129 130 129 131 def main(): 130 132 app = App() -
trunk/chavier/dialogs.py
r109 r148 1 # Copyright (c) 2007-2008by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>1 # Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 2 2 # 3 3 # This file is part of Chavier. … … 23 23 import gtk 24 24 25 25 26 class TextInputDialog(gtk.Dialog): 26 27 … … 55 56 56 57 class PointDialog(gtk.Dialog): 58 57 59 def __init__(self, toplevel_window, initial_x, initial_y): 58 60 flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT … … 90 92 91 93 class OptionDialog(gtk.Dialog): 94 92 95 def __init__(self, toplevel_window, label, value, value_type): 93 96 flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT … … 120 123 121 124 class RandomGeneratorDialog(gtk.Dialog): 125 122 126 def __init__(self, toplevel_window): 123 127 flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT … … 171 175 172 176 class AboutDialog(gtk.AboutDialog): 177 173 178 def __init__(self, toplevel_window): 174 179 super(AboutDialog, self).__init__() … … 180 185 self.set_copyright('Copyleft 2008 Lorenzo Gil Sanchez') 181 186 #self.set_license('LGPL') 182 self.set_authors(['Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>']) 187 author = 'Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>' 188 self.set_authors([author]) 183 189 self.set_program_name('Chavier') 184 190 self.set_website('http://www.lorenzogil.com/projects/pycha') -
trunk/chavier/gui.py
r109 r148 1 # Copyright (c) 2007-2008by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>1 # Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 2 2 # 3 3 # This file is part of Chavier. … … 22 22 from chavier.dialogs import ( 23 23 TextInputDialog, PointDialog, OptionDialog, RandomGeneratorDialog, 24 AboutDialog, warning 24 AboutDialog, warning, 25 25 ) 26 26 27 27 28 class GUI(object): 29 28 30 def __init__(self, app): 29 31 self.app = app … … 81 83 self.main_window.show() 82 84 83 84 # Internal methods85 85 def _create_ui_manager(self): 86 86 self.uimanager = gtk.UIManager() … … 273 273 if value is not None: 274 274 value = str(value) 275 self.options_store.append(parent_node, (name, value, value_type)) 275 self.options_store.append(parent_node, 276 (name, value, value_type)) 276 277 277 278 def _get_current_dataset_tab(self): … … 308 309 options = {} 309 310 while iter is not None: 310 name, value, value_type = self.options_store.get(iter, 0, 1, 2)311 name, value, value_type = self.options_store.get(iter, 0, 1, 2) 311 312 if value_type is None: 312 313 child = self.options_store.iter_children(iter) … … 354 355 dialog.destroy() 355 356 356 # Event and signal handlers357 357 def delete_event(self, widget, event, data=None): 358 358 return False … … 390 390 self._edit_option_internal(model, iter) 391 391 392 # Action handlers393 392 def quit(self, action): 394 393 self.main_window.destroy() … … 529 528 dialog.destroy() 530 529 531 # Public API532 530 def run(self): 533 531 gtk.main() … … 539 537 else: 540 538 return False 539 541 540 542 541 str_converters = {
