Beispiel #1
0
def setupStorageView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_BOOLEAN)

        storageViewColumns = (
            ("Storage Device", 550),
            ("LUN ID", 60),
            ("Capacity", 80),
        )

        populateViewColumns(view,
                            storageViewColumns,
                            sensitive=SUPPORTED_DISK_ENTRY)
        view.set_model(model)

        def _selectable(path):
            '''Callback for GtkTreeView that determines whether or not a row
            can be selected.'''

            treeIter = model.get_iter(path)
            return model.get(treeIter, SUPPORTED_DISK_ENTRY)[0]

        sel = view.get_selection()
        sel.set_select_function(_selectable)
Beispiel #2
0
def setupStorageView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_BOOLEAN)

        storageViewColumns = (
         ("Storage Device", 550),
         ("LUN ID", 60),
         ("Capacity", 80),
        )

        populateViewColumns(view, storageViewColumns,
                            sensitive=SUPPORTED_DISK_ENTRY)
        view.set_model(model)

        def _selectable(path):
            '''Callback for GtkTreeView that determines whether or not a row
            can be selected.'''
            
            treeIter = model.get_iter(path)
            return model.get(treeIter, SUPPORTED_DISK_ENTRY)[0]
        
        sel = view.get_selection()
        sel.set_select_function(_selectable)
Beispiel #3
0
    def __init__(self, controlState, xml):
        controlState.displayHeaderBar = True
        controlState.windowIcon = 'usb_cd_media.png'
        controlState.windowTitle = "CD-ROM or USB Installation"
        controlState.windowText = "Select the ESX installation source"

        connectSignalHandlerByDict(self, USBInstallMediaWindow, xml,
          { ('UsbRescan', 'clicked') : 'rescanMedia',
            ('UsbEject', 'clicked') : 'ejectMedia',
            })

        # Unmount any old media.
        media.runtimeActionUnmountMedia()
        
        self.mediaFound = []
        self.view = xml.get_widget("UsbMediaView")
        self.model = gtk.TreeStore(gobject.TYPE_STRING,
                                   gobject.TYPE_STRING,
                                   gobject.TYPE_STRING,
                                   gobject.TYPE_PYOBJECT,
                                   gobject.TYPE_STRING)
        self.view.set_model(self.model)

        mediaViewColumns = (
            ("Device", 200),
            ("Contents", 150),
            ("ESX Version", 120),
            )

        if not self.view.get_columns():
            populateViewColumns(self.view, mediaViewColumns, foreground=4)

        self.rescanMedia()
Beispiel #4
0
def setupPartitioningView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)

        storageViewColumns = (
            ("Mount Point", 270),
            ("Type", 120),
            ("Size", 120),
        )

        populateViewColumns(view, storageViewColumns)
        view.set_model(model)
Beispiel #5
0
def setupVmfsVolumesView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING)

        storageViewColumns = (
            ("Volume Name", 200),
            ("Capacity", 120),
            ("Free Space", 160),
        )

        populateViewColumns(view, storageViewColumns)
        view.set_model(model)
Beispiel #6
0
def setupPartitioningView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING, gobject.TYPE_PYOBJECT)

        storageViewColumns = (
         ("Mount Point", 270),
         ("Type", 120),
         ("Size", 120),
        )

        populateViewColumns(view, storageViewColumns)
        view.set_model(model)
Beispiel #7
0
def setupVmfsVolumesView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING)

        storageViewColumns = (
         ("Volume Name", 200),
         ("Capacity", 120),
         ("Free Space", 160),
        )

        populateViewColumns(view, storageViewColumns)
        view.set_model(model)
def _setupAddDriversView(view):
    if not view.get_columns():
        model = gtk.TreeStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
                              gobject.TYPE_STRING, gobject.TYPE_STRING)

        viewColumns = (
         ('Driver', 250),
         ('Version', 120),
         ('Description', 200),
        )

        populateViewColumns(view, viewColumns)
        view.set_model(model)
        view.get_selection().set_mode(gtk.SELECTION_MULTIPLE)