Esempio n. 1
0
    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_RescuePisiWidget()
        self.ui.setupUi(self)
        self.steps = YaliSteps()
        self.steps.setOperations([{"text":_("Starting DBUS..."),"operation":yali4.sysutils.chrootDbus},
                                  {"text":_("Trying to connect DBUS..."),"operation":yali4.postinstall.connectToDBus},
                                  {"text":_("Getting history ..."),"operation":self.fillHistoryList}])

        self.connect(self.ui.buttonSelectConnection, SIGNAL("clicked()"), self.showConnections)
        self.connectionWidget = None
Esempio n. 2
0
class Widget(QtGui.QWidget, ScreenWidget):
    title = _('Rescue Mode for Pisi History')
    desc = _('You can take back your system ...')
    icon = "iconInstall"
    help = _('''
<font size="+2">Pisi History</font>
<font size="+1"></font>
''')

    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_RescuePisiWidget()
        self.ui.setupUi(self)

        self.steps = YaliSteps()
        self.steps.setOperations([{"text":_("Starting DBUS..."),"operation":yali4.sysutils.chrootDbus},
                                  {"text":_("Trying to connect DBUS..."),"operation":yali4.postinstall.connectToDBus},
                                  {"text":_("Getting history ..."),"operation":self.fillHistoryList}])

        self.connect(self.ui.buttonSelectConnection, SIGNAL("clicked()"), self.showConnections)

    def showConnections(self):
        connections = ConnectionWidget(self)
        connections.show()

    def fillHistoryList(self):
        ui = PisiUI()
        ctx.debugger.log("PisiUI is creating..")
        yali4.pisiiface.initialize(ui, with_comar = True)
        try:
            history = yali4.pisiiface.getHistory()
            for hist in history:
                HistoryItem(self.ui.historyList, hist)
        except:
            return False
        return True

    def shown(self):
        ctx.mainScreen.disableBack()
        self.ui.buttonSelectConnection.setEnabled(False)
        ctx.yali.info.show()
        self.steps.slotRunOperations()
        ctx.yali.info.hide()
        self.ui.buttonSelectConnection.setEnabled(True)

    def execute(self):
        ctx.takeBackOperation = self.ui.historyList.currentItem().getInfo()
        ctx.mainScreen.moveInc = 2
        return True

    def backCheck(self):
        ctx.mainScreen.moveInc = 2
        return True
Esempio n. 3
0
    def __init__(self, *args):
        QtGui.QWidget.__init__(self,None)
        self.ui = Ui_RescuePisiWidget()
        self.ui.setupUi(self)

        self.steps = YaliSteps()
        self.steps.setOperations([{"text":_("Starting DBUS..."),"operation":yali4.sysutils.chroot_dbus},
                                  {"text":_("Trying to connect DBUS..."),"operation":yali4.postinstall.connectToDBus},
                                  {"text":_("Getting history ..."),"operation":self.fillHistoryList}])

        self.connect(self.ui.buttonSelectConnection, SIGNAL("clicked()"), self.showConnections)
Esempio n. 4
0
class Widget(QtGui.QWidget, ScreenWidget):
    title = _('Rescue Mode for Pisi History')
    desc = _('You can take back your system ...')
    icon = "iconInstall"
    help = _('''
<font size="+2">Pisi History</font>
<font size="+1"></font>
''')

    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_RescuePisiWidget()
        self.ui.setupUi(self)

        self.steps = YaliSteps()
        self.steps.setOperations([{
            "text": _("Starting DBUS..."),
            "operation": yali4.sysutils.chrootDbus
        }, {
            "text": _("Trying to connect DBUS..."),
            "operation": yali4.postinstall.connectToDBus
        }, {
            "text": _("Getting history ..."),
            "operation": self.fillHistoryList
        }])

        self.connect(self.ui.buttonSelectConnection, SIGNAL("clicked()"),
                     self.showConnections)

    def showConnections(self):
        connections = ConnectionWidget(self)
        connections.show()

    def fillHistoryList(self):
        ui = PisiUI()
        ctx.debugger.log("PisiUI is creating..")
        yali4.pisiiface.initialize(ui, with_comar=True)
        try:
            history = yali4.pisiiface.getHistory()
            for hist in history:
                HistoryItem(self.ui.historyList, hist)
        except:
            return False
        return True

    def shown(self):
        ctx.mainScreen.disableBack()
        self.ui.buttonSelectConnection.setEnabled(False)
        ctx.yali.info.show()
        self.steps.slotRunOperations()
        ctx.yali.info.hide()
        self.ui.buttonSelectConnection.setEnabled(True)

    def execute(self):
        ctx.takeBackOperation = self.ui.historyList.currentItem().getInfo()
        ctx.mainScreen.moveInc = 2
        return True

    def backCheck(self):
        ctx.mainScreen.moveInc = 2
        return True