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

def qareviewer::QAReviewer::__init__ (   self,
  arguments 
)

Creates a new QA reviewer window.
   
Keyword -- arguments:
arguments: A commandline to process when setting up the environment

Definition at line 39 of file qareviewer.py.

00039                                  :
        """Creates a new QA reviewer window.
           
        Keyword -- arguments:
        arguments: A commandline to process when setting up the environment
        """

        # Load the main part of the interface
        gladefile = 'glade/qa-assistant.glade'
        gnomeglade.GnomeApp.__init__(self, PROGRAMNAME, __version__,
                HUMANPROGRAMNAME, gladefile, 'ReviewerWindow')
       
        #
        # Create additional interface components
        #

        # Create a uimanager to handle the menus and toolbars
        self.uiManager = ui.UI(self)
        self.mergedMenus = {}
        accelGroup = self.uiManager.get_accel_group()
        self.ReviewerWindow.add_accel_group(accelGroup)
        menubar = self.uiManager.get_widget('/MainMenu')
        toolbar = self.uiManager.get_widget('/MainToolBar')
        self.ReviewerWindow.set_menus(menubar)
        self.ReviewerWindow.set_toolbar(toolbar)
        iconFile = gnomeglade.uninstalled_file('pixmaps/qa-icon.png')
        if iconFile == None:
            iconFile = self.program.locate_file(gnome.FILE_DOMAIN_APP_PIXMAP,
                                        'qa-icon.png', True)
            if iconFile == []:
                iconFile = None
            else:
                iconFile = iconFile[0]
        if iconFile:
            self.logo = gnomeglade.load_pixbuf(iconFile)
            self.ReviewerWindow.set_property('icon', self.logo)

        # Create the views onto the checklist
        self.checkView = CheckView()
        self.listPane.add(self.checkView)
        self.reviewView = Review()
        self.reviewPane.add(self.reviewView)

        self.grabArrow = gtk.Arrow(gtk.ARROW_LEFT, gtk.SHADOW_NONE)
        self.grabArrow.set_size_request(8,8)
        label = self.grabBar.get_child()
        self.grabBar.remove(label)
        self.grabBar.add(self.grabArrow)
        self.grabArrow.show()

        self.reviewScroll.hide()

        # Create our Clipboard
        self.clipboard = gtk.Clipboard(gtk.gdk.display_get_default(),
                'CLIPBOARD')
        self.clipPrimary = gtk.Clipboard(gtk.gdk.display_get_default(),
                'PRIMARY')

        self.lastSaveFileDir = './'
        ### FIXME: This should be set by the module that consumes it.
        #self.lastSRPMDir = './'

        #
        # Command line initialization
        #

        self.checklist = None
        ### FIXME: Read commandline for things like a checklist file specified.
        # If there is a checklist on the commandline, send it to the druid to
        # be loaded.
        # load that.  The
        # properties tell us if there's any information that must be taken
        # from the user.  Or if it's already been filled out.

        #
        # Blast off!
        #
        
        if self.checklist:
            self.ReviewerWindow.show()
        else:
            ### FIXME: While the Druid is onscreen, set everything in the
            # ReviewerWindow to be insensitive.
            # If no checklist is loaded, only file::New and file::Load should
            # work.... (?)
            startDruid = checkload.NewDruid(self, checkload.START)
            startDruid.set_icon(self.logo)
            startDruid.show_all()
            ### FIXME: Note that the druid must destroy itself when it is
            # finished.
            # If there's no checklist on the commandline, popup the Druid that
            # asks the user to select a checklist from the installed defaults
            # or a savefile.  (Same type of file, but they have distinctly
            # different needs in terms of selecting.
            # CheckLists will all be located someplace in the system that the
            # program knows about.  so a simple selector can be used.
            # savefiles will be inplaces that the user knows about (maybe in the
            # home directory or in the CWD.)  So the user should get a file
            # selector for this.
            #
            # Once the user selects a checklist file to load, we look at the
            # properties and decide if we have to ask the user for additional
            # information about the checklist.
            #
            # Question for self:  Does it make sense to have the user verify all
            # the properties at load time or should the user only enter when the
            # properties are required and not loaded?
       
            
    #
    # Helper Functions


Generated by  Doxygen 1.6.0   Back to index