Exemplo n.º 1
0
    def apply_changes(self, button, event):
        pw_dialog = ParentalPasswordDialog(self.win)
        if not pw_dialog.verify():
            return

        level = self.parental_level.get_value()
        set_parental_level(level)

        # track which parental control level people use
        track_data('parental-control-level-changed', {'level': level})

        if level == 3.0:
            # If on the highest parental control, prompt user to relaunch
            # the browser
            kdialog = KanoDialog(
                title_text=_("Settings"),
                description_text=(_("If any browsers are open, please relaunch " \
                                    "them for this setting to take effect")),
                parent_window=self.win
            )
            kdialog.run()

        else:
            # Only reboot for the lower parental controls
            common.need_reboot = True

        self.win.go_to_home()
    def apply_changes(self, button, event):
        pw_dialog = ParentalPasswordDialog(self.win)
        if not pw_dialog.verify():
            return

        level = self.parental_level.get_value()
        set_parental_level(level)
        set_setting('Parental-level', level)

        # track which parental control level people use
        track_data("parental-control-level-changed", {
            "level": level
        })

        if level == 3.0:
            # If on the highest parental control, prompt user to relaunch
            # the browser
            kdialog = KanoDialog(
                title_text='Settings',
                description_text=("If any browsers are open, please relaunch "
                                  "them for this setting to take effect"),
                parent_window=self.win
            )
            kdialog.run()

        else:
            # Only reboot for the lower parental controls
            common.need_reboot = True

        self.win.go_to_home()
Exemplo n.º 3
0
    def apply_changes(self, button, event):
        pw_dialog = ParentalPasswordDialog(self.win)
        if not pw_dialog.verify():
            return

        whitelist = [row[0] for row in self.whitelist.edit_list_store]
        blacklist = [row[0] for row in self.blacklist.edit_list_store]

        write_whitelisted_sites(whitelist)
        write_blacklisted_sites(blacklist)

        level = get_setting('Parental-level')
        set_parental_level(level)
        common.need_reboot = True

        # track which parental control level people use
        track_data('parental-control-level-changed', {'level': level})

        self.win.go_to_home()
    def apply_changes(self, button, event):
        pw_dialog = ParentalPasswordDialog(self.win)
        if not pw_dialog.verify():
            return

        whitelist = [row[0] for row in self.whitelist.edit_list_store]
        blacklist = [row[0] for row in self.blacklist.edit_list_store]

        write_whitelisted_sites(whitelist)
        write_blacklisted_sites(blacklist)

        level = get_setting('Parental-level')
        set_parental_level(level)
        common.need_reboot = True

        # track which parental control level people use
        track_data("parental-control-level-changed", {
            "level": level
        })

        self.win.go_to_home()