Beispiel #1
0
    def update_dependencies(self, widget=False):
        for w in self.list_dependencies:
            w.destroy()

        supported_dependencies = self.runner.supported_dependencies.items()
        if len(supported_dependencies) > 0:
            for dependency in supported_dependencies:
                self.list_dependencies.add(
                    BottlesDependencyEntry(self.window, self.configuration,
                                           dependency))
            return

        if len(self.configuration.get("Installed_Dependencies")) > 0:
            for dependency in self.configuration.get("Installed_Dependencies"):
                self.list_dependencies.add(
                    BottlesDependencyEntry(self.window,
                                           self.configuration,
                                           dependency,
                                           plain=True))
            return

        return self.list_dependencies.add(
            BottlesEmpty(
                text=_("No dependencies found!"),
                icon="dialog-warning-symbolic",
                tip=
                _("There are no dependencies installed and we can't fetch from repository."
                  )))
Beispiel #2
0
    def update_installers(self, widget=False):
        for w in self.list_installers:
            w.destroy()

        supported_installers = self.runner.supported_installers.items()

        if len(supported_installers) > 0:
            for installer in supported_installers:
                self.list_installers.add(
                    BottlesInstallerEntry(self.window, self.configuration,
                                          installer))
            return

        return self.list_installers.add(
            BottlesEmpty(
                text=_("No installers found!"),
                icon="dialog-warning-symbolic",
                tip=
                _("We can't fetch the installers from the repository right now."
                  )))

        for installer in supported_installers:
            self.list_installers.add(
                BottlesInstallerEntry(self.window, self.configuration,
                                      installer))
Beispiel #3
0
    def update_bottles(self):
        for bottle in self.list_bottles.get_children():
            bottle.destroy()

        bottles = self.window.runner.local_bottles.items()

        if len(bottles) == 0:
            return self.list_bottles.add(
                BottlesEmpty(text=_("No bottles found!"),
                             icon="dialog-information-symbolic",
                             tip=_("Use the '+' button to create one.")))

        for bottle in bottles:
            self.list_bottles.add(
                BottlesListEntry(self.window, bottle, self.arg_executable))
        self.arg_executable = False
Beispiel #4
0
    def update_programs(self, widget=False):
        for w in self.list_programs:
            w.destroy()

        programs = self.runner.get_programs(self.configuration)

        if len(programs) == 0:
            return self.list_programs.add(
                BottlesEmpty(
                    text=_("No programs found!"),
                    icon="view-grid-symbolic",
                    tip=
                    _("The programs installed in the bottle will be listed here."
                      )))

        for program in programs:
            self.list_programs.add(
                BottlesProgramEntry(self.window, self.configuration, program))