mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-11 03:15:33 +00:00
Merge branch 'stable-11.0' of https://github.com/keymanapp/keyman into stable-11.0
This commit is contained in:
commit
d627bfbbb9
7 changed files with 35 additions and 21 deletions
|
|
@ -156,7 +156,7 @@ public final class LanguageListActivity extends AppCompatActivity implements OnK
|
|||
Toast.makeText(context, context.getString(R.string.font_failed_to_download), Toast.LENGTH_LONG).show();
|
||||
}
|
||||
finish();
|
||||
} else {
|
||||
} else if (!((AppCompatActivity)context).isFinishing()) {
|
||||
String title = String.format("%s: %s", languageName, keyboardName);
|
||||
showErrorDialog(context, title, context.getString(R.string.keyboard_failed_to_download));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,12 @@
|
|||
# Keyman for Android
|
||||
|
||||
## 2019-02-27 11.0.2102 stable
|
||||
* Bug fix:
|
||||
* Fix crash from language picker trying to show error dialog (#1634)
|
||||
|
||||
## 2019-02-26 11.0.2101 stable
|
||||
* No changes to Keyman for Android (updated Keyman Web Engine, #1629)
|
||||
|
||||
## 2019-02-25 11.0.2100 stable
|
||||
* 11.0 Stable release
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
#define strncasecmp _strnicmp
|
||||
#endif
|
||||
|
||||
#if __x86_64__
|
||||
#if defined(__LP64__) || defined(_LP64)
|
||||
/* 64-bit, g++ */
|
||||
#define KMX_64BIT
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
# Keyman for Linux Version History
|
||||
|
||||
## 2019-02-25 11.0.120 stable
|
||||
## 2019-02-25 11.0.124 stable
|
||||
* 11.0 Stable release
|
||||
|
||||
## 2019-02-22 11.0.111 beta
|
||||
|
|
|
|||
|
|
@ -1,5 +1,11 @@
|
|||
# KeymanWeb Version History
|
||||
|
||||
## 2019-02-27 11.0.222 stable
|
||||
* Fixes bug with OSK keys set as if on a different layer from the one they are actually on (#1628)
|
||||
|
||||
## 2019-02-26 11.0.221 stable
|
||||
* Fixes bug with the Toolbar UI (#1629)
|
||||
|
||||
## 2019-02-25 11.0.220 stable
|
||||
* 11.0 Stable release
|
||||
|
||||
|
|
|
|||
|
|
@ -25,9 +25,11 @@ namespace com.keyman {
|
|||
|
||||
export abstract class OSKKey {
|
||||
spec: OSKKeySpec;
|
||||
readonly layer: string; // The layer in which the key resides (not the key spec's 'act as layer' property)
|
||||
|
||||
constructor(spec: OSKKeySpec) {
|
||||
constructor(spec: OSKKeySpec, layer: string) {
|
||||
this.spec = spec;
|
||||
this.layer = layer;
|
||||
}
|
||||
|
||||
abstract getId(): string;
|
||||
|
|
@ -139,7 +141,7 @@ namespace com.keyman {
|
|||
// Use special case lookup for modifier keys
|
||||
if(spec['sp'] == '1' || spec['sp'] == '2') {
|
||||
// Unique layer-based transformation.
|
||||
var tId=((spec['text'] == '*Tab*' && spec.layer == 'shift') ? '*TabLeft*' : spec['text']);
|
||||
var tId=((spec['text'] == '*Tab*' && this.layer == 'shift') ? '*TabLeft*' : spec['text']);
|
||||
|
||||
// Transforms our *___* special key codes into their corresponding PUA character codes for keyboard display.
|
||||
keyText=this.renameSpecialKey(tId);
|
||||
|
|
@ -207,13 +209,13 @@ namespace com.keyman {
|
|||
}
|
||||
|
||||
export class OSKBaseKey extends OSKKey {
|
||||
constructor(spec: OSKKeySpec) {
|
||||
super(spec);
|
||||
constructor(spec: OSKKeySpec, layer: string) {
|
||||
super(spec, layer);
|
||||
}
|
||||
|
||||
getId(): string {
|
||||
// Define each key element id by layer id and key id (duplicate possible for SHIFT - does it matter?)
|
||||
return this.spec.layer+'-'+this.spec.id;
|
||||
return this.layer+'-'+this.spec.id;
|
||||
}
|
||||
|
||||
// Produces a small reference label for the corresponding physical key on a US keyboard.
|
||||
|
|
@ -271,14 +273,12 @@ namespace com.keyman {
|
|||
btn.appendChild(skIcon);
|
||||
}
|
||||
|
||||
construct(layout, layerId: string, rowStyle: CSSStyleDeclaration, totalPercent: number): {element: HTMLDivElement, percent: number} {
|
||||
construct(layout, rowStyle: CSSStyleDeclaration, totalPercent: number): {element: HTMLDivElement, percent: number} {
|
||||
let util = (<KeymanBase>window['keyman']).util;
|
||||
let osk = (<KeymanBase>window['keyman']).osk;
|
||||
let spec = this.spec;
|
||||
let isDesktop = util.device.formFactor == 'desktop'
|
||||
|
||||
spec.layer = layerId;
|
||||
|
||||
let kDiv=util._CreateElement('div');
|
||||
kDiv['keyId']=spec['id'];
|
||||
kDiv.className='kmw-key-square';
|
||||
|
|
@ -365,15 +365,15 @@ namespace com.keyman {
|
|||
}
|
||||
|
||||
export class OSKSubKey extends OSKKey {
|
||||
constructor(spec: OSKKeySpec) {
|
||||
super(spec);
|
||||
constructor(spec: OSKKeySpec, layer: string) {
|
||||
super(spec, layer);
|
||||
}
|
||||
|
||||
getId(): string {
|
||||
let spec = this.spec;
|
||||
// Create (temporarily) unique ID by prefixing 'popup-' to actual key ID
|
||||
if(typeof(spec['layer']) == 'string' && spec['layer'] != '') {
|
||||
return 'popup-'+spec['layer']+'-'+spec['id'];
|
||||
if(typeof(this.layer) == 'string' && this.layer != '') {
|
||||
return 'popup-'+ this.layer +'-'+spec['id'];
|
||||
} else {
|
||||
// We only create subkeys when they're needed - the currently-active layer should be fine.
|
||||
return 'popup-' + (<KeymanBase> window['keyman']).osk.layerId + '-'+spec['id'];
|
||||
|
|
@ -1023,12 +1023,13 @@ if(!window['keyman']['initialized']) {
|
|||
osk.prependBaseKey(e);
|
||||
}
|
||||
var idx = e.id.split('-'), baseId = idx[idx.length-1];
|
||||
var baseLayer: string = idx.length > 1 ? idx[0] : 'default'; // idx.length should always be > 1, but just in case.
|
||||
|
||||
// If not, insert at start
|
||||
if(device.formFactor == 'phone' && e.subKeys[0].id != baseId) {
|
||||
var eCopy={'id':baseId,'layer':''};
|
||||
if(idx.length > 1) {
|
||||
eCopy['layer'] = idx[0];
|
||||
eCopy['layer'] = baseLayer;
|
||||
}
|
||||
for(i=0; i<e.childNodes.length; i++) {
|
||||
if(osk.hasClass(e.childNodes[i],'kmw-key-text')) {
|
||||
|
|
@ -1068,7 +1069,7 @@ if(!window['keyman']['initialized']) {
|
|||
needsTopMargin = true;
|
||||
}
|
||||
|
||||
let keyGenerator = new com.keyman.OSKSubKey(e.subKeys[i]);
|
||||
let keyGenerator = new com.keyman.OSKSubKey(e.subKeys[i], baseLayer);
|
||||
let kDiv = keyGenerator.construct(e, needsTopMargin);
|
||||
|
||||
subKeys.appendChild(kDiv);
|
||||
|
|
@ -2737,8 +2738,8 @@ if(!window['keyman']['initialized']) {
|
|||
for(j=0; j<keys.length; j++) {
|
||||
key=keys[j];
|
||||
|
||||
var keyGenerator = new com.keyman.OSKBaseKey(key);
|
||||
var keyTuple = keyGenerator.construct(layout, layer['id'], rs, totalPercent);
|
||||
var keyGenerator = new com.keyman.OSKBaseKey(key, layer['id']);
|
||||
var keyTuple = keyGenerator.construct(layout, rs, totalPercent);
|
||||
|
||||
rDiv.appendChild(keyTuple.element);
|
||||
totalPercent += keyTuple.percent;
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@ if(!window['keyman']['ui']['name']) {
|
|||
if(Keyboards[j]['RegionCode'] != i) continue; // Not this region
|
||||
|
||||
// Get JUST the language code for this section. BCP-47 codes can include more!
|
||||
var bcpSubtags: string[] = keymanweb['util'].getLanguageCodes(Keyboards[j]['LanguageCode']);
|
||||
var bcpSubtags: string[] = keymanweb['util']['getLanguageCodes'](Keyboards[j]['LanguageCode']);
|
||||
if(bcpSubtags[0] == languageCode) continue; // Same language as previous keyboard
|
||||
languageCode = bcpSubtags[0];
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ if(!window['keyman']['ui']['name']) {
|
|||
{
|
||||
if(Keyboards[j]['RegionCode'] != i) continue; // Not this region
|
||||
|
||||
var bcpSubtags: string[] = keymanweb['util'].getLanguageCodes(Keyboards[j]['LanguageCode']);
|
||||
var bcpSubtags: string[] = keymanweb['util']['getLanguageCodes'](Keyboards[j]['LanguageCode']);
|
||||
if(bcpSubtags[0] == languageCode) { // Same language as previous keyboard, so add it to that entry
|
||||
var x = ui.languages[languageCode].keyboards;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue