erase-hup / autokey

Automatically exported from code.google.com/p/autokey
GNU General Public License v3.0
0 stars 0 forks source link

create_abbreviation does not save the abbreviation with the phrase #171

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Use engine.create_abbreviation to create an abbreviation
2. Try to use the new abbreviation

What is the expected output? What do you see instead?

The abbreviation never fires and when you look at it in the UI (and json files) 
the abbreviation list is empty

What version of the product are you using? On what operating system?

Tried 0.81.4 and rev 429

Please provide any additional information below.

Created a simple patch that just stores the abbreviation into a new 
abbreviations list

===================================================================
--- src/lib/scripting.py    (revision 429)
+++ src/lib/scripting.py    (working copy)
@@ -837,7 +837,7 @@
         self.monitor.suspend()
         p = model.Phrase(description, contents)
         p.modes.append(model.TriggerMode.ABBREVIATION)
-        p.abbreviation = abbr
+        p.abbreviations = [abbr]
         folder.add_item(p)
         p.persist()
         self.monitor.unsuspend()

Original issue reported on code.google.com by LionicSh...@gmail.com on 20 Jan 2012 at 4:29

Attachments:

GoogleCodeExporter commented 9 years ago
Nice find - thanks

Original comment by cdekter on 22 Jan 2012 at 7:12

GoogleCodeExporter commented 9 years ago
Fix committed

Original comment by cdekter on 28 Jan 2012 at 9:09