commit/Emoticons: 2 new changesets

  • From: commits-noreply@xxxxxxxxxxxxx
  • To: nvda-addons-commits@xxxxxxxxxxxxx
  • Date: Fri, 25 Oct 2013 04:35:27 -0000

2 new commits in Emoticons:

https://bitbucket.org/nvdaaddonteam/emoticons/commits/620865bd15e2/
Changeset:   620865bd15e2
Branch:      None
User:        norrumar
Date:        2013-10-25 06:27:24
Summary:     Added a button to copy the dictionary into speechDicts folder.

Affected #:  1 file

diff --git a/addon/globalPlugins/emoticons.py b/addon/globalPlugins/emoticons.py
index d81a9b1..a7fb71a 100644
--- a/addon/globalPlugins/emoticons.py
+++ b/addon/globalPlugins/emoticons.py
@@ -345,6 +345,13 @@ class EmDicDialog(DictionaryDialog):
                self.Bind(wx.EVT_BUTTON,self.OnRemoveClick,id=removeButtonID)
                self.Bind(wx.EVT_BUTTON,self.OnResetClick,id=resetButtonID)
                settingsSizer.Add(entryButtonsSizer)
+               fileButtonsSizer=wx.BoxSizer(wx.HORIZONTAL)
+               exportButtonID=wx.NewId()
+               # Translators: The label for a button in speech dictionaries 
dialog to add new entries.
+               exportButton=wx.Button(self,exportButtonID,_("E&xport 
dictionary"),wx.DefaultPosition)
+               fileButtonsSizer.Add(exportButton)
+               self.Bind(wx.EVT_BUTTON,self.OnExportClick,id=exportButtonID)
+               settingsSizer.Add(fileButtonsSizer)
 
        def OnResetClick(self,evt):
                self.dictList.DeleteAllItems()
@@ -367,3 +374,7 @@ class EmDicDialog(DictionaryDialog):
                if shouldActivateEmoticons:
                        activateEmoticons()
                        shouldActivateEmoticons = False
+
+       def OnExportClick(self,evt):
+               self.onOk(None)
+               sD.save(os.path.join(speechDictHandler.speechDictsPath, 
"emoticons.dic"))


https://bitbucket.org/nvdaaddonteam/emoticons/commits/31b01d47a21b/
Changeset:   31b01d47a21b
Branch:      master
User:        norrumar
Date:        2013-10-25 06:35:03
Summary:     Request for importing dictionary if speechDicts/emoticons.dic is 
foun in installation.

Affected #:  1 file

diff --git a/addon/installTasks.py b/addon/installTasks.py
index faae485..e31560e 100644
--- a/addon/installTasks.py
+++ b/addon/installTasks.py
@@ -1,6 +1,9 @@
 # -*- coding: UTF-8 -*-
 
 import addonHandler
+import speechDictHandler
+import os
+import shutil
 import gui
 import wx
 
@@ -16,4 +19,15 @@ def onInstall():
                                _("Uninstall incompatible add-on"),
                                wx.YES|wx.NO|wx.ICON_WARNING)==wx.YES:
                                        addon.requestRemove()
-                       break
\ No newline at end of file
+                       break
+       if os.path.isfile(os.path.join(speechDictHandler.speechDictsPath, 
"emoticons.dic")):
+               if gui.messageBox(
+               # Translators: the label of a message box dialog.
+               _("You seem to have a dictionary for this add-on. Do you want 
to import it?"),
+               # Translators: the title of a message box dialog.
+               _("Import emoticons dictionary"),
+               wx.YES|wx.NO|wx.ICON_WARNING)==wx.YES:
+                       try:
+                               
shutil.copy(os.path.join(speechDictHandler.speechDictsPath, "emoticons.dic"), 
os.path.join(os.path.dirname(__file__), "globalPlugins"))
+                       except:
+                               pass

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.

Other related posts: