Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 16 additions & 43 deletions addon/appModules/unigram.py
Original file line number Diff line number Diff line change
Expand Up @@ -1223,35 +1223,6 @@ def initOverlayClass(self):
}


class SettingsPanelListItem:

def script_activate_element(self, gesture):
if self.firstChild:
self.firstChild.doAction()
self.appModule.script_toLastMessage(gesture)

__gestures = {
"kb:enter": "activate_element",
"kb:space": "activate_element",
}


class ExplanationCorrectAnswerInQuiz:
def script_activate_element(self, gesture):
gesture.send()
elements = self.appModule.getElements()
try: obj = elements[1].firstChild.firstChild.firstChild
except: obj = None
if not obj: return False
# message(obj.name)
TextWindow(obj.name, _("Explanation"), readOnly=False)

__gestures = {
"kb:enter": "activate_element",
"kb:space": "activate_element",
}


class Saved_items:
# store frequently used window elements in cache for faster access
_items = {}
Expand Down Expand Up @@ -1905,7 +1876,13 @@ def get_contacts_list(self):
return False

def get_settings_list(self):
a = next(
"""Return the settings category button that Alt+1 focuses.

Unigram 13.0 puts the focus on the button inside each item of the
Navigation list, not on the item, so return the button of the open
category, or of the first one.
"""
settings_page = next(
(
item for item in self.getElements()
if item.role == Role.PANE
Expand All @@ -1915,12 +1892,16 @@ def get_settings_list(self):
),
None,
)
if not a:
if not settings_page:
return False
try: b = a.firstChild.next.next.next.next.firstChild
except: b = False
if b: return b
else: return False
try:
categories = next((item for item in settings_page.children if item.UIAAutomationId == "Navigation"), None)
items = categories.children if categories else []
category = next((item for item in items if State.SELECTED in item.states), items[0] if items else None)
except Exception:
# Unigram can rebuild the list while it is read; let Alt+1 report it.
return False
return _relative(category, "firstChild") or False


def is_message_object(self, obj):
Expand Down Expand Up @@ -3309,10 +3290,7 @@ def event_gainFocus(self, obj, nextHandler):
# Processing inline results
name = [item.name for item in obj.children if item.name != ""]
obj.name = ". ".join(name)
elif obj.name == "Unigram.ViewModels.MessageViewModel": obj.name = obj.firstChild.name
elif obj.name.startswith("EETypeRva"): obj.name = ", ".join([item.name for item in obj.children[1:]])
elif obj.name == "Unigram.Entities.StoragePhoto": obj.name = _("Image")
elif obj.name == "Unigram.ViewModels.Folders.FilterFlag": obj.name = obj.children[1].name
elif obj.name.startswith("chatTheme {"): obj.name = obj.firstChild.name
elif obj.name.startswith("forumTopic {\n info = forumTopicInfo {"):
obj.name = self._format_forum_topic_name(obj)
Expand Down Expand Up @@ -3436,9 +3414,6 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
self.tabs_folder_element = parent
if conf.get("voiceFolderNames") and State.SELECTED in obj.states: self.change_chats_folder(obj, parent.UIAAutomationId)
return True
elif parent.UIAAutomationId == "Navigation":
clsList.insert(0, SettingsPanelListItem)
return True
elif _is_chat_list_item(obj):
clsList.insert(0, ChatListItem)
return
Expand Down Expand Up @@ -3466,8 +3441,6 @@ def chooseNVDAObjectOverlayClasses(self, obj, clsList):
# and sibling enumeration can recursively re-enter object creation.
if _find_ancestor_by_automation_id(obj, ("ActiveButtons",), max_depth=4):
clsList.insert(0, Audio_and_video_button)
# elif obj.role == Role.BUTTON and obj.UIAAutomationId == "Explanation":
# clsList.insert(0, ExplanationCorrectAnswerInQuiz)
elif obj.UIAAutomationId == "Slider" and (obj.name == "Seek" or obj.role == Role.SLIDER):
self.saved_items.save("slider", obj)
elif (
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/NE/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,13 @@ UnigramPlus sound files are stored in the add-on's `appModules\media` folder. Op

टर्की स्थानीयकरण थपियो।

### Version 5.8.3

* UnigramPlus ले संस्करण 4.8.0 मा Unigram को सेटिङ श्रेणी सूचीमा थपेको Enter र स्पेसको व्यवस्थापन हटाइयो। Unigram 13.0 र पछिका संस्करणहरूमा प्रत्येक सेटिङ श्रेणी Enter वा स्पेस थिच्दा आफैँ खुल्ने बटन हो, र फोकस औजारले व्यवस्थापन गर्ने सूची वस्तुमा नभई त्यही बटनमा पर्छ, त्यसैले त्यो व्यवस्थापन त्यहाँ लागू हुँदैनथ्यो। अब श्रेणी खोल्दा फोकस श्रेणीभित्र सर्नुको सट्टा Unigram मा जस्तै त्यसैमा रहन्छ। यो व्यवस्थापनले इमोजी, GIF र स्टिकर ट्याबहरू जस्ता अन्य ट्याब सूचीहरूलाई पनि समेट्थ्यो र त्यहाँ Enter र स्पेस रोक्थ्यो; अब यी कुञ्जीहरू त्यहाँ पनि Unigram सम्म पुग्छन्।
* Unigram सेटिङमा Alt+1 ले अब फोकसलाई खुला सेटिङ श्रेणीमा, वा कुनै श्रेणी खुला नभए पहिलो श्रेणीमा लैजान्छ। पहिले यसले सेटिङ पृष्ठको निश्चित स्थानमा श्रेणी सूची खोज्थ्यो र त्यसपछि Unigram 13.0 मा फोकस लिन नसक्ने तत्वमा फोकस सार्ने प्रयास गर्थ्यो।
* अब चल्न नसक्ने कोड हटाइयो, प्रयोगमा कुनै परिवर्तन छैन। Unigram 9.5 भन्दा पहिले केही सूची वस्तुहरू आन्तरिक क्लास नामले घोषणा हुन्थे, र UnigramPlus ले त्यसलाई पढ्न मिल्ने नामले प्रतिस्थापन गर्थ्यो; Unigram 9.5 ले ती क्लासहरूको नाम परिवर्तन गरेकाले ती प्रतिस्थापनहरू फेरि कहिल्यै मेल खाएनन्। संस्करण 5.2.0 देखि निष्क्रिय रहेको, क्विजको व्याख्या छुट्टै सञ्झ्यालमा खोल्ने ह्यान्डलर पनि हटाइयो।
* पोलिस र भियतनामी अनुवादहरू अद्यावधिक गरियो।

### Version 5.8.2

* Unigram को नयाँ WinUI 3 बिटा संस्करणमा देखिने NVDA त्रुटिहरू समाधान गरियो। संस्करण 5.5.6 देखि, हरेक पटक Unigram मा फर्कँदा वा चिनियाँ, जापानी वा कोरियाली जस्ता भाषाका लागि इनपुट मेथड (IME) प्रयोग गरेर टाइप गर्दा एउटा त्रुटि लग हुन्थ्यो। Unigram को UWP संस्करणमा यो समस्या थिएन।
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/ar/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,13 @@

## قائمة التغييرات:

### الإصدار 5.8.3

* تمت إزالة معالجة مفتاحي Enter والمسافة التي أضافتها UnigramPlus إلى قائمة فئات إعدادات Unigram في الإصدار 4.8.0. في Unigram 13.0 وما بعده، أصبحت كل فئة إعدادات زرًا يُفتح بنفسه عند الضغط على Enter أو المسافة، ويستقر التركيز على هذا الزر بدلًا من عنصر القائمة الذي كانت الإضافة تعالجه، لذلك لم تعد هذه المعالجة تعمل هناك. والآن عند فتح فئة يبقى التركيز عليها، كما هو الحال في Unigram نفسه، بدلًا من نقله إلى داخل الفئة. كانت هذه المعالجة تشمل أيضًا قوائم علامات تبويب أخرى، مثل علامات تبويب الرموز التعبيرية وGIF والملصقات، وكانت تعترض فيها Enter والمسافة؛ والآن تصل هذه المفاتيح إلى Unigram هناك أيضًا.
* في إعدادات Unigram، أصبح Alt+1 ينقل التركيز الآن إلى فئة الإعدادات المفتوحة، أو إلى الفئة الأولى إذا لم تكن أي فئة مفتوحة. في السابق كان يبحث عن قائمة الفئات في موضع ثابت من صفحة الإعدادات، ثم يحاول نقل التركيز إلى عنصر لا يمكنه تلقي التركيز في Unigram 13.0.
* تمت إزالة شيفرة لم يعد من الممكن تشغيلها، دون أي تغيير في الاستخدام. قبل Unigram 9.5، كانت بعض عناصر القوائم تُقرأ باسم فئة داخلي، وكانت UnigramPlus تستبدله باسم مفهوم؛ وقد أعاد Unigram 9.5 تسمية تلك الفئات، فلم تعد هذه الاستبدالات تتطابق أبدًا. كما أُزيل المعالج الذي كان يفتح شرح الاختبار في نافذة منفصلة، والمعطل منذ الإصدار 5.2.0.
* تم تحديث الترجمتين البولندية والفيتنامية.

### الإصدار 5.8.2

* تم إصلاح أخطاء NVDA في الإصدار التجريبي الجديد من Unigram المبني على WinUI 3. منذ الإصدار 5.5.6، كان يُسجَّل خطأ في كل مرة يتم فيها الرجوع إلى Unigram أو الكتابة باستخدام محرر أسلوب الإدخال (IME)، مثل محررات اللغات الصينية أو اليابانية أو الكورية. لم يتأثر إصدار UWP من Unigram.
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/en/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ And remember that everyone who read this line thought that someone will definite

## List of changes:

### Version 5.8.3

* Removed the Enter and Space handling that UnigramPlus added to the list of Unigram settings categories in version 4.8.0. In Unigram 13.0 and later, each settings category is a button that opens with Enter or Space by itself, and the focus lands on that button rather than on the list item the add-on handled, so the handling no longer applied there. When you open a category, the focus now stays on it, as in Unigram itself, instead of moving into the category. The handling had also caught other tab lists, such as the Emoji, GIFs and Stickers tabs, and intercepted Enter and Space there; these keys now reach Unigram there as well.
* In Unigram settings, Alt+1 now moves the focus to the open settings category, or to the first category if none is open. It used to look for the category list at a fixed position on the settings page and then tried to focus an element that cannot receive the focus in Unigram 13.0.
* Removed code that could no longer run, with no change in use. Before Unigram 9.5, some list items were announced by an internal class name, which UnigramPlus replaced with a readable one; Unigram 9.5 renamed those classes, so the replacements never matched again. The handler that opened a quiz explanation in a separate window, disabled since version 5.2.0, was removed as well.
* Updated the Polish and Vietnamese translations.

### Version 5.8.2

* Fixed NVDA errors with the new WinUI 3 beta of Unigram. Since version 5.5.6, an error was logged every time you switched back to Unigram or typed with an input method (IME), such as one for Chinese, Japanese or Korean. The UWP version of Unigram was not affected.
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/es/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,13 @@ Y recuerde que todos los que leyeron esta línea pensaron alguien definitivament

##Lista de cambios:

### Versión 5.8.3

* Eliminado el manejo de Enter y espacio que UnigramPlus añadió a la lista de categorías de configuración de Unigram en la versión 4.8.0. En Unigram 13.0 y posteriores, cada categoría de configuración es un botón que se abre por sí mismo con Enter o espacio, y el foco se sitúa en ese botón y no en el elemento de lista que manejaba el complemento, por lo que ese manejo ya no tenía efecto allí. Ahora, al abrir una categoría, el foco permanece en ella, igual que en el propio Unigram, en lugar de desplazarse al interior de la categoría. Ese manejo también afectaba a otras listas de pestañas, como las pestañas Emoji, GIF y Stickers, donde interceptaba Enter y espacio; ahora estas teclas también llegan allí a Unigram.
* En la configuración de Unigram, Alt+1 ahora mueve el foco a la categoría de configuración abierta, o a la primera categoría si no hay ninguna abierta. Antes buscaba la lista de categorías en una posición fija de la página de configuración y luego intentaba mover el foco a un elemento que no puede recibir el foco en Unigram 13.0.
* Eliminado código que ya no podía ejecutarse, sin ningún cambio en el uso. Antes de Unigram 9.5, algunos elementos de lista se anunciaban con un nombre de clase interno, que UnigramPlus sustituía por uno legible; Unigram 9.5 cambió el nombre de esas clases, por lo que esas sustituciones ya nunca coincidían. También se eliminó el controlador que abría la explicación de un cuestionario en una ventana aparte, desactivado desde la versión 5.2.0.
* Actualizadas las traducciones al polaco y al vietnamita.

### Versión 5.8.2

* Corregidos los errores de NVDA en la nueva beta de Unigram basada en WinUI 3. Desde la versión 5.5.6, se registraba un error cada vez que se volvía a Unigram o se escribía con un editor de métodos de entrada (IME), como los de chino, japonés o coreano. La versión UWP de Unigram no se veía afectada.
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/fa/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,13 @@



###نسخه 5.8.3

* پردازش کلیدهای Enter و فاصله که UnigramPlus در نسخهٔ 4.8.0 به فهرست دسته‌های تنظیمات Unigram افزوده بود حذف شد. در Unigram 13.0 و بالاتر، هر دستهٔ تنظیمات دکمه‌ای است که خودش با Enter یا فاصله باز می‌شود و فوکوس به جای مورد فهرستی که افزونه پردازش می‌کرد، روی همین دکمه قرار می‌گیرد؛ بنابراین این پردازش دیگر در آنجا اعمال نمی‌شد. اکنون هنگام باز کردن یک دسته، فوکوس مانند خود Unigram روی همان دسته می‌ماند و به داخل دسته منتقل نمی‌شود. این پردازش فهرست‌های زبانهٔ دیگری مانند زبانه‌های ایموجی، GIF و استیکر را هم در بر می‌گرفت و Enter و فاصله را در آنجا رهگیری می‌کرد؛ اکنون این کلیدها در آنجا نیز به Unigram می‌رسند.
* در تنظیمات Unigram، کلید Alt+1 اکنون فوکوس را به دستهٔ تنظیمات باز، یا اگر هیچ دسته‌ای باز نباشد به نخستین دسته، منتقل می‌کند. پیش‌تر این کلید فهرست دسته‌ها را در موقعیتی ثابت از صفحهٔ تنظیمات جست‌وجو می‌کرد و سپس می‌کوشید فوکوس را به عنصری منتقل کند که در Unigram 13.0 نمی‌تواند فوکوس بگیرد.
* کدی که دیگر نمی‌توانست اجرا شود حذف شد و در استفاده هیچ تغییری ایجاد نمی‌شود. پیش از Unigram 9.5، برخی موارد فهرست با یک نام کلاس داخلی خوانده می‌شدند و UnigramPlus آن را با نامی خوانا جایگزین می‌کرد؛ Unigram 9.5 نام آن کلاس‌ها را تغییر داد، بنابراین این جایگزینی‌ها دیگر هرگز اعمال نمی‌شدند. پردازشگری که توضیح آزمون را در پنجره‌ای جداگانه باز می‌کرد و از نسخهٔ 5.2.0 غیرفعال بود نیز حذف شد.
* ترجمه‌های لهستانی و ویتنامی به‌روزرسانی شد.

###نسخه 5.8.2

* خطاهای NVDA در نسخهٔ آزمایشی جدید Unigram مبتنی بر WinUI 3 برطرف شد. از نسخهٔ 5.5.6، هر بار هنگام بازگشت به Unigram یا تایپ با ویرایشگر روش ورودی (IME)، مانند ویرایشگرهای چینی، ژاپنی یا کره‌ای، یک خطا ثبت می‌شد. نسخهٔ UWP برنامهٔ Unigram تحت تأثیر قرار نداشت.
Expand Down
7 changes: 7 additions & 0 deletions addon/doc/fr/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,13 @@ Les sons d'UnigramPlus se trouvent dans le dossier `appModules\media` de l'exten

##Liste des changements :

### Version 5.8.3

* Suppression de la gestion des touches Entrée et Espace qu'UnigramPlus ajoutait depuis la version 4.8.0 à la liste des catégories de paramètres d'Unigram. Dans Unigram 13.0 et versions ultérieures, chaque catégorie de paramètres est un bouton qui s'ouvre de lui-même avec Entrée ou Espace, et le focus arrive sur ce bouton plutôt que sur l'élément de liste que gérait l'extension ; cette gestion ne s'y appliquait donc plus. À l'ouverture d'une catégorie, le focus reste désormais sur celle-ci, comme dans Unigram lui-même, au lieu d'être déplacé dans la catégorie. Cette gestion s'appliquait aussi à d'autres listes d'onglets, comme les onglets Emoji, GIF et Stickers, où elle interceptait Entrée et Espace ; ces touches parviennent désormais aussi à Unigram à ces endroits.
* Dans les paramètres d'Unigram, Alt+1 place désormais le focus sur la catégorie de paramètres ouverte, ou sur la première catégorie si aucune n'est ouverte. Auparavant, il cherchait la liste des catégories à une position fixe de la page des paramètres, puis tentait de placer le focus sur un élément qui ne peut pas recevoir le focus dans Unigram 13.0.
* Suppression de code qui ne pouvait plus s'exécuter, sans aucun changement à l'usage. Avant Unigram 9.5, certains éléments de liste étaient annoncés par un nom de classe interne, qu'UnigramPlus remplaçait par un nom lisible ; Unigram 9.5 a renommé ces classes, si bien que ces remplacements ne s'appliquaient plus jamais. Le gestionnaire qui ouvrait l'explication d'un quiz dans une fenêtre séparée, désactivé depuis la version 5.2.0, a également été supprimé.
* Mise à jour des traductions polonaise et vietnamienne.

### Version 5.8.2

* Correction des erreurs de NVDA dans la nouvelle version bêta WinUI 3 d'Unigram. Depuis la version 5.5.6, une erreur était journalisée à chaque retour dans Unigram ou à chaque saisie avec un éditeur de méthode d'entrée (IME), comme ceux du chinois, du japonais ou du coréen. La version UWP d'Unigram n'était pas concernée.
Expand Down
Loading
Loading