3 new commits in Emoticons:
https://bitbucket.org/nvdaaddonteam/emoticons/commits/dbc73ade6ed6/
Changeset: dbc73ade6ed6
Branch: None
User: norrumar
Date: 2018-08-26 16:30:23+00:00
Summary: Fix bug in installTasks
* Create subdirs before copying dictionaries
Affected #: 1 file
diff --git a/addon/installTasks.py b/addon/installTasks.py
index 53be7cc..9fc5f76 100644
--- a/addon/installTasks.py
+++ b/addon/installTasks.py
@@ -41,10 +41,7 @@ def onInstall():
_("Import Emoticons add-on settings"),
wx.YES|wx.NO|wx.ICON_WARNING)==wx.YES:
try:
-
shutil.copy(os.path.join(speechDictHandler.speechDictsPath, "emoticons.dic"),
ADDON_DICTS_PATH)
- except:
- pass
- try:
+ os.makedirs(EXPORT_DICTS_PATH)
shutil.copy(os.path.join(speechDictHandler.speechDictsPath, "emoticons.dic"),
EXPORT_DICTS_PATH)
except:
pass
https://bitbucket.org/nvdaaddonteam/emoticons/commits/7823a78da468/
Changeset: 7823a78da468
Branch: None
User: norrumar
Date: 2018-08-26 16:38:03+00:00
Summary: Fix regression: Dictionaries loaded faster
Affected #: 1 file
diff --git a/addon/globalPlugins/emoticons/__init__.py
b/addon/globalPlugins/emoticons/__init__.py
index 5246f1d..c845e4d 100644
--- a/addon/globalPlugins/emoticons/__init__.py
+++ b/addon/globalPlugins/emoticons/__init__.py
@@ -44,9 +44,8 @@ defaultDic = speechDictHandler.SpeechDict()
sD = speechDictHandler.SpeechDict()
def activateAnnouncement():
- for entry in sD:
- if not entry in speechDictHandler.dictionaries["temp"]:
- speechDictHandler.dictionaries["temp"].append(entry)
+ speechDictHandler.dictionaries["temp"].extend(sD)
+
def deactivateAnnouncement():
for entry in sD:
https://bitbucket.org/nvdaaddonteam/emoticons/commits/dd5e877b68ba/
Changeset: dd5e877b68ba
Branch: b8.1-dev
User: norrumar
Date: 2018-08-27 18:49:22+00:00
Summary: Version 8.1-dev: Suggestions by Timothy
https://nvda-addons.groups.io/g/nvda-addons/topic/23674936#4250
* Extend temp dictionary to improve speed in announcement activation (restored
from version 5).
* Fix bug in installtasks.
Affected #: 3 files
diff --git a/addon/globalPlugins/emoticons/__init__.py
b/addon/globalPlugins/emoticons/__init__.py
index c845e4d..4103558 100644
--- a/addon/globalPlugins/emoticons/__init__.py
+++ b/addon/globalPlugins/emoticons/__init__.py
@@ -35,7 +35,6 @@ except NameError:
confspec = {
"announcement": "integer(default=0)",
"cleanDicts": "boolean(default=False)",
- "onlyNormalConfiguration": "boolean(default=False)",
}
config.conf.spec["emoticons"] = confspec
@@ -46,7 +45,6 @@ sD = speechDictHandler.SpeechDict()
def activateAnnouncement():
speechDictHandler.dictionaries["temp"].extend(sD)
-
def deactivateAnnouncement():
for entry in sD:
if entry in speechDictHandler.dictionaries["temp"]:
@@ -57,7 +55,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
scriptCategory = SCRCAT_SPEECH
def loadDic(self):
- if (config.conf["emoticons"]["onlyNormalConfiguration"] or
self.profileName is None):
+ if self.profileName is None:
self.dicFile = ADDON_DIC_DEFAULT_FILE
else:
self.dicFile = os.path.join(ADDON_DICTS_PATH,
"profiles", "%s.dic" % self.profileName)
@@ -69,19 +67,10 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
self.profileName = config.conf.profiles[-1].name
if self.profileName == self.oldProfileName:
return
- if not config.conf["emoticons"]["onlyNormalConfiguration"]:
- deactivateAnnouncement()
- self.loadDic()
- if config.conf["emoticons"]["announcement"]:
- activateAnnouncement()
- else:
- if AddonSettingsPanel not in
NVDASettingsDialog.categoryClasses and self.profileName is None:
-
NVDASettingsDialog.categoryClasses.append(AddonSettingsPanel)
- else:
- try:
-
NVDASettingsDialog.categoryClasses.remove(AddonSettingsPanel)
- except:
- pass
+ deactivateAnnouncement()
+ self.loadDic()
+ if config.conf["emoticons"]["announcement"]:
+ activateAnnouncement()
self.oldProfileName = self.profileName
def __init__(self):
@@ -115,14 +104,10 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
# Translators: the tooltip text for a menu item.
_("Shows a dictionary dialog to customize emoticons"))
gui.mainFrame.sysTrayIcon.Bind(wx.EVT_MENU, self.onEmDicDialog,
self.dicItem)
- if not config.conf["emoticons"]["onlyNormalConfiguration"] or
self.profileName is None:
-
NVDASettingsDialog.categoryClasses.append(AddonSettingsPanel)
+ NVDASettingsDialog.categoryClasses.append(AddonSettingsPanel)
# Config
- if not config.conf["emoticons"]["onlyNormalConfiguration"]:
- announcement = config.conf["emoticons"]["announcement"]
- else:
- announcement =
config.conf.profiles[0]["emoticons"]["announcement"]
+ announcement = config.conf["emoticons"]["announcement"]
if announcement:
activateAnnouncement()
config.post_configProfileSwitch.register(self.handleConfigProfileSwitch)
@@ -166,8 +151,7 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
gesture="kb:NVDA+e"
)
def script_toggleSpeakingEmoticons(self, gesture):
- if (not globalVars.speechDictionaryProcessing
- or (config.conf["emoticons"]["onlyNormalConfiguration"]
and self.profileName is not None)):
+ if not globalVars.speechDictionaryProcessing:
return
if config.conf["emoticons"]["announcement"]:
config.conf["emoticons"]["announcement"] = 0
@@ -180,7 +164,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
# Translators: message presented when the dictionary
for emoticons is loaded.
ui.message(_("Emoticons on."))
-
@script(
# Translators: Message presented in input help mode.
description=_("Shows a dialog to select a smiley you want to
paste."),
@@ -204,8 +187,6 @@ class GlobalPlugin(globalPluginHandler.GlobalPlugin):
category=SCRCAT_CONFIG
)
def script_settings(self, gesture):
- if config.conf["emoticons"]["onlyNormalConfiguration"] and
self.profileName is not None:
- return
wx.CallAfter(self.onSettingsPanel, None)
@@ -405,19 +386,13 @@ class EmDicDialog(DictionaryDialog):
def onOk(self,evt):
super(EmDicDialog, self).onOk(evt)
- if not config.conf["emoticons"]["onlyNormalConfiguration"]:
- announcement = config.conf["emoticons"]["announcement"]
- else:
- announcement =
config.conf.profiles[0]["emoticons"]["announcement"]
+ announcement = config.conf["emoticons"]["announcement"]
if announcement:
activateAnnouncement()
def onCancel(self,evt):
super(EmDicDialog, self).onCancel(evt)
- if not config.conf["emoticons"]["onlyNormalConfiguration"]:
- announcement = config.conf["emoticons"]["announcement"]
- else:
- announcement =
config.conf.profiles[0]["emoticons"]["announcement"]
+ announcement = config.conf["emoticons"]["announcement"]
if announcement:
activateAnnouncement()
@@ -445,20 +420,12 @@ class AddonSettingsPanel(SettingsPanel):
# Translators: The label for a setting in Emoticons panel.
self.removeCheckBox = sHelper.addItem(wx.CheckBox(self,
label=_("&Remove not used dictionaries")))
self.removeCheckBox.Value =
config.conf["emoticons"]["cleanDicts"]
- # Translators: The label for a setting in Emoticons panel.
- self.onlyNormalCheckBox = sHelper.addItem(wx.CheckBox(self,
label=_("&Settings only in normal configuration (not recommended)")))
- self.onlyNormalCheckBox.Value =
config.conf["emoticons"]["onlyNormalConfiguration"]
- profileName = config.conf.profiles[-1].name
- self.onlyNormalCheckBox.Enabled = profileName is None
-
- def postInit(self):
- self.activateList.SetFocus()
def onSave(self):
+ announcement = config.conf["emoticons"]["announcement"]
config.conf["emoticons"]["announcement"] =
self.activateList.GetSelection()
- if config.conf["emoticons"]["announcement"]:
+ if config.conf["emoticons"]["announcement"] and not
announcement:
activateAnnouncement()
- else:
+ elif not config.conf["emoticons"]["announcement"] and
announcement:
deactivateAnnouncement()
config.conf["emoticons"]["cleanDicts"] =
self.removeCheckBox.Value
- config.conf["emoticons"]["onlyNormalConfiguration"] =
self.onlyNormalCheckBox.Value
diff --git a/buildVars.py b/buildVars.py
index 810846a..63a417c 100644
--- a/buildVars.py
+++ b/buildVars.py
@@ -19,7 +19,7 @@ addon_info = {
# Translators: Long description to be shown for this add-on on add-on
information from add-ons manager
"addon_description" : _("Enables the announcement of emoticon names
instead of the character Representation."),
# version
- "addon_version" : "8.0-dev",
+ "addon_version" : "8.1-dev",
# Author(s)
"addon_author" : u"Chris Leo <llajta2012@xxxxxxxxx>, Noelia Ruiz
Martínez <nrm1977@xxxxxxxxx>, Mesar Hameed <mhameed@xxxxxxxxxxxxx>, Francisco
Javier Estrada Martínez <Fjestrad@xxxxxxxxxxx>",
# URL for the add-on documentation support
diff --git a/readme.md b/readme.md
index 4897e73..81d7d2e 100644
--- a/readme.md
+++ b/readme.md
@@ -63,8 +63,7 @@ These are the key commands available by default, you can edit
those or add new k
## Changes for 8.0 ##
-* Added the possibility of enabling settings changes just for normal
configuration.
-* Requires NVDA 2018.3.
+* Compatible with NVDA 2018.3 (required).
## Changes for 7.0 ##
Repository URL: https://bitbucket.org/nvdaaddonteam/emoticons/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.