From 5c27f90023128a0656782f6f656a78f17541002e Mon Sep 17 00:00:00 2001 From: psoukie Date: Wed, 8 Feb 2023 22:56:46 -0800 Subject: [PATCH] build: 2.1.1 (w ignoring of compound chords) --- source/dictionaries.ahk | 10 +++++++--- source/version.ahk | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/source/dictionaries.ahk b/source/dictionaries.ahk index 6e0727c..5b565f4 100644 --- a/source/dictionaries.ahk +++ b/source/dictionaries.ahk @@ -81,8 +81,12 @@ Class DictionaryClass { } ; Adds a new pair of chord and its expanded text directly to 'this._entries' _RegisterShortcut(newch_unsorted, newword, write_to_file:=false) { - if (this._chorded) + if (this._chorded) { + ; skip compound chords if present + if (InStr(SubStr(newch_unsorted, 2), " ")) + return true newch := Arrange(newch_unsorted) + } else newch := newch_unsorted if (! this._IsShortcutOK(newch, newword)) @@ -153,10 +157,10 @@ CheckDictionaryFileExists(dictionary_file, dictionary_type) { flist .= SubStr(A_LoopFileName, 1, StrLen(A_LoopFileName)-4) "`n" Sort flist new_file := SubStr(flist, 1, InStr(flist, "`n")-1) ".txt" - errmsg .= Format("ZipChord detected the dictionary '{}' and is going to open it.", new_file) + errmsg .= Format("ZipChord found the dictionary '{}' and is going to open it.", new_file) } else { - errmsg .= Format("ZipChord is going to create a new '{}s.txt' dictionary in its own folder.", dictionary_type) + errmsg .= Format("ZipChord is going to create a new '{}s.txt' dictionary under '{}'.", dictionary_type, A_WorkingDir) new_file := dictionary_type "s.txt" FileAppend % "This is a " dictionary_type " dictionary for ZipChord. Define " dictionary_type "s and corresponding expanded words in a tab-separated list (one entry per line).`nSee https://github.com/psoukie/zipchord for details.`n`ndm`tdemo", %new_file%, UTF-8 } diff --git a/source/version.ahk b/source/version.ahk index aa52148..e019e87 100644 --- a/source/version.ahk +++ b/source/version.ahk @@ -1,4 +1,4 @@ -zc_version := "2.1.0" +zc_version := "2.1.1" ;@Ahk2Exe-SetVersion %A_PriorLine~U)^(.+"){1}(.+)".*$~$2% zc_app_name := "ZipChord" ;@Ahk2Exe-SetName %A_PriorLine~U)^(.+"){1}(.+)".*$~$2%