Ejemplo n.º 1
0
    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_goodbyeWidget()
        self.ui.setupUi(self)

        self.remove_autostart = True

        lang = KGlobal.locale().language()
        if lang in ["de", "el", "es", "it", "uz"]:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help/" + lang
        else:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help"
        if lang in [
                "de", "es", "eu", "fr", "it", "pl", "pt-br", "sv", "ru", "uz",
                "zh-hant"
        ]:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide/" + lang
        else:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide"

        self.autofile = os.path.expanduser(
            "~/.config/autostart/kapudan.desktop")
        self.gautofile = "/usr/share/kde4/apps/kapudan/kapudan/kapudan-autostart.desktop"

        self.ui.autostart.setChecked(False)
Ejemplo n.º 2
0
class Widget(QtGui.QWidget, Screen):
    title = i18n("More")
    desc = i18n("Congratulations!")

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

        self.remove_autostart = True

        lang = KGlobal.locale().language()
        if lang in ["de", "el", "es", "it", "uz"]:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help/" + lang
        else:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help"
        if lang in [
                "de", "es", "eu", "fr", "it", "pl", "pt-br", "sv", "ru", "uz",
                "zh-hant"
        ]:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide/" + lang
        else:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide"

        self.autofile = os.path.expanduser(
            "~/.config/autostart/kapudan.desktop")
        self.gautofile = "/usr/share/kde4/apps/kapudan/kapudan/kapudan-autostart.desktop"

        self.ui.autostart.setChecked(False)

    def on_autostart_toggled(self):
        # Remove/set autostart entry
        self.remove_autostart = not self.remove_autostart

    def on_buttonSystemSettings_clicked(self):
        self.procSettings = QProcess()
        self.procSettings.start("systemsettings")

    def on_buttonHelpPages_clicked(self):
        self.procSettings = QProcess()
        command = "xdg-open " + self.helpPageUrl
        self.procSettings.start(command)

    def on_buttonBeginnersGuide_clicked(self):
        self.procSettings = QProcess()
        command = "xdg-open " + self.beginnersGuideUrl
        self.procSettings.start(command)

    def execute(self):
        if self.remove_autostart:
            try:
                os.remove(self.autofile)
            except OSError:
                pass
        else:
            if not os.path.isfile(self.autofile):
                shutil.copyfile(self.gautofile, self.autofile)
        return True
Ejemplo n.º 3
0
class Widget(QtGui.QWidget, Screen):
    title = i18n("More")
    desc = i18n("Congratulations!")

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

        self.remove_autostart = True

        lang = KGlobal.locale().language()
        if lang in ["de", "el", "es", "it", "uz"]:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help/" + lang
        else:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help"
        if lang in ["de", "es", "eu", "fr", "it", "pl", "pt-br", "sv", "ru", "uz", "zh-hant"]:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide/" + lang
        else:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide"

        self.autofile = os.path.expanduser("~/.config/autostart/kapudan.desktop")
        self.gautofile = "/usr/share/kde4/apps/kapudan/kapudan/kapudan-autostart.desktop"

        self.ui.autostart.setChecked(False)

    def on_autostart_toggled(self):
        # Remove/set autostart entry
        self.remove_autostart = not self.remove_autostart

    def on_buttonSystemSettings_clicked(self):
        self.procSettings = QProcess()
        self.procSettings.start("systemsettings")

    def on_buttonHelpPages_clicked(self):
        self.procSettings = QProcess()
        command = "xdg-open " + self.helpPageUrl
        self.procSettings.start(command)

    def on_buttonBeginnersGuide_clicked(self):
        self.procSettings = QProcess()
        command = "xdg-open " + self.beginnersGuideUrl
        self.procSettings.start(command)

    def execute(self):
        if self.remove_autostart:
            try:
                os.remove(self.autofile)
            except OSError:
                pass
        else:
            if not os.path.isfile(self.autofile):
                shutil.copyfile(self.gautofile, self.autofile)
        return True
Ejemplo n.º 4
0
    def __init__(self, *args):
        QtGui.QWidget.__init__(self, None)
        self.ui = Ui_goodbyeWidget()
        self.ui.setupUi(self)

        self.remove_autostart = True

        lang = KGlobal.locale().language()
        if lang in ["de", "el", "es", "it", "uz"]:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help/" + lang
        else:
            self.helpPageUrl = "http://chakraos.org/wiki/index.php?title=Help"
        if lang in ["de", "es", "eu", "fr", "it", "pl", "pt-br", "sv", "ru", "uz", "zh-hant"]:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide/" + lang
        else:
            self.beginnersGuideUrl = "http://chakraos.org/wiki/index.php?title=Beginner's_Guide"

        self.autofile = os.path.expanduser("~/.config/autostart/kapudan.desktop")
        self.gautofile = "/usr/share/kde4/apps/kapudan/kapudan/kapudan-autostart.desktop"

        self.ui.autostart.setChecked(False)