Skip to content

Commit 85d9f3a

Browse files
committed
(spotiqueue base): Rename from (spotiqueue init).
Avoid some confusion and hopefully better express what's going on.
1 parent 7284a8d commit 85d9f3a

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

Spotiqueue.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
/* Begin PBXBuildFile section */
1010
DA19341726E9A06F00BEC661 /* RBGuileBridge.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA19341626E9A06F00BEC661 /* RBGuileBridge.swift */; };
1111
DA2E89A026E9E779003BF91C /* GuileHelpers.m in Sources */ = {isa = PBXBuildFile; fileRef = DA2E899F26E9E779003BF91C /* GuileHelpers.m */; };
12-
DA2E8A1C26ED9578003BF91C /* init.scm in CopyFiles */ = {isa = PBXBuildFile; fileRef = DAE88E2F26E8AAA300125A3F /* init.scm */; };
12+
DA2E8A1C26ED9578003BF91C /* base.scm in CopyFiles */ = {isa = PBXBuildFile; fileRef = DAE88E2F26E8AAA300125A3F /* base.scm */; };
1313
DA2E8A1D26ED957A003BF91C /* records.scm in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA2E89D326EC3ADF003BF91C /* records.scm */; };
1414
DA2E8A1E26ED957D003BF91C /* keybindings.scm in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA2E89F226EC6741003BF91C /* keybindings.scm */; };
1515
DA2E8A1F26ED9580003BF91C /* key-constants.scm in CopyFiles */ = {isa = PBXBuildFile; fileRef = DA2E89FA26EC8929003BF91C /* key-constants.scm */; };
@@ -69,7 +69,7 @@
6969
dstPath = spotiqueue;
7070
dstSubfolderSpec = 7;
7171
files = (
72-
DA2E8A1C26ED9578003BF91C /* init.scm in CopyFiles */,
72+
DA2E8A1C26ED9578003BF91C /* base.scm in CopyFiles */,
7373
EC67297A277BDE8F003CF0AC /* exceptions.scm in CopyFiles */,
7474
DA2E8A1F26ED9580003BF91C /* key-constants.scm in CopyFiles */,
7575
DA2E8A1E26ED957D003BF91C /* keybindings.scm in CopyFiles */,
@@ -125,7 +125,7 @@
125125
DAE1F18926534D670013704F /* Spotiqueue.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Spotiqueue.entitlements; sourceTree = "<group>"; };
126126
DAE88E2A26E8AA6700125A3F /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; };
127127
DAE88E2C26E8AA6C00125A3F /* libffi.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libffi.tbd; path = usr/lib/libffi.tbd; sourceTree = SDKROOT; };
128-
DAE88E2F26E8AAA300125A3F /* init.scm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = init.scm; sourceTree = "<group>"; };
128+
DAE88E2F26E8AAA300125A3F /* base.scm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = base.scm; sourceTree = "<group>"; };
129129
DAFAB406265D1BE90096810C /* NSImageViewExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSImageViewExtensions.swift; sourceTree = "<group>"; };
130130
EC34C8A22664D92300786C78 /* OptionSetExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OptionSetExtensions.swift; sourceTree = "<group>"; };
131131
EC34C8B72665C17C00786C78 /* ComparableExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComparableExtensions.swift; sourceTree = "<group>"; };
@@ -164,7 +164,7 @@
164164
isa = PBXGroup;
165165
children = (
166166
EC672973277BDE17003CF0AC /* exceptions.scm */,
167-
DAE88E2F26E8AAA300125A3F /* init.scm */,
167+
DAE88E2F26E8AAA300125A3F /* base.scm */,
168168
DA2E89FA26EC8929003BF91C /* key-constants.scm */,
169169
DA2E89F226EC6741003BF91C /* keybindings.scm */,
170170
DA2E89D326EC3ADF003BF91C /* records.scm */,

Spotiqueue/Classes/RBGuileBridge.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public func track_to_scm_record(track: RBSpotifyItem) -> SCM {
5252

5353
// HMMM big TODO here. We actually shouldn't run user hooks on the Main thread, because the user may sleep(4), but we can't simply use DispatchQueue.global(qos: .userInitiated).async {}, either, since even after scm_init_guile() we aren't able to do the scm_c_lookup. Unsure how to share state!
5454

55-
let hook = scm_c_public_ref("spotiqueue init", hook_name)
55+
let hook = scm_c_public_ref("spotiqueue base", hook_name)
5656

5757
if _scm_is_true(scm_hook_p(hook)) {
5858
scm_call_2(scm_c_public_ref("spotiqueue exceptions", "spot:safe-run-hook"),
@@ -172,7 +172,7 @@ public func track_to_scm_record(track: RBSpotifyItem) -> SCM {
172172

173173
static func guile_handle_key(map: KeyMap, keycode: UInt16, control: Bool, command: Bool, alt: Bool, shift: Bool) -> Bool {
174174
let guile_key = key_to_guile_struct(keycode, control, command, alt, shift)
175-
let action: SCM = scm_hash_ref(scm_c_public_ref("spotiqueue init", map.rawValue),
175+
let action: SCM = scm_hash_ref(scm_c_public_ref("spotiqueue base", map.rawValue),
176176
guile_key,
177177
_scm_false())
178178

Spotiqueue/main.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ int main(int argc, const char * argv[]) {
5353
scm_c_define_module("spotiqueue functions", &register_functions, NULL);
5454

5555
// Note that there are DRAGONS here. We use a separate "Copy Files" Xcode build phase to put Scheme files into a "spotiqueue" subfolder inside the App bundle's Resources folder. We do this so that the module names match up. However, there doesn't seem to be an obvious way to get a direct pointer to the Resources folder, so we use this hack.
56-
scm_c_primitive_load_path("spotiqueue/init");
56+
scm_c_primitive_load_path("spotiqueue/base");
5757

5858
// This just sets up logging and stuff in the Rust library:
5959
spotiqueue_initialize_worker();

examples/paul-config.scm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#:use-module (ice-9 format)
1616
#:use-module (ice-9 popen)
1717
#:use-module (ice-9 receive)
18-
#:use-module (spotiqueue init)
18+
#:use-module (spotiqueue base)
1919
#:use-module (spotiqueue keybindings)
2020
#:use-module (spotiqueue records)
2121
#:use-module (srfi srfi-9 gnu)

guile/spotiqueue/init.scm renamed to guile/spotiqueue/base.scm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
;;; BEGIN init.scm
1+
;;; BEGIN base.scm
22
;;;
33
;;; Copyright © 2021 paul at denknerd dot org
44
;;;
@@ -11,7 +11,7 @@
1111
;; `spotiqueue'. Grr, there are already so many of those i'll just nest the Scheme files in
1212
;; guile/spotiqueue i guess. The Copy Files phase in Xcode can sort that out.
1313

14-
(define-module (spotiqueue init)
14+
(define-module (spotiqueue base)
1515
#:use-module (ice-9 format)
1616
#:use-module (spotiqueue exceptions)
1717
#:use-module (spotiqueue functions)
@@ -20,7 +20,7 @@
2020
#:declarative? #f)
2121
(module-export-all! (current-module))
2222

23-
;; What i want is, whenever someone imports (spotiqueue init), they should get whatever has been
23+
;; What i want is, whenever someone imports (spotiqueue base), they should get whatever has been
2424
;; defined in (spotiqueue functions), too. The latter is the "phantom module" created in Swift-land
2525
;; when Spotiqueue boots, exporting a few functions which are needed to sensibly be able to interact
2626
;; with the music player.
@@ -30,7 +30,7 @@
3030
;; the docstring of `module-use!`, which simply states, "Add interface [the second arg] to the front
3131
;; of the use-list of module [the first arg]. Both arguments should be module objects, and interface
3232
;; should very likely be a module returned by resolve-interface." Also, (current-module) always
33-
;; resolves to (spotiqueue init), and not whatever is importing it...
33+
;; resolves to (spotiqueue base), and not whatever is importing it...
3434

3535
(eval-when (expand load eval)
3636
(module-use! (module-public-interface (current-module))
@@ -95,4 +95,4 @@
9595

9696
(define-key global-map (kbd 'ANSI_S #:ctrl #t #:alt #t) queue:shuffle)
9797

98-
;;; END init.scm
98+
;;; END base.scm

0 commit comments

Comments
 (0)