Esempio n. 1
0
    def __init__(self, xml, diskSet, parent):
        CommonWindow.__init__(self)

        self.dialog = xml.get_widget("createdatastore")
        self.diskSet = diskSet
        self.xml = xml
        self.parent = parent

        global _createDSHandlersInitialized
        if not _createDSHandlersInitialized:
            self.xml.signal_autoconnect({
                'on_createdatastore_ok_clicked':
                self.okClicked,
                'on_createdatastore_cancel_clicked':
                self.cancelClicked,
            })
            _createDSHandlersInitialized = True

        self.view = xml.get_widget("CreatedatastoreTreeView")
        self.scrolled = xml.get_widget("CreatedatastoreScrolledWindow")
        storage_widgets.setupStorageView(self.view)

        prunedDiskSet = buildDiskSet(self.diskSet,
                                     [self.parent.defaultDeviceName])

        storage_widgets.populateStorageModel(self.view,
                                             self.scrolled,
                                             prunedDiskSet,
                                             esxAndCos=False)

        self.addFrameToWindow()
Esempio n. 2
0
    def __init__(self, settings):
        CommonWindow.__init__(self)
        gladePath = os.path.join(os.path.dirname(__file__),
                                 'glade/storage-widgets.glade')
        self.xml = gtk.glade.XML(gladePath)

        self.dialog = self.xml.get_widget(settings['dialog'])

        self.text = self.xml.get_widget(settings['text'])

        self.okButton = self.xml.get_widget(settings['okButton'])
        self.cancelButton = self.xml.get_widget(settings['okButton'])
        self.checkButton = self.xml.get_widget(settings['checkButton'])

        self.rc = 1

        connectSignalHandlerByDict(
            self, self.__class__.__name__, self.xml, {
                (settings['cancelButton'], 'clicked'): 'cancelClicked',
                (settings['okButton'], 'clicked'): 'okClicked',
                (settings['checkButton'], 'toggled'): 'checkbuttonToggled',
            })

        self.addFrameToWindow()

        self.dialog.set_position(gtk.WIN_POS_CENTER)

        self.dialog.connect("key-press-event", self.keypress)
Esempio n. 3
0
    def __init__(self, settings):
        CommonWindow.__init__(self)
        gladePath = os.path.join(
            os.path.dirname(__file__), 'glade/storage-widgets.glade')
        self.xml = gtk.glade.XML(gladePath)

        self.dialog = self.xml.get_widget(settings['dialog'])

        self.text = self.xml.get_widget(settings['text'])

        self.okButton = self.xml.get_widget(settings['okButton'])
        self.cancelButton = self.xml.get_widget(settings['okButton'])
        self.checkButton = self.xml.get_widget(settings['checkButton'])

        self.rc = 1

        connectSignalHandlerByDict(self, self.__class__.__name__, self.xml,
          { (settings['cancelButton'], 'clicked') : 'cancelClicked',
            (settings['okButton'], 'clicked') : 'okClicked',
            (settings['checkButton'], 'toggled') : 'checkbuttonToggled',
          })

        self.addFrameToWindow()

        self.dialog.set_position(gtk.WIN_POS_CENTER)

        self.dialog.connect("key-press-event", self.keypress)
Esempio n. 4
0
    def __init__(self, xml, datastoreSet, parent):
        CommonWindow.__init__(self)

        self.dialog = xml.get_widget("selectdatastore")
        self.datastoreSet = datastoreSet

        self.xml = xml
        self.parent = parent

        global _selectDSHandlersInitialized
        if not _selectDSHandlersInitialized:
            self.xml.signal_autoconnect({
                'on_selectdatastore_ok_clicked':
                self.okClicked,
                'on_selectdatastore_cancel_clicked':
                self.cancelClicked,
            })
            _selectDSHandlersInitialized = True

        self.view = xml.get_widget("SelectdatastoreTreeView")
        self.scrolled = xml.get_widget("SelectdatastoreScrolledWindow")

        deviceName = userchoices.getEsxPhysicalDevice()
        skipList = [deviceName]

        if userchoices.getPartitionMountRequests():
            skipList = []

        prunedDatastore = buildDatastoreSet(self.datastoreSet, skipList)

        storage_widgets.setupVmfsVolumesView(self.view)
        storage_widgets.populateVmfsVolumesModel(self.view, self.scrolled,
                                                 prunedDatastore)

        self.addFrameToWindow()
Esempio n. 5
0
    def __init__(self, xml, datastoreSet, parent):
        CommonWindow.__init__(self)

        self.dialog = xml.get_widget("selectdatastore")
        self.datastoreSet = datastoreSet

        self.xml = xml
        self.parent = parent

        global _selectDSHandlersInitialized
        if not _selectDSHandlersInitialized:
            self.xml.signal_autoconnect({
                'on_selectdatastore_ok_clicked' : self.okClicked,
                'on_selectdatastore_cancel_clicked' : self.cancelClicked,
            })
            _selectDSHandlersInitialized = True

        self.view = xml.get_widget("SelectdatastoreTreeView")
        self.scrolled = xml.get_widget("SelectdatastoreScrolledWindow")

        deviceName = userchoices.getEsxPhysicalDevice()
        skipList = [deviceName]

        if userchoices.getPartitionMountRequests():
            skipList = []

        prunedDatastore = buildDatastoreSet(self.datastoreSet, skipList)

        storage_widgets.setupVmfsVolumesView(self.view)
        storage_widgets.populateVmfsVolumesModel(self.view, self.scrolled,
                                                 prunedDatastore)

        self.addFrameToWindow()
Esempio n. 6
0
    def __init__(self, xml, diskSet, parent):
        CommonWindow.__init__(self)

        self.dialog = xml.get_widget("createdatastore")
        self.diskSet = diskSet
        self.xml = xml
        self.parent = parent

        global _createDSHandlersInitialized
        if not _createDSHandlersInitialized:
            self.xml.signal_autoconnect({
                'on_createdatastore_ok_clicked' : self.okClicked,
                'on_createdatastore_cancel_clicked' : self.cancelClicked,
            })
            _createDSHandlersInitialized = True

        self.view = xml.get_widget("CreatedatastoreTreeView")
        self.scrolled = xml.get_widget("CreatedatastoreScrolledWindow")
        storage_widgets.setupStorageView(self.view)

        prunedDiskSet = buildDiskSet(self.diskSet,
                                     [self.parent.defaultDeviceName])

        storage_widgets.populateStorageModel(self.view, self.scrolled,
                                             prunedDiskSet,
                                             esxAndCos=False)

        self.addFrameToWindow()
Esempio n. 7
0
 def __init__(self, xml):
     #TODO: this subclass is not ideal.  We should make it so you can
     # send a glade file or dialog object as an argument to CommonWindow()
     CommonWindow.__init__(self)
     self.dialog = xml.get_widget("tz_advanced")
     self.dialog.set_position(gtk.WIN_POS_CENTER)
     title = self.dialog.get_title() # title comes from glade file
     self.addFrameToWindow(title)
Esempio n. 8
0
 def __init__(self, xml):
     #TODO: this subclass is not ideal.  We should make it so you can
     # send a glade file or dialog object as an argument to CommonWindow()
     CommonWindow.__init__(self)
     self.dialog = xml.get_widget("tz_advanced")
     self.dialog.set_position(gtk.WIN_POS_CENTER)
     title = self.dialog.get_title()  # title comes from glade file
     self.addFrameToWindow(title)
Esempio n. 9
0
    def __init__(self, drive):
        CommonWindow.__init__(self)
        gladePath = os.path.join(os.path.dirname(__file__),
                                 'glade/storage-widgets.glade')
        self.xml = gtk.glade.XML(gladePath)

        self.drive = drive
        self.diskSet = devices.DiskSet()
        self.disk = self.diskSet[drive]
        self.datastoreSet = datastore.DatastoreSet()

        self.dialog = self.xml.get_widget('details')

        self.setLabels()

        self.addFrameToWindow()

        self.dialog.set_position(gtk.WIN_POS_CENTER)
        self.dialog.show_all()
Esempio n. 10
0
    def __init__(self, drive):
        CommonWindow.__init__(self)
        gladePath = os.path.join(
            os.path.dirname(__file__), 'glade/storage-widgets.glade')
        self.xml = gtk.glade.XML(gladePath)

        self.drive = drive
        self.diskSet = devices.DiskSet()
        self.disk = self.diskSet[drive]
        self.datastoreSet = datastore.DatastoreSet()

        self.dialog = self.xml.get_widget('details')

        self.setLabels()

        self.addFrameToWindow()

        self.dialog.set_position(gtk.WIN_POS_CENTER)
        self.dialog.show_all()
Esempio n. 11
0
    def __init__(self, xml, parent):
        CommonWindow.__init__(self)

        self.xml = xml
        self.parent = parent

        self.userName = self.xml.get_widget("AdduserNameEntry")
        self.passwdEntry1 = self.xml.get_widget("AdduserPassword1Entry")
        self.passwdEntry2 = self.xml.get_widget("AdduserPassword2Entry")

        self.dialog = self.xml.get_widget("adduser")

        connectSignalHandlerByDict(self, AddUserWindow, self.xml,
          { ('AdduserOkButton', 'clicked'): 'okClicked',
            ('AdduserCancelButton', 'clicked'): 'cancelClicked',
          })


        self.addFrameToWindow()
Esempio n. 12
0
    def __init__(self, xml, parent):
        CommonWindow.__init__(self)

        self.xml = xml
        self.parent = parent

        self.userName = self.xml.get_widget("AdduserNameEntry")
        self.passwdEntry1 = self.xml.get_widget("AdduserPassword1Entry")
        self.passwdEntry2 = self.xml.get_widget("AdduserPassword2Entry")

        self.dialog = self.xml.get_widget("adduser")

        connectSignalHandlerByDict(
            self, AddUserWindow, self.xml, {
                ('AdduserOkButton', 'clicked'): 'okClicked',
                ('AdduserCancelButton', 'clicked'): 'cancelClicked',
            })

        self.addFrameToWindow()
Esempio n. 13
0
    def __init__(self, parent):
        CommonWindow.__init__(self)

        self.parent = parent
        self.xml = parent.xml

        self.dialog = self.xml.get_widget('adddrivers')
        assert self.dialog

        if not os.path.exists(customdrivers.DRIVER_DEPOT_DIR):
            os.makedirs(customdrivers.DRIVER_DEPOT_DIR)

        connectSignalHandlerByDict(self, AddDrivers, self.xml,
          { ('AdddriversOkButton', 'clicked') : 'importClicked',
            ('AdddriversCancelButton', 'clicked') : 'cancelClicked',
          })

        self.view = self.xml.get_widget('AdddriversTreeView')
        self.scrolled = self.xml.get_widget('AdddriversScrolledWindow')

        _setupAddDriversView(self.view)

        self.addFrameToWindow()
Esempio n. 14
0
    def __init__(self, xml, parent):
        CommonWindow.__init__(self)

        self.dialog = xml.get_widget("partition")
        self.xml = xml
        self.parent = parent

        # used to keep track if we're editing a partition or creating a new
        # one
        self.currentRequest = None

        connectSignalHandlerByDict(self, PartitionWindow, self.xml,
          { ('PartitionOkButton', 'clicked') : 'okClicked',
            ('PartitionCancelButton', 'clicked') : 'cancelClicked',
            ('PartitionfsComboBox', 'changed') : 'checkFs',
          })


        populateSizeEntries(xml.get_widget("PartitionsizeComboBox"))
        populateMountPoints(xml.get_widget("PartitionMountpointComboBoxEntry"))
        populateFsEntries(xml.get_widget("PartitionfsComboBox"))

        self.addFrameToWindow()
Esempio n. 15
0
    def __init__(self, parent):
        CommonWindow.__init__(self)
        self.xml = parent.xml

        self.acceptedEula = False

        self.dialog = self.xml.get_widget('drivereula')
        assert self.dialog

        self.okButton = self.xml.get_widget('DrivereulaOkButton')
        self.checkButton = self.xml.get_widget('DrivereulaCheckButton')
        self.okButton.set_sensitive(self.checkButton.get_active())

        connectSignalHandlerByDict(self, AddDrivers, self.xml,
          { ('DrivereulaOkButton', 'clicked') : 'okClicked',
            ('DrivereulaCancelButton', 'clicked') : 'cancelClicked',
            ('DrivereulaCheckButton', 'toggled') : 'checkbuttonToggled',
          })

        self.setupEula()
        self.addFrameToWindow()

        self.dialog.set_position(gtk.WIN_POS_CENTER)
        self.dialog.show_all()