Logo Search packages:      
Sourcecode: qa-assistant version File versions  Download package

def review::Review::__init__ (   self,
  treeStore = None 
)

Create a new Review object. 

Attributes:
:treeStore: A gtk.TreeModel to operate on.

Definition at line 34 of file review.py.

00034                                       :
        ''' Create a new Review object. 
        
        Attributes:
        :treeStore: A gtk.TreeModel to operate on.
        '''
        if treeStore:
            assert isinstance(treeStore, checklist.CheckList), \
                    '%s is not a CheckList type' % (treeStore)
        gtk.VBox.__init__(self)

        # Create the textwrap object for use by the publish method
        self.textwrap = textwrap.TextWrapper(initial_indent='* ',
                subsequent_indent='  ')

        # Create the gconf client to retrieve the gpg options
        self.gconfClient = gconf.client_get_default()
        self.gconfClient.add_dir(GCONFPREFIX, gconf.CLIENT_PRELOAD_NONE)

        # Create the widgets:
        self.reviewBoxes = {}

        self.header = gtk.Label()
        self.add(self.header)

        self.reviewTitles = {}
        for titles in ('Pass', 'Fail', 'Non-Blocker', 'Notes'):
            self.reviewTitles[titles] = gtk.Label()
            self.reviewTitles[titles].set_property('xalign', 0.0)
            self.add(self.reviewTitles[titles])
        self.reviewTitles['Pass'].set_text('Good:')
        self.reviewTitles['Fail'].set_text('Needswork:')
        self.reviewTitles['Non-Blocker'].set_text('Minor:')
        self.reviewTitles['Notes'].set_text('Notes:')

        self.footer = gtk.Label()
        self.add(self.footer)

        # Set display properties on the widgets
        self.header.set_selectable(True)
        self.footer.set_selectable(True)
        self.set_property('homogeneous', False)
        self.header.set_property('xalign', 0.0)
        self.footer.set_property('xalign', 0.0)

        # Copy data from the checklist into internal structures and add to
        # our display.
        if treeStore:
            self.set_model(treeStore)
        
    def show(self):


Generated by  Doxygen 1.6.0   Back to index