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

def checkload::NewDruid::finish (   self,
  page,
  druid 
)

Commit the new CheckList to the QAReviewer.

Target the QAReviewer program object to the new CheckList we've just
loaded.

Definition at line 303 of file checkload.py.

00303                                  :
        '''Commit the new CheckList to the QAReviewer.

        Target the QAReviewer program object to the new CheckList we've just
        loaded.
        '''
        try:
            self.app.checklist.destroy()
        except AttributeError:
            # No problems as long as checklist no longer exists.
            pass
        self.app.checklist = self.newList

        ### FIXME: The following might be better done in QAReviewer but first
        # We need to figure out how to notify QA Reviewer that the checklist
        # has changed.  Probably the easiest way is to set the checklist to
        # be a GProperty in QA Reviewer.  But that might mean some recoding
        # of QA Reviewer.  I think I'll wait for pygtk-2.4.0 which might
        # allow us to do this without serious hardship.
        self.app.checkView.set_model(self.app.checklist)
        self.app.checkView.show()

        self.app.uiManager.groups['checklist'].set_sensitive(True)

        # Reset the checklist specific ui elements
        for menu in self.app.mergedMenus.keys():
            self.app.uiManager.remove_ui(menu)
            self.app.uiManager.remove_action_group(self.app.mergedMenus[menu])
        self.app.mergedMenus = {}

        # Add the new ui elements
        qamenudata = self.app.checklist.functions.get_ui(self.app)
        for (actions, menus) in qamenudata:
            self.app.uiManager.insert_action_group(actions, 50)
            mergeId = self.app.uiManager.add_ui_from_string(menus)
            self.app.mergedMenus[mergeId] = actions

        # Enable save type menus whenever the checklist changes
        self.app.checklist.connect('changed', self.app._enable_modified_menus)

        self.app.reviewView.set_model(self.app.checklist)
        self.app.reviewView.show()
        ### End section that should be removed to qareviewer.

        self.destroy()

    #
    # Navigation Callbacks


Generated by  Doxygen 1.6.0   Back to index