@@ -16,7 +16,7 @@ enum MenuBarExtraUtils {
1616
1717 /// Toggle MenuBarExtra menu/window presentation state.
1818 static func togglePresented( for ident: StatusItemIdentity ? = nil ) {
19- #if DEBUG
19+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
2020 print ( " MenuBarExtraUtils. \( #function) called for status item \( ident? . description ?? " nil " ) " )
2121 #endif
2222
@@ -25,7 +25,7 @@ enum MenuBarExtraUtils {
2525
2626 /// Set MenuBarExtra menu/window presentation state.
2727 static func setPresented( for ident: StatusItemIdentity ? = nil , state: Bool ) {
28- #if DEBUG
28+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
2929 print ( " MenuBarExtraUtils. \( #function) called for status item \( ident? . description ?? " nil " ) with state \( state) " )
3030 #endif
3131
@@ -35,7 +35,7 @@ enum MenuBarExtraUtils {
3535
3636 /// Set MenuBarExtra menu/window presentation state only when its state is reliably known.
3737 static func setKnownPresented( for ident: StatusItemIdentity ? = nil , state: Bool ) {
38- #if DEBUG
38+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
3939 print ( " MenuBarExtraUtils. \( #function) called for status item \( ident? . description ?? " nil " ) with state \( state) " )
4040 #endif
4141
@@ -111,7 +111,7 @@ extension MenuBarExtraUtils {
111111 switch ident {
112112 case . id( let menuBarExtraID) :
113113 guard let match = menuBarWindows. first ( where: { $0. menuBarExtraID == menuBarExtraID } ) else {
114- #if DEBUG
114+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
115115 print ( " MenuBarExtraUtils. \( #function) : Window could not be found for status item with ID \" \( menuBarExtraID) . " )
116116 #endif
117117
@@ -138,7 +138,7 @@ extension MenuBarExtraUtils {
138138 _ handler: @escaping ( _ change: NSKeyValueObservedChange < NSControl . StateValue > ) -> Void
139139 ) -> NSStatusItem . ButtonStateObserver ? {
140140 guard let statusItem = MenuBarExtraUtils . statusItem ( for: . index( index) ) else {
141- #if DEBUG
141+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
142142 print ( " Can't register menu bar extra state observer: Can't find status item. It may not yet exist. " )
143143 #endif
144144
@@ -147,7 +147,7 @@ extension MenuBarExtraUtils {
147147
148148 guard let observer = statusItem. stateObserverMenuBased ( handler)
149149 else {
150- #if DEBUG
150+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
151151 print ( " Can't register menu bar extra state observer: Can't generate observer. " )
152152 #endif
153153
@@ -189,7 +189,7 @@ extension MenuBarExtraUtils {
189189 index: Int
190190 ) -> NSStatusItem . ButtonStatePublisher ? {
191191 guard let statusItem = MenuBarExtraUtils . statusItem ( for: . index( index) ) else {
192- #if DEBUG
192+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
193193 print ( " Can't register menu bar extra state observer: Can't find status item. It may not yet exist. " )
194194 #endif
195195
@@ -198,7 +198,7 @@ extension MenuBarExtraUtils {
198198
199199 guard let publisher = statusItem. buttonStatePublisher ( )
200200 else {
201- #if DEBUG
201+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
202202 print ( " Can't register menu bar extra state observer: Can't generate publisher. " )
203203 #endif
204204
@@ -279,7 +279,7 @@ extension NSStatusItem {
279279 guard let behavior = button? . target, // SwiftUI.WindowMenuBarExtraBehavior <- internal
280280 let mirror = Mirror ( reflecting: behavior) . superclassMirror
281281 else {
282- #if DEBUG
282+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
283283 print ( " Could not find status item's target. " )
284284 #endif
285285
@@ -301,7 +301,7 @@ extension NSStatusItem {
301301 // however, WindowMenuBarExtraBehavior does contain an explicit `isMenuBased` Bool we can read
302302 guard let mirror = Mirror ( reflecting: behavior) . superclassMirror
303303 else {
304- #if DEBUG
304+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
305305 print ( " Could not find status item's target. " )
306306 #endif
307307
@@ -362,7 +362,7 @@ extension Mirror {
362362 return hashed
363363 }
364364
365- #if DEBUG
365+ #if MENUBAREXTRAACCESS_DEBUG_LOGGING
366366 print ( " Could not determine MenuBarExtra ID " )
367367 #endif
368368
0 commit comments