Skip to content

Commit

Permalink
[macOS] fixed a bug Preference menu cannot be opened (#349 and #354) (
Browse files Browse the repository at this point in the history
#362)

The bug is caused due to macOS Ventura changes `Preferences...` to
`Settings...` and renames `Preferences...` to `Settings...` internally.
As a result, action cannot be fired due to menu item title changes.

see https://zenn.dev/usagimaru/articles/de5012155f4916 (Japanese)
  • Loading branch information
hkrn authored Sep 9, 2023
1 parent ad15c77 commit 74706bd
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
8 changes: 8 additions & 0 deletions docs/change_log.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
.. note::
31.5.0 以前の変更履歴は :doc:`change_log_past` を参照してください

34.10.0 (2023/9/9)
******************************************

不具合修正
==========================================

* 言語設定が英語かつ macOS Ventura 以降の場合において設定が開けない

34.9.0 (2023/4/2)
******************************************

Expand Down
10 changes: 6 additions & 4 deletions emapp/resources/translations/translations.pb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

��@
��@
nanoem.gui.unimplemented$未実装のため現在利用不可
nanoem.gui.camera カメラ%
nanoem.gui.keyframe.copy コピー'
Expand Down Expand Up @@ -953,7 +953,8 @@ $nanoem.menu.accessory.enable.visible表示を有効にする(&V)+
'nanoem.menu.edit.morph.reset-all-morphs!全てのモーフをリセット[
*nanoem.menu.edit.morph.register-all-morphs-全てのモーフをキーフレーム登録.
nanoem.menu.macos.aboutnanoem について*
nanoem.menu.macos.preferences 設定...*
nanoem.menu.macos.preferences 設定...'
nanoem.menu.macos.settings 設定...*
nanoem.menu.macos.hidenanoem を隠す-
nanoem.menu.macos.hide-allほかを隠す-
nanoem.menu.macos.show-allすべて表示*
Expand Down Expand Up @@ -1181,7 +1182,7 @@ Ananoem.status.ERROR_DOCUMENT_MODEL_OUTSIDE_PARENT_STATE_NOT_FOUND3モーフの
;nanoem.status.ERROR_DOCUMENT_MODEL_OUTSIDE_PARENT_CORRUPTED-モデルの外部親が破損していますl
2nanoem.status.ERROR_DOCUMENT_SELF_SHADOW_CORRUPTED6セルフシャドウデータが破損しています�
;nanoem.status.ERROR_DOCUMENT_SELF_SHADOW_KEYFRAME_CORRUPTEDBセルフシャドウのキーフレームが破損しています
��F
��F
nanoem.gui.unimplemented*Currently Unavailable due to unimplemented
nanoem.gui.cameraCamera
nanoem.gui.keyframe.copyCopy
Expand Down Expand Up @@ -2155,7 +2156,8 @@ Fullscreen#
'nanoem.menu.edit.morph.reset-all-morphsReset All MorphsJ
*nanoem.menu.edit.morph.register-all-morphsRegister All Morph Keyframes'
nanoem.menu.macos.about About nanoem/
nanoem.menu.macos.preferencesPreferences...%
nanoem.menu.macos.preferencesPreferences...)
nanoem.menu.macos.settings Settings...%
nanoem.menu.macos.hide Hide nanoem)
nanoem.menu.macos.hide-all Hide Others&
nanoem.menu.macos.show-allShow All%
Expand Down
5 changes: 5 additions & 0 deletions emapp/resources/translations/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,11 @@
en_US: 'Preferences...'
ja_JP: '設定...'
description: ''
- key: nanoem.menu.macos.settings
phrase:
en_US: 'Settings...'
ja_JP: '設定...'
description: ''
- key: nanoem.menu.macos.hide
phrase:
en_US: 'Hide nanoem'
Expand Down
5 changes: 4 additions & 1 deletion macos/classes/CocoaApplicationMenuBuilder.mm
Original file line number Diff line number Diff line change
Expand Up @@ -461,8 +461,11 @@
[app orderFrontStandardAboutPanel:app];
}];
[m_appMenu addSeparator];
NSString *settingsTitle = NSAppKitVersionNumber > NSAppKitVersionNumber12_5
? translatedString("nanoem.menu.macos.settings")
: translatedString("nanoem.menu.macos.preferences");
NSMenuItem *preferenceMenuItem =
[m_appMenu addItemWithTitle:translatedString("nanoem.menu.macos.preferences")
[m_appMenu addItemWithTitle:settingsTitle
action:^() {
m_client->sendMenuActionMessage(kMenuItemTypeEditPreference);
}
Expand Down

0 comments on commit 74706bd

Please sign in to comment.