Пример #1
0
class PartitionWidget(gtk.HBox):
    """Combined widget showing all ntfs partitions in a list,
    the currently selected one and the total disk size.
    """
    def __init__(self):
        gtk.HBox.__init__(self)

        self.plist = SimpleList(_("NTFS Partitions"))
        self.pack_start(self.plist)

        vbox = gtk.VBox()
        self.pack_end(vbox)

        # Info: partition
        self.partition = ShowInfoWidget(_("NTFS Partition:  "))
        vbox.pack_start(self.partition)

        # Info: total drive size
        self.totalsize = ShowInfoWidget(_("Total capacity of drive:  "))
        vbox.pack_start(self.totalsize)

    def set_plist(self, partlist):
        self.plist.set(partlist)

    def set_disksize(self, gb):
        self.totalsize.set(gb)

    def set_part(self, part):
        self.partition.set(part)
        self.plist.set_select(part)
Пример #2
0
    def __init__(self):
        gtk.HBox.__init__(self)

        self.plist = SimpleList(_("NTFS Partitions"))
        self.pack_start(self.plist)

        vbox = gtk.VBox()
        self.pack_end(vbox)

        # Info: partition
        self.partition = ShowInfoWidget(_("NTFS Partition:  "))
        vbox.pack_start(self.partition)

        # Info: total drive size
        self.totalsize = ShowInfoWidget(_("Total capacity of drive:  "))
        vbox.pack_start(self.totalsize)