Changeset 148

Show
Ignore:
Timestamp:
02/07/09 03:33:11 (3 years ago)
Author:
lgs
Message:

Update the copyright line and pep8ize the code

Location:
trunk/chavier
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/chavier/app.py

    r135 r148  
    1 # Copyright (c) 2007-2008 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
     1# Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
    22# 
    33# This file is part of Chavier. 
     
    2525 
    2626from chavier.gui import GUI 
     27 
    2728 
    2829class App(object): 
     
    127128        return chart 
    128129 
     130 
    129131def main(): 
    130132    app = App() 
  • trunk/chavier/dialogs.py

    r109 r148  
    1 # Copyright (c) 2007-2008 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
     1# Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
    22# 
    33# This file is part of Chavier. 
     
    2323import gtk 
    2424 
     25 
    2526class TextInputDialog(gtk.Dialog): 
    2627 
     
    5556 
    5657class PointDialog(gtk.Dialog): 
     58 
    5759    def __init__(self, toplevel_window, initial_x, initial_y): 
    5860        flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT 
     
    9092 
    9193class OptionDialog(gtk.Dialog): 
     94 
    9295    def __init__(self, toplevel_window, label, value, value_type): 
    9396        flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT 
     
    120123 
    121124class RandomGeneratorDialog(gtk.Dialog): 
     125 
    122126    def __init__(self, toplevel_window): 
    123127        flags = gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT 
     
    171175 
    172176class AboutDialog(gtk.AboutDialog): 
     177 
    173178    def __init__(self, toplevel_window): 
    174179        super(AboutDialog, self).__init__() 
     
    180185        self.set_copyright('Copyleft 2008 Lorenzo Gil Sanchez') 
    181186        #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]) 
    183189        self.set_program_name('Chavier') 
    184190        self.set_website('http://www.lorenzogil.com/projects/pycha') 
  • trunk/chavier/gui.py

    r109 r148  
    1 # Copyright (c) 2007-2008 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
     1# Copyright(c) 2007-2009 by Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> 
    22# 
    33# This file is part of Chavier. 
     
    2222from chavier.dialogs import ( 
    2323    TextInputDialog, PointDialog, OptionDialog, RandomGeneratorDialog, 
    24     AboutDialog, warning 
     24    AboutDialog, warning, 
    2525    ) 
    2626 
     27 
    2728class GUI(object): 
     29 
    2830    def __init__(self, app): 
    2931        self.app = app 
     
    8183        self.main_window.show() 
    8284 
    83  
    84     # Internal methods 
    8585    def _create_ui_manager(self): 
    8686        self.uimanager = gtk.UIManager() 
     
    273273                if value is not None: 
    274274                    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)) 
    276277 
    277278    def _get_current_dataset_tab(self): 
     
    308309        options = {} 
    309310        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) 
    311312            if value_type is None: 
    312313                child = self.options_store.iter_children(iter) 
     
    354355        dialog.destroy() 
    355356 
    356     # Event and signal handlers 
    357357    def delete_event(self, widget, event, data=None): 
    358358        return False 
     
    390390        self._edit_option_internal(model, iter) 
    391391 
    392     # Action handlers 
    393392    def quit(self, action): 
    394393        self.main_window.destroy() 
     
    529528        dialog.destroy() 
    530529 
    531     # Public API 
    532530    def run(self): 
    533531        gtk.main() 
     
    539537    else: 
    540538        return False 
     539 
    541540 
    542541str_converters = {