Skip to content

Commit

Permalink
Merge pull request #3 from matsuo/add-support-for-filemaker-2024
Browse files Browse the repository at this point in the history
Add support for Claris FileMaker 2024
  • Loading branch information
harawata authored Aug 4, 2024
2 parents 26494a0 + 01e3f5f commit 18bb42b
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 63 deletions.
12 changes: 9 additions & 3 deletions FMClipboardBroker/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
let contentSelection = "contentSelection"
let autoDetect = "autoDetect"
let readLayoutIn12Format = "readLayoutIn12Format"
let readThemeIn2024Format = "readThemeIn2024Format"
let lastAltPath = "lastAltPath"
let prettyPrintXml = "prettyPrintXml"

Expand All @@ -45,7 +46,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
"dyn.ah62d4rv4gk8zuxnqgk", // layout objects v12+ (XML2)
"dyn.ah62d4rv4gk8zuxngm2", // custom functions (XMFN)
"dyn.ah62d4rv4gk8zuxn0mu", // value lists (XMVL)
"dyn.agk8u", // themes (empty)
"dyn.agk8u", // themes
"dyn.ah62d4rv4gk8zuxnyma", // themes v2024+
]
let typeLabels = [
NSLocalizedString("table", comment: "Table"),
Expand All @@ -57,6 +59,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
NSLocalizedString("customFunction", comment: "Custom Function"),
NSLocalizedString("valueList", comment: "Value List"),
NSLocalizedString("theme", comment: "Theme"),
NSLocalizedString("theme2024", comment: "Theme (v2024+)"),
]

func applicationDidFinishLaunching(_ aNotification: Notification) {
Expand Down Expand Up @@ -246,6 +249,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
idx = 0
case "Field":
idx = 1
case "Group":
idx = 2
case "Script":
idx = 2
case "Step":
Expand All @@ -255,7 +260,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
case "ValueList":
idx = 7
case "Theme":
idx = 8
idx = settings.bool(forKey: readThemeIn2024Format) ? 9 : 8
default:
showMsg(String(format: NSLocalizedString("unknownNode", comment: "Unknown node name"), (nextElem ?? "(nil)")))
}
Expand Down Expand Up @@ -286,7 +291,8 @@ class AppDelegate: NSObject, NSApplicationDelegate {
useSamePath: true,
contentSelection: 0,
autoDetect: true,
readLayoutIn12Format: true
readLayoutIn12Format: true,
readThemeIn2024Format: true
]
settings.register(defaults: defaults)
}
Expand Down
Loading

0 comments on commit 18bb42b

Please sign in to comment.