Skip to content

Commit

Permalink
menu: fix CFBundleName and multiple about windows (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Jan 12, 2024
1 parent 678cce7 commit 51c8bc3
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build
*.dmg
*.tar.bz2
.cache
1 change: 1 addition & 0 deletions dmg/Base.lproj
12 changes: 12 additions & 0 deletions dmg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/fcitx.icns"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/Base.lproj"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/en.lproj"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/zh-Hans.lproj"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)

install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/zh-Hant.lproj"
DESTINATION "${CMAKE_INSTALL_PREFIX}/Resources"
)
3 changes: 3 additions & 0 deletions dmg/zh-Hans.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CFBundleName = "小企鹅";
CFBundleDisplayName = "小企鹅";
org.fcitx.inputmethod.fcitx5 = "小企鹅";
3 changes: 3 additions & 0 deletions dmg/zh-Hant.lproj/InfoPlist.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CFBundleName = "小企鵝";
CFBundleDisplayName = "小企鵝";
org.fcitx.inputmethod.fcitx5 = "小企鵝";
9 changes: 7 additions & 2 deletions src/config/menu.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import Foundation
import Cocoa

extension FcitxInputController {
static var fcitxAbout: NSWindowController?

@objc func about(_: Any? = nil) {
FcitxAbout().showWindow(nil)
if FcitxInputController.fcitxAbout == nil {
FcitxInputController.fcitxAbout = FcitxAbout()
}
FcitxInputController.fcitxAbout!.showWindow(nil)
}
}

0 comments on commit 51c8bc3

Please sign in to comment.