Removed promoted text option. It wasn't all that useful, and the new speech restore performs the same thing more affectively.
This commit is contained in:
@@ -1,66 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import time
|
||||
|
||||
from fenrirscreenreader.core.i18n import _
|
||||
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributors.
|
||||
|
||||
|
||||
class command:
|
||||
def __init__(self):
|
||||
pass
|
||||
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
|
||||
def shutdown(self):
|
||||
pass
|
||||
|
||||
def get_description(self):
|
||||
return "No Description found"
|
||||
|
||||
def run(self):
|
||||
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
|
||||
"promote", "enabled"
|
||||
):
|
||||
return
|
||||
if (
|
||||
self.env["runtime"]["SettingsManager"]
|
||||
.get_setting("promote", "list")
|
||||
.strip(" \t\n")
|
||||
== ""
|
||||
):
|
||||
return
|
||||
if int(time.time() - self.env["input"]["last_input_time"]) < self.env[
|
||||
"runtime"
|
||||
]["SettingsManager"].get_setting_as_int(
|
||||
"promote", "inactive_timeout_sec"
|
||||
):
|
||||
return
|
||||
if (
|
||||
len(
|
||||
self.env["runtime"]["SettingsManager"].get_setting(
|
||||
"promote", "list"
|
||||
)
|
||||
)
|
||||
== 0
|
||||
):
|
||||
return
|
||||
for promote in (
|
||||
self.env["runtime"]["SettingsManager"]
|
||||
.get_setting("promote", "list")
|
||||
.split(",")
|
||||
):
|
||||
if promote in self.env["screen"]["new_delta"]:
|
||||
self.env["runtime"]["OutputManager"].play_sound_icon(
|
||||
"PromotedText"
|
||||
)
|
||||
self.env["input"]["last_input_time"] = time.time()
|
||||
return
|
||||
|
||||
def set_callback(self, callback):
|
||||
pass
|
||||
@@ -97,11 +97,6 @@ settings_data = {
|
||||
"vmenu_path": "",
|
||||
"quick_menu": "speech#rate;speech#pitch;speech#volume",
|
||||
},
|
||||
"promote": {
|
||||
"enabled": True,
|
||||
"inactive_timeout_sec": 120,
|
||||
"list": "",
|
||||
},
|
||||
"time": {
|
||||
"enabled": False,
|
||||
"present_time": True,
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
# Fenrir TTY screen reader
|
||||
# By Chrys, Storm Dragon, and contributors.
|
||||
|
||||
version = "2025.12.20"
|
||||
version = "2025.12.28"
|
||||
code_name = "testing"
|
||||
|
||||
Reference in New Issue
Block a user