def __init__(self, parent, embed=False): QtGui.QWidget.__init__(self, parent) if embed: self.setupUi(parent) else: self.setupUi(self) # Backend self.iface = Interface() self.iface.listenSignals(self.signalHandler) # Fail if no packages provide backend self.checkBackend() # Build item list self.buildItemList() # Get system partitions self._partitions = getPartitions() self._hidden_fss = ("swap")
# Options widget from bootmanager.options import OptionsWidget from pardus.diskutils import getPartitions # Pds vs KDE import bootmanager.context as ctx if ctx.Pds.session == ctx.pds.Kde4: from PyKDE4.kdeui import KIcon from PyKDE4.kdecore import i18n else: from bootmanager.context import KIcon, i18n PARTITIONS = getPartitions() def getSuggestion(fstypes): return filter(lambda x: PARTITIONS[x]['fstype'] in fstypes, PARTITIONS) class MainWidget(QtGui.QWidget, Ui_MainWidget): def __init__(self, parent, embed=False): QtGui.QWidget.__init__(self, parent) if embed: self.setupUi(parent) else: self.setupUi(self) # Animation self.animator = QtCore.QTimeLine(ANIM_TIME, self)
# Options widget from bootmanager.options import OptionsWidget from pardus.diskutils import getPartitions # Pds vs KDE import bootmanager.context as ctx if ctx.Pds.session == ctx.pds.Kde4: from PyKDE4.kdeui import KIcon from PyKDE4.kdecore import i18n else: from bootmanager.context import KIcon, i18n PARTITIONS = getPartitions() def getSuggestion(fstypes): return filter(lambda x: PARTITIONS[x]['fstype'] in fstypes, PARTITIONS) class MainWidget(QtGui.QWidget, Ui_MainWidget): def __init__(self, parent, embed=False): QtGui.QWidget.__init__(self, parent) if embed: self.setupUi(parent) else: self.setupUi(self)