Merge pull request #81 from nevack/nevack/preferences-warnings

Resolve all warnings in Preferences (aka General) target
CQTexperiment
Christopher Snowhill 2021-01-24 17:47:14 -08:00 committed by GitHub
commit 4a7b1099c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
71 changed files with 54 additions and 1122 deletions

View File

@ -21,7 +21,6 @@
172A123C0F5912AE0078EF0C /* ShuffleTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = 172A123B0F5912AE0078EF0C /* ShuffleTransformers.m */; };
172A12A90F59AF8A0078EF0C /* NSString+CogSort.m in Sources */ = {isa = PBXBuildFile; fileRef = 172A12A80F59AF8A0078EF0C /* NSString+CogSort.m */; };
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = 173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */; };
173A43A10F3FD26500676A7B /* ToolTipWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 173A43A00F3FD26500676A7B /* ToolTipWindow.m */; };
1745CBA50F661DBB00E513F7 /* shuffle_albums.png in Resources */ = {isa = PBXBuildFile; fileRef = 1745CBA40F661DBB00E513F7 /* shuffle_albums.png */; };
1752C36C0F59E00100F85F28 /* PlaybackButtons.m in Sources */ = {isa = PBXBuildFile; fileRef = 1752C36B0F59E00100F85F28 /* PlaybackButtons.m */; };
1755E1F90BA0D2B600CA3560 /* PlaylistLoader.m in Sources */ = {isa = PBXBuildFile; fileRef = 1755E1F70BA0D2B600CA3560 /* PlaylistLoader.m */; };
@ -55,9 +54,6 @@
17818A9B0C0B27AC001C4916 /* wv.icns in Resources */ = {isa = PBXBuildFile; fileRef = 17818A940C0B27AC001C4916 /* wv.icns */; };
1784560F0F631E24007E8021 /* FileTreeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1784560E0F631E24007E8021 /* FileTreeViewController.m */; };
178456120F631E31007E8021 /* SideViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 178456110F631E31007E8021 /* SideViewController.m */; };
178BAB990CD4E1B700B33D47 /* GCOneShotEffectTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 178BAB940CD4E1B700B33D47 /* GCOneShotEffectTimer.m */; };
178BAB9A0CD4E1B700B33D47 /* GCWindowMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 178BAB960CD4E1B700B33D47 /* GCWindowMenu.m */; };
178BAB9B0CD4E1B700B33D47 /* PopupButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 178BAB980CD4E1B700B33D47 /* PopupButton.m */; };
1791005E0CB44D6D0070BC5C /* Cog.scriptSuite in Resources */ = {isa = PBXBuildFile; fileRef = 1791005C0CB44D6D0070BC5C /* Cog.scriptSuite */; };
1791005F0CB44D6D0070BC5C /* Cog.scriptTerminology in Resources */ = {isa = PBXBuildFile; fileRef = 1791005D0CB44D6D0070BC5C /* Cog.scriptTerminology */; };
1791FF900CB43A2C0070BC5C /* MediaKeysApplication.m in Sources */ = {isa = PBXBuildFile; fileRef = 1791FF8E0CB43A2C0070BC5C /* MediaKeysApplication.m */; };
@ -109,7 +105,6 @@
17E41E070C130DFF00AC744D /* Credits.html in Resources */ = {isa = PBXBuildFile; fileRef = 17E41E060C130DFF00AC744D /* Credits.html */; };
17F3BB890CBC565900864489 /* CueSheet.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F3BB880CBC565100864489 /* CueSheet.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17F561400C3BD4F30019975C /* CogAudio.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F561330C3BD4DC0019975C /* CogAudio.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17F562390C3BD91B0019975C /* General.preferencePane in Resources */ = {isa = PBXBuildFile; fileRef = 17F5622E0C3BD8FB0019975C /* General.preferencePane */; };
17F6C8070F603701000D9DA9 /* PlaybackEventController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C8060F603701000D9DA9 /* PlaybackEventController.m */; };
17FAEBAC0F662985007C8707 /* ToolTipTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FAEBAB0F662985007C8707 /* ToolTipTextField.m */; };
5604D45B0D60349B004F5C5D /* SpotlightWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5604D4590D60349B004F5C5D /* SpotlightWindowController.m */; };
@ -207,6 +202,7 @@
8E9A30160BA792DC0091081B /* NSFileHandle+CreateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */; };
99EAACA80DD1BB7A00423C38 /* APL.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 566D321B0D538550004466A5 /* APL.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
B09E96630D74A7BC0064F138 /* stop_current.png in Resources */ = {isa = PBXBuildFile; fileRef = B09E96620D74A7BC0064F138 /* stop_current.png */; };
ED69CA3B25BE2A390090B90D /* Preferences.preferencePane in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F5622E0C3BD8FB0019975C /* Preferences.preferencePane */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
EDAAA41F25A665C000731773 /* PositionSliderToolbarItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = EDAAA41E25A665C000731773 /* PositionSliderToolbarItem.swift */; };
F6F96719102C709000D2C9B4 /* NSString+FinderCompare.m in Sources */ = {isa = PBXBuildFile; fileRef = F6F96718102C709000D2C9B4 /* NSString+FinderCompare.m */; };
/* End PBXBuildFile section */
@ -319,17 +315,17 @@
};
17F5622D0C3BD8FB0019975C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 17F562260C3BD8FB0019975C /* General.xcodeproj */;
containerPortal = 17F562260C3BD8FB0019975C /* Preferences.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8D5B49B6048680CD000E48DA;
remoteInfo = General;
remoteInfo = Preferences;
};
17F5623A0C3BD9280019975C /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 17F562260C3BD8FB0019975C /* General.xcodeproj */;
containerPortal = 17F562260C3BD8FB0019975C /* Preferences.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8D5B49AC048680CD000E48DA;
remoteInfo = General;
remoteInfo = Preferences;
};
566D321A0D538550004466A5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
@ -627,6 +623,7 @@
dstPath = "";
dstSubfolderSpec = 7;
files = (
ED69CA3B25BE2A390090B90D /* Preferences.preferencePane in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -705,8 +702,6 @@
172A12A80F59AF8A0078EF0C /* NSString+CogSort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSString+CogSort.m"; sourceTree = "<group>"; };
173855FD0E0CC81F00488CD4 /* FileTreeOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileTreeOutlineView.h; path = FileTree/FileTreeOutlineView.h; sourceTree = "<group>"; };
173855FE0E0CC81F00488CD4 /* FileTreeOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTreeOutlineView.m; path = FileTree/FileTreeOutlineView.m; sourceTree = "<group>"; };
173A439F0F3FD26500676A7B /* ToolTipWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ToolTipWindow.h; path = ToolTip/ToolTipWindow.h; sourceTree = "<group>"; };
173A43A00F3FD26500676A7B /* ToolTipWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ToolTipWindow.m; path = ToolTip/ToolTipWindow.m; sourceTree = "<group>"; };
1745CBA40F661DBB00E513F7 /* shuffle_albums.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = shuffle_albums.png; path = Images/shuffle_albums.png; sourceTree = "<group>"; };
1752C36A0F59E00100F85F28 /* PlaybackButtons.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaybackButtons.h; path = Window/PlaybackButtons.h; sourceTree = "<group>"; };
1752C36B0F59E00100F85F28 /* PlaybackButtons.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaybackButtons.m; path = Window/PlaybackButtons.m; sourceTree = "<group>"; };
@ -753,12 +748,6 @@
1784560E0F631E24007E8021 /* FileTreeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileTreeViewController.m; path = FileTree/FileTreeViewController.m; sourceTree = "<group>"; };
178456100F631E31007E8021 /* SideViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SideViewController.h; sourceTree = "<group>"; };
178456110F631E31007E8021 /* SideViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SideViewController.m; sourceTree = "<group>"; };
178BAB930CD4E1B700B33D47 /* GCOneShotEffectTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCOneShotEffectTimer.h; sourceTree = "<group>"; };
178BAB940CD4E1B700B33D47 /* GCOneShotEffectTimer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCOneShotEffectTimer.m; sourceTree = "<group>"; };
178BAB950CD4E1B700B33D47 /* GCWindowMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GCWindowMenu.h; sourceTree = "<group>"; };
178BAB960CD4E1B700B33D47 /* GCWindowMenu.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GCWindowMenu.m; sourceTree = "<group>"; };
178BAB970CD4E1B700B33D47 /* PopupButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PopupButton.h; sourceTree = "<group>"; };
178BAB980CD4E1B700B33D47 /* PopupButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PopupButton.m; sourceTree = "<group>"; };
1791005C0CB44D6D0070BC5C /* Cog.scriptSuite */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Cog.scriptSuite; sourceTree = "<group>"; };
1791005D0CB44D6D0070BC5C /* Cog.scriptTerminology */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text.xml; path = Cog.scriptTerminology; sourceTree = "<group>"; };
1791FF8D0CB43A2C0070BC5C /* MediaKeysApplication.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeysApplication.h; sourceTree = "<group>"; };
@ -840,7 +829,7 @@
17E0D61B0F520F9F005B6FED /* VolumeSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VolumeSlider.m; path = Window/VolumeSlider.m; sourceTree = "<group>"; };
17F3BB830CBC565100864489 /* CueSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CueSheet.xcodeproj; path = Plugins/CueSheet/CueSheet.xcodeproj; sourceTree = "<group>"; };
17F5612A0C3BD4DC0019975C /* CogAudio.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CogAudio.xcodeproj; path = Audio/CogAudio.xcodeproj; sourceTree = "<group>"; };
17F562260C3BD8FB0019975C /* General.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = General.xcodeproj; path = Preferences/General/General.xcodeproj; sourceTree = "<group>"; };
17F562260C3BD8FB0019975C /* Preferences.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Preferences.xcodeproj; path = Preferences/Preferences/Preferences.xcodeproj; sourceTree = "<group>"; };
17F6C8050F603701000D9DA9 /* PlaybackEventController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaybackEventController.h; sourceTree = "<group>"; };
17F6C8060F603701000D9DA9 /* PlaybackEventController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaybackEventController.m; sourceTree = "<group>"; };
17FAEBAA0F662985007C8707 /* ToolTipTextField.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ToolTipTextField.h; sourceTree = "<group>"; };
@ -1062,15 +1051,6 @@
name = "Other Frameworks";
sourceTree = "<group>";
};
173A439D0F3FD25500676A7B /* ToolTip */ = {
isa = PBXGroup;
children = (
173A439F0F3FD26500676A7B /* ToolTipWindow.h */,
173A43A00F3FD26500676A7B /* ToolTipWindow.m */,
);
name = ToolTip;
sourceTree = "<group>";
};
1766C68D0B911DF1004A7AE4 /* AudioScrobbler */ = {
isa = PBXGroup;
children = (
@ -1103,8 +1083,6 @@
isa = PBXGroup;
children = (
83790D4A1809F4980073CF51 /* SPMediaKeyTap */,
173A439D0F3FD25500676A7B /* ToolTip */,
178BAB920CD4E1B700B33D47 /* GCWindowMenu */,
177EBF850B8BC2A70000BC8C /* ImageTextCell */,
179790DD0C087AB7001D6996 /* OpenURLPanel */,
);
@ -1200,19 +1178,6 @@
name = Images;
sourceTree = "<group>";
};
178BAB920CD4E1B700B33D47 /* GCWindowMenu */ = {
isa = PBXGroup;
children = (
178BAB930CD4E1B700B33D47 /* GCOneShotEffectTimer.h */,
178BAB940CD4E1B700B33D47 /* GCOneShotEffectTimer.m */,
178BAB950CD4E1B700B33D47 /* GCWindowMenu.h */,
178BAB960CD4E1B700B33D47 /* GCWindowMenu.m */,
178BAB970CD4E1B700B33D47 /* PopupButton.h */,
178BAB980CD4E1B700B33D47 /* PopupButton.m */,
);
path = GCWindowMenu;
sourceTree = "<group>";
};
179790DD0C087AB7001D6996 /* OpenURLPanel */ = {
isa = PBXGroup;
children = (
@ -1416,7 +1381,7 @@
17F562270C3BD8FB0019975C /* Products */ = {
isa = PBXGroup;
children = (
17F5622E0C3BD8FB0019975C /* General.preferencePane */,
17F5622E0C3BD8FB0019975C /* Preferences.preferencePane */,
);
name = Products;
sourceTree = "<group>";
@ -1708,7 +1673,7 @@
8E07AD280AAC9BE600A4B32F /* Preference Panes */ = {
isa = PBXGroup;
children = (
17F562260C3BD8FB0019975C /* General.xcodeproj */,
17F562260C3BD8FB0019975C /* Preferences.xcodeproj */,
);
name = "Preference Panes";
sourceTree = "<group>";
@ -1915,10 +1880,6 @@
ProductGroup = 8303A30220E4E3D000951EF8 /* Products */;
ProjectRef = 17C8087A0C3BD173005707C4 /* Flac.xcodeproj */;
},
{
ProductGroup = 17F562270C3BD8FB0019975C /* Products */;
ProjectRef = 17F562260C3BD8FB0019975C /* General.xcodeproj */;
},
{
ProductGroup = 17C8F3C90CBED663008D969D /* Products */;
ProjectRef = 17C8F3C80CBED663008D969D /* GME.xcodeproj */;
@ -1963,6 +1924,10 @@
ProductGroup = 8E8D41C30CBB0DA000135C1B /* Products */;
ProjectRef = 8E8D41C20CBB0DA000135C1B /* Pls.xcodeproj */;
},
{
ProductGroup = 17F562270C3BD8FB0019975C /* Products */;
ProjectRef = 17F562260C3BD8FB0019975C /* Preferences.xcodeproj */;
},
{
ProductGroup = 83CA5AFA20E4E394003E463A /* Products */;
ProjectRef = 17C808A70C3BD1BA005707C4 /* Shorten.xcodeproj */;
@ -2053,10 +2018,10 @@
remoteRef = 17F561320C3BD4DC0019975C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
17F5622E0C3BD8FB0019975C /* General.preferencePane */ = {
17F5622E0C3BD8FB0019975C /* Preferences.preferencePane */ = {
isa = PBXReferenceProxy;
fileType = wrapper.cfbundle;
path = General.preferencePane;
path = Preferences.preferencePane;
remoteRef = 17F5622D0C3BD8FB0019975C /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
@ -2221,7 +2186,6 @@
83BC5AC120E4CE8700631CD4 /* OpenURLPanel.xib in Resources */,
83BC5AC020E4CE7D00631CD4 /* MainMenu.xib in Resources */,
83BC5ABF20E4CE7A00631CD4 /* InfoInspector.xib in Resources */,
17F562390C3BD91B0019975C /* General.preferencePane in Resources */,
8384915B18083EAB00E7332D /* navigatorTemplate.pdf in Resources */,
832C1253180BD1E2005507C1 /* Cog.help in Resources */,
8384916218083EAB00E7332D /* randomizeTemplate.pdf in Resources */,
@ -2347,9 +2311,6 @@
83790D501809F4980073CF51 /* NSObject+SPInvocationGrabbing.m in Sources */,
1791FF900CB43A2C0070BC5C /* MediaKeysApplication.m in Sources */,
838491211807F38A00E7332D /* NowPlayingBarView.m in Sources */,
178BAB990CD4E1B700B33D47 /* GCOneShotEffectTimer.m in Sources */,
178BAB9A0CD4E1B700B33D47 /* GCWindowMenu.m in Sources */,
178BAB9B0CD4E1B700B33D47 /* PopupButton.m in Sources */,
5604D45B0D60349B004F5C5D /* SpotlightWindowController.m in Sources */,
5604D4F60D60726E004F5C5D /* SpotlightPlaylistEntry.m in Sources */,
56462EAF0D6341F6000AB68C /* SpotlightTransformers.m in Sources */,
@ -2373,7 +2334,6 @@
179D03280E0CB2500064A77A /* SmartFolderNode.m in Sources */,
173855FF0E0CC81F00488CD4 /* FileTreeOutlineView.m in Sources */,
07D971E60ED1DAA800E7602E /* TagEditorController.m in Sources */,
173A43A10F3FD26500676A7B /* ToolTipWindow.m in Sources */,
838491231807F38A00E7332D /* NowPlayingBarController.m in Sources */,
17E0D5EA0F520F02005B6FED /* MainWindow.m in Sources */,
836D28A818086386005B7299 /* MiniModeMenuTitleTransformer.m in Sources */,
@ -2451,7 +2411,7 @@
};
17F5623B0C3BD9280019975C /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = General;
name = Preferences;
targetProxy = 17F5623A0C3BD9280019975C /* PBXContainerItemProxy */;
};
834D793020E4EFCC00C4A5CC /* PBXTargetDependency */ = {

View File

@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -9,7 +8,6 @@
<customObject id="-2" userLabel="File's Owner" customClass="GeneralPreferencesPlugin">
<connections>
<outlet property="appearanceView" destination="CgN-sy-RmM" id="wvB-aW-Gfx"/>
<outlet property="growlView" destination="U4w-jw-ca5" id="IUJ-gB-jwT"/>
<outlet property="hotKeyPane" destination="6" id="14"/>
<outlet property="iTunesStyleCheck" destination="AIz-WH-Wqk" id="2n1-pY-cZR"/>
<outlet property="midiPane" destination="i5B-ga-Atm" id="rbe-uK-5n2"/>

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.3 KiB

View File

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

View File

@ -35,7 +35,7 @@
if ( oldPath != nil )
[panel setDirectoryURL:[NSURL fileURLWithPath:oldPath]];
NSInteger result = [panel runModal];
if(result == NSOKButton)
if(result == NSModalResponseOK)
{
[[NSUserDefaults standardUserDefaults] setValue:[[panel URL] path] forKey:@"soundFontPath"];
}

View File

@ -2,8 +2,6 @@
#import <Cocoa/Cocoa.h>
#import <CoreAudio/AudioHardware.h>
@interface OutputsArrayController : NSArrayController
{
}

View File

@ -1,5 +1,7 @@
#import "OutputsArrayController.h"
#import <CoreAudio/AudioHardware.h>
@implementation OutputsArrayController
- (void)awakeFromNib

View File

@ -94,7 +94,7 @@
17C7E5AF0DCCC30A003CBCF7 /* playlist.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = playlist.png; path = Icons/playlist.png; sourceTree = "<group>"; };
17D1B3F60F6349CE00694C57 /* PreferencePanePlugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreferencePanePlugin.h; path = ../PreferencePanePlugin.h; sourceTree = SOURCE_ROOT; };
17E78A7D0D68BE3C005C5A59 /* file_tree.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = file_tree.png; path = Icons/file_tree.png; sourceTree = "<group>"; };
32DBCF630370AF2F00C91783 /* General_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = General_Prefix.pch; sourceTree = "<group>"; };
32DBCF630370AF2F00C91783 /* Preferences_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Preferences_Prefix.pch; sourceTree = "<group>"; };
3DFAC48E235B6B8100A29416 /* DEVELOPMENT_TEAM.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DEVELOPMENT_TEAM.xcconfig; sourceTree = "<group>"; };
3DFAC48F235B6B8100A29416 /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = "<group>"; };
833F681B1CDBCAA700AFB9F0 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
@ -129,7 +129,7 @@
83F27E6A1810DD3A00CEF538 /* updates@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "updates@2x.png"; path = "Icons/updates@2x.png"; sourceTree = "<group>"; };
83F27E721810E45D00CEF538 /* PathToFileTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PathToFileTransformer.h; sourceTree = "<group>"; };
83F27E731810E45D00CEF538 /* PathToFileTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PathToFileTransformer.m; sourceTree = "<group>"; };
8D5B49B6048680CD000E48DA /* General.preferencePane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = General.preferencePane; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B6048680CD000E48DA /* Preferences.preferencePane */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Preferences.preferencePane; sourceTree = BUILT_PRODUCTS_DIR; };
8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8E07AA800AAC8EA200A4B32F /* HotKeyPane.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HotKeyPane.h; sourceTree = "<group>"; };
8E07AA810AAC8EA200A4B32F /* HotKeyPane.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = HotKeyPane.m; sourceTree = "<group>"; };
@ -160,7 +160,7 @@
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
089C166AFE841209C02AAC07 /* General */ = {
089C166AFE841209C02AAC07 /* Preferences */ = {
isa = PBXGroup;
children = (
08FB77AFFE84173DC02AAC07 /* Classes */,
@ -170,7 +170,7 @@
3DFAC48D235B6B8100A29416 /* Xcode-config */,
19C28FB8FE9D52D311CA2CBB /* Products */,
);
name = General;
name = Preferences;
sourceTree = "<group>";
};
089C1671FE841209C02AAC07 /* Frameworks and Libraries */ = {
@ -269,7 +269,7 @@
19C28FB8FE9D52D311CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D5B49B6048680CD000E48DA /* General.preferencePane */,
8D5B49B6048680CD000E48DA /* Preferences.preferencePane */,
);
name = Products;
sourceTree = "<group>";
@ -277,7 +277,7 @@
32C88E010371C26100C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
32DBCF630370AF2F00C91783 /* General_Prefix.pch */,
32DBCF630370AF2F00C91783 /* Preferences_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
@ -337,9 +337,9 @@
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D5B49AC048680CD000E48DA /* General */ = {
8D5B49AC048680CD000E48DA /* Preferences */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "General" */;
buildConfigurationList = 1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Preferences" */;
buildPhases = (
8D5B49AF048680CD000E48DA /* Resources */,
8D5B49B1048680CD000E48DA /* Sources */,
@ -351,10 +351,10 @@
dependencies = (
8384918A1808594800E7332D /* PBXTargetDependency */,
);
name = General;
name = Preferences;
productInstallPath = "$(HOME)/Library/Bundles";
productName = General;
productReference = 8D5B49B6048680CD000E48DA /* General.preferencePane */;
productName = Preferences;
productReference = 8D5B49B6048680CD000E48DA /* Preferences.preferencePane */;
productType = "com.apple.product-type.bundle";
};
/* End PBXNativeTarget section */
@ -363,7 +363,7 @@
089C1669FE841209C02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1130;
LastUpgradeCheck = 1230;
TargetAttributes = {
8D5B49AC048680CD000E48DA = {
DevelopmentTeam = "";
@ -371,7 +371,7 @@
};
};
};
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "General" */;
buildConfigurationList = 1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Preferences" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 1;
@ -387,7 +387,7 @@
sv,
he,
);
mainGroup = 089C166AFE841209C02AAC07 /* General */;
mainGroup = 089C166AFE841209C02AAC07 /* Preferences */;
projectDirPath = "";
projectReferences = (
{
@ -397,7 +397,7 @@
);
projectRoot = "";
targets = (
8D5B49AC048680CD000E48DA /* General */,
8D5B49AC048680CD000E48DA /* Preferences */,
);
};
/* End PBXProject section */
@ -517,11 +517,11 @@
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = General_Prefix.pch;
GCC_PREFIX_HEADER = Preferences_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cog.preferences;
PRODUCT_NAME = General;
PRODUCT_NAME = Preferences;
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = preferencePane;
@ -537,11 +537,11 @@
COMBINE_HIDPI_IMAGES = YES;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = General_Prefix.pch;
GCC_PREFIX_HEADER = Preferences_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cog.preferences;
PRODUCT_NAME = General;
PRODUCT_NAME = Preferences;
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
WRAPPER_EXTENSION = preferencePane;
@ -567,6 +567,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -613,6 +614,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@ -640,7 +642,7 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "General" */ = {
1DEB913A08733D840010E9CD /* Build configuration list for PBXNativeTarget "Preferences" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB913B08733D840010E9CD /* Debug */,
@ -649,7 +651,7 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "General" */ = {
1DEB913E08733D840010E9CD /* Build configuration list for PBXProject "Preferences" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB913F08733D840010E9CD /* Debug */,

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1150"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -15,9 +15,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D5B49AC048680CD000E48DA"
BuildableName = "General.preferencePane"
BlueprintName = "General"
ReferencedContainer = "container:General.xcodeproj">
BuildableName = "Preferences.preferencePane"
BlueprintName = "Preferences"
ReferencedContainer = "container:Preferences.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
@ -44,9 +44,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D5B49AC048680CD000E48DA"
BuildableName = "General.preferencePane"
BlueprintName = "General"
ReferencedContainer = "container:General.xcodeproj">
BuildableName = "Preferences.preferencePane"
BlueprintName = "Preferences"
ReferencedContainer = "container:Preferences.xcodeproj">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
@ -60,9 +60,9 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8D5B49AC048680CD000E48DA"
BuildableName = "General.preferencePane"
BlueprintName = "General"
ReferencedContainer = "container:General.xcodeproj">
BuildableName = "Preferences.preferencePane"
BlueprintName = "Preferences"
ReferencedContainer = "container:Preferences.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>

View File

@ -3,5 +3,6 @@
//
#ifdef __OBJC__
#import <AssertMacros.h>
#import <Cocoa/Cocoa.h>
#endif

View File

@ -16,7 +16,7 @@
{
if (nil == window) {
// Determine path to the sample preference panes
NSString *pluginPath = [[NSBundle mainBundle] pathForResource:@"General" ofType:@"preferencePane"];
NSString *pluginPath = [[NSBundle mainBundle] pathForResource:@"Preferences" ofType:@"preferencePane"];
NSBundle *bundle = [NSBundle bundleWithPath:pluginPath];
PreferencePluginController *pluginController = [[PreferencePluginController alloc] initWithPlugins:@[bundle]];

View File

@ -1,53 +0,0 @@
///**********************************************************************************************************************************
/// GCOneShotEffectTimer.h
/// GCDrawKit
///
/// Created by graham on 24/04/2007.
/// Released under the Creative Commons license 2007 Apptree.net.
///
///
/// This work is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
/// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to
/// Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
///
///**********************************************************************************************************************************
#import <Cocoa/Cocoa.h>
@interface GCOneShotEffectTimer : NSObject
{
NSTimer* _timer;
NSTimeInterval _start;
NSTimeInterval _total;
id _delegate;
}
+ (id) oneShotWithTime:(NSTimeInterval) t forDelegate:(id) del;
@end
@interface NSObject (OneShotDelegate)
- (void) oneShotHasReached:(float) relpos;
- (void) oneShotHasReachedInverse:(float) relpos;
- (void) oneShotComplete;
@end
/* This class wraps up a very simple piece of timer functionality. It sets up a timer that will call the
delegate frequently with a value from 0..1. Once 1 is reached, it stops.
This is useful for one-shot type animations such as fading out a window or similar.
The inverse method is called with interval 1..0.
The timer starts as soon as it is created.
The timer attempts to maintain a 30fps rate, and is capped at this value. On slower systems, it will drop
frames as needed.
*/

View File

@ -1,104 +0,0 @@
///**********************************************************************************************************************************
/// GCOneShotEffectTimer.m
/// GCDrawKit
///
/// Created by graham on 24/04/2007.
/// Released under the Creative Commons license 2007 Apptree.net.
///
///
/// This work is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
/// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to
/// Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
///
///**********************************************************************************************************************************
#import "GCOneShotEffectTimer.h"
#import "Logging.h"
@interface GCOneShotEffectTimer (Private)
- (id) initWithTimeInterval:(NSTimeInterval) t forDelegate:(id) del;
- (void) setDelegate:(id) del;
- (id) delegate;
- (void) osfx_callback:(NSTimer*) timer;
@end
@implementation GCOneShotEffectTimer
+ (id) oneShotWithTime:(NSTimeInterval) t forDelegate:(id) del
{
GCOneShotEffectTimer* ft = [[GCOneShotEffectTimer alloc] initWithTimeInterval:t forDelegate:del];
// unlike the usual case, this is returned retained (by self, effectively). The one-shot releases
// itself when it's complete
return ft;
}
- (id) initWithTimeInterval:(NSTimeInterval) t forDelegate:(id) del
{
if ((self = [super init]))
{
[self setDelegate:del];
_total = t;
_timer = [NSTimer scheduledTimerWithTimeInterval:1/60.0f target:self selector:@selector(osfx_callback:) userInfo:nil repeats:YES];
_start = [NSDate timeIntervalSinceReferenceDate];
}
return self;
}
- (void) dealloc
{
[_timer invalidate];
}
- (void) setDelegate:(id) del
{
// delegate is retained and released when one-shot completes. This allows some effects to work even
// though the original delegate might be released by the caller.
_delegate = del;
}
- (id) delegate
{
return _delegate;
}
- (void) osfx_callback:(NSTimer*) timer
{
NSTimeInterval elapsed = [NSDate timeIntervalSinceReferenceDate] - _start;
float val = elapsed / _total;
//DLog(@"t = %f", val );
if ( elapsed > _total )
{
[timer invalidate];
_timer = nil;
if ( _delegate && [_delegate respondsToSelector:@selector(oneShotComplete)])
[_delegate oneShotComplete];
}
else
{
if ( _delegate && [_delegate respondsToSelector:@selector(oneShotHasReached:)])
[_delegate oneShotHasReached:val];
if ( _delegate && [_delegate respondsToSelector:@selector(oneShotHasReachedInverse:)])
[_delegate oneShotHasReachedInverse:1.0 - val];
}
}
@end

View File

@ -1,44 +0,0 @@
///**********************************************************************************************************************************
/// GCWindowMenu.h
/// GCDrawKitUI
///
/// Created by graham on 27/03/07.
/// Released under the Creative Commons license 2006 Apptree.net.
///
///
/// This work is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
/// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to
/// Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
///
///**********************************************************************************************************************************
#import <Cocoa/Cocoa.h>
@interface GCWindowMenu : NSWindow
{
NSView* _mainView;
BOOL _passFirstClick;
BOOL _oneShotTracking;
}
+ (GCWindowMenu*) windowMenu;
+ (GCWindowMenu*) windowMenuWithContentView:(NSView*) view;
- (void) popUpAtPoint:(NSPoint) p withEvent:(NSEvent*) event;
- (void) popUpWithEvent:(NSEvent*) event;
- (void) setMainView:(NSView*) aView sizeToFit:(BOOL) stf;
- (NSView*) mainView;
- (void) setMainViewWantsFirstClick:(BOOL) firstClick;
- (void) setShouldCloseWhenViewTrackingReturns:(BOOL) cmup;
@end
@interface NSEvent (GCAdditions)
- (BOOL) isMouseEventType;
@end

View File

@ -1,615 +0,0 @@
///**********************************************************************************************************************************
/// GCWindowMenu.m
/// GCDrawKitUI
///
/// Created by graham on 27/03/07.
/// Released under the Creative Commons license 2006 Apptree.net.
///
///
/// This work is licensed under the Creative Commons Attribution-ShareAlike 2.5 License.
/// To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/2.5/ or send a letter to
/// Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.
///
///**********************************************************************************************************************************
#import "GCWindowMenu.h"
#import "GCOneShotEffectTimer.h"
#import "Logging.h"
@interface GCWindowMenu (Private)
+ (void) popUpWindowMenu:(GCWindowMenu*) menu withEvent:(NSEvent*) event;
+ (void) popUpWindowMenu:(GCWindowMenu*) menu atPoint:(NSPoint) loc withEvent:(NSEvent*) event;
- (void) trackWithEvent:(NSEvent*) event;
- (NSEvent*) transmogrify:(NSEvent*) event;
@end
#define kGCDefaultWindowMenuSize (NSMakeRect(0, 0, 100, 28 ))
#define kGCMenuContentInset 2
@implementation GCWindowMenu
///*********************************************************************************************************************
///
/// method: popUpWindowMenu:withEvent:forView:
/// scope: private class method
/// overrides:
/// description: pops up a custom popup menu, tracks it, then hides it again with a fadeout
///
/// parameters: <menu> the custom popup window to display
/// <event> the event to start the display with (usually from a mouse down)
/// result: none
///
/// notes: the menu is positioned with its top, left point just to the left of, and slightly below, the
/// point given in the event
///
///********************************************************************************************************************
+ (void) popUpWindowMenu:(GCWindowMenu*) menu withEvent:(NSEvent*) event
{
NSPoint loc = [event locationInWindow];
loc.x -= 10;
loc.y -= 5;
[self popUpWindowMenu:menu atPoint:loc withEvent:event];
}
///*********************************************************************************************************************
///
/// method: popUpWindowMenu:atPoint:withEvent:forView:
/// scope: private class method
/// overrides:
/// description: pops up a custom popup menu, tracks it, then hides it again with a fadeout
///
/// parameters: <menu> the custom popup window to display
/// <loc> the location within the window at which to display the menu (top, left of menu)
/// <event> the event to start the display with (usually from a mouse down)
/// result: none
///
/// notes:
///
///********************************************************************************************************************
+ (void) popUpWindowMenu:(GCWindowMenu*) menu atPoint:(NSPoint) loc withEvent:(NSEvent*) event
{
if ( menu == nil )
menu = [GCWindowMenu windowMenu];
NSRect rect = NSMakeRect(loc.x, loc.y, 0.0, 0.0);
rect = [[event window] convertRectToScreen:rect];
loc = NSMakePoint(rect.origin.x, rect.origin.y);
[menu setFrameTopLeftPoint:loc];
[[event window] addChildWindow:menu ordered:NSWindowAbove];
// show the "menu"
[menu orderFront:self];
// track the menu (keeps control in its own event loop):
[menu trackWithEvent:event];
// all done, tear down - remove with a fade effect
[GCOneShotEffectTimer oneShotWithTime:0.15 forDelegate:menu];
}
///*********************************************************************************************************************
///
/// method: windowMenu
/// scope: public class method
/// overrides:
/// description: makes a window menu that can be popped up using the above methods.
///
/// parameters: none
/// result: a new poppable window menu
///
/// notes: this method just makes an empy window with the default size. It's up to you to add some useful
/// content before displaying it
///
///********************************************************************************************************************
+ (GCWindowMenu*) windowMenu
{
GCWindowMenu* fi = [[GCWindowMenu alloc] initWithContentRect:NSZeroRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:YES];
// note - because windows are all sent a -close message at quit time, set it
// not to be released at that time, otherwise the release from the autorelease pool
// will cause a crash due to the stale reference
[fi setReleasedWhenClosed:NO]; // **** important!! ****
return fi;
}
///*********************************************************************************************************************
///
/// method: windowMenuWithContentView:
/// scope: public class method
/// overrides:
/// description: makes a window menu that can be popped up using the above methods.
///
/// parameters: <view> the view to display within the menu
/// result: a new poppable window menu containing the given view
///
/// notes: the window is sized to fit the frame of the view you pass.
///
///********************************************************************************************************************
+ (GCWindowMenu*) windowMenuWithContentView:(NSView*) view
{
GCWindowMenu* menu = [self windowMenu];
[menu setMainView:view sizeToFit:YES];
return menu;
}
///*********************************************************************************************************************
///
/// method: popUpAtPoint:withEvent:forView:
/// scope: public instance method
/// overrides:
/// description: pops up a custom popup menu, tracks it, then hides it again with a fadeout
///
/// parameters: <p> the location within the window at which to display the menu (top, left of menu)
/// <event> the event to start the display with (usually from a mouse down in some view)
/// result: none
///
/// notes:
///
///********************************************************************************************************************
- (void) popUpAtPoint:(NSPoint) p withEvent:(NSEvent*) event
{
[[self class] popUpWindowMenu:self atPoint:p withEvent:event];
}
///*********************************************************************************************************************
///
/// method: popUpWithEvent:forView:
/// scope: public instance method
/// overrides:
/// description: pops up a custom popup menu, tracks it, then hides it again with a fadeout
///
/// parameters: <event> the event to start the display with (usually from a mouse down in some view)
/// result: none
///
/// notes:
///
///********************************************************************************************************************
- (void) popUpWithEvent:(NSEvent*) event
{
[[self class] popUpWindowMenu:self withEvent:event];
}
///*********************************************************************************************************************
///
/// method: initWithContentRect:styleMask:backing:defer:
/// scope: public instance method
/// overrides: NSWindow
/// description: designated initializer.
///
/// parameters: <> see NSWindow
/// result: the window
///
/// notes:
///
///********************************************************************************************************************
- (id) initWithContentRect:(NSRect) contentRect
styleMask:(NSWindowStyleMask) styleMask
backing:(NSBackingStoreType) bufferingType
defer:(BOOL) deferCreation
{
if ((self = [super initWithContentRect:contentRect
styleMask:styleMask
backing:bufferingType
defer:deferCreation]) != nil )
{
[self setLevel:NSPopUpMenuWindowLevel];
[self setHasShadow:YES];
[self setAlphaValue:0.95];
[self setReleasedWhenClosed:YES];
[self setFrame:kGCDefaultWindowMenuSize display:NO];
_mainView = nil;
_passFirstClick = YES;
_oneShotTracking = YES;
}
return self;
}
///*********************************************************************************************************************
///
/// method: trackWithEvent:
/// scope: public instance method
/// overrides:
/// description: track the mouse in the menu
///
/// parameters: <event> the initial starting event (will usually be a mouse down)
/// result: none
///
/// notes: tracking calls the main view's usual mouseDown/dragged/up methods, and tries to do so as compatibly
/// as possible with the usual view behaviours.
///
///********************************************************************************************************************
- (void) trackWithEvent:(NSEvent*) event
{
// tracks the "menu" by keeping control until a mouse up (or down, if menu 'clicked' into being)
DLog(@"starting tracking; initial event = %@", event);
// [NSEvent startPeriodicEventsAfterDelay:1.0 withPeriod:0.1];
NSTimeInterval startTime = [event timestamp];
[self setAcceptsMouseMovedEvents:YES];
if ( _passFirstClick )
{
[[self mainView] mouseDown:[self transmogrify:event]];
// the view may have trapped the mouse down and implemented its own tracking.
// Standard NSControls do that for example. In that case we don't want to track
// ourselves, so need to detect that and abort.
if ([[self currentEvent] timestamp] - startTime > 0.25 )
return;
}
NSEvent* theEvent;
BOOL keepOn = YES;
unsigned int mask;
BOOL invertedTracking = NO;
mask = NSLeftMouseUpMask | NSLeftMouseDraggedMask |
NSRightMouseUpMask | NSRightMouseDraggedMask |
NSAppKitDefinedMask | NSFlagsChangedMask |
NSScrollWheelMask | NSPeriodicMask;
while (keepOn)
{
theEvent = [self transmogrify:[self nextEventMatchingMask:mask]];
switch ([theEvent type])
{
case NSMouseMoved:
[[self mainView] mouseMoved:theEvent];
break;
case NSRightMouseDragged:
case NSLeftMouseDragged:
[[self mainView] mouseDragged:theEvent];
break;
case NSRightMouseUp:
case NSLeftMouseUp:
// if this is within a very short time of the mousedown, leave the menu up but track it
// using mouse moved and mouse down to end.
if ([theEvent timestamp] - startTime < 0.25 || !_passFirstClick )
{
invertedTracking = YES;
mask |= ( NSLeftMouseDownMask | NSRightMouseDownMask | NSMouseMovedMask );
}
else
{
[[self mainView] mouseUp:theEvent];
keepOn = NO;
}
break;
case NSRightMouseDown:
case NSLeftMouseDown:
if ( ! NSPointInRect([theEvent locationInWindow], [[self mainView] frame]))
keepOn = NO;
else
{
[[self mainView] mouseDown:theEvent];
if ( _oneShotTracking )
keepOn = NO;
}
break;
case NSPeriodic:
break;
case NSFlagsChanged:
[[self mainView] flagsChanged:theEvent];
break;
case NSAppKitDefined:
if([theEvent subtype] == NSApplicationDeactivatedEventType )
keepOn = NO;
break;
case NSScrollWheel:
[[self mainView] scrollWheel:theEvent];
break;
default:
/* Ignore any other kind of event. */
break;
}
}
[self discardEventsMatchingMask:NSAnyEventMask beforeEvent:theEvent];
//[NSEvent stopPeriodicEvents];
DLog(@"tracking ended");
}
///*********************************************************************************************************************
///
/// method: transmogrify:
/// scope: private instance method
/// overrides:
/// description: convert the event to the local window if necessary
///
/// parameters: <event> an event
/// result: the same event, or a modified version
///
/// notes: ensures that events received while tracking are always targetted at the right window
///
///********************************************************************************************************************
- (NSEvent*) transmogrify:(NSEvent*) event
{
if(([event window] != self) && [event isMouseEventType])
{
NSPoint pt = [event locationInWindow];
NSRect rect = NSMakeRect(pt.x, pt.y, 0.0, 0.0);
rect = [[event window] convertRectToScreen:rect];
NSPoint glob = NSMakePoint(rect.origin.x, rect.origin.y);
rect = NSMakeRect(glob.x, glob.y, 0.0, 0.0);
rect = [self convertRectFromScreen:rect];
pt = NSMakePoint(rect.origin.x, rect.origin.y);
return [NSEvent mouseEventWithType: [event type]
location: pt
modifierFlags: [event modifierFlags]
timestamp: [event timestamp]
windowNumber: [self windowNumber]
context: [event context]
eventNumber: [event eventNumber]
clickCount: [event clickCount]
pressure: [event pressure]];
}
else
return event;
}
///*********************************************************************************************************************
///
/// method: canBecomeMainWindow
/// scope: public instance method
/// overrides: NSWindow
/// description:
///
/// parameters: none
/// result: return YES
///
/// notes:
///
///********************************************************************************************************************
- (BOOL) canBecomeMainWindow
{
return NO;
}
///*********************************************************************************************************************
///
/// method: setMainView:sizeToFit:
/// scope: public instance method
/// overrides:
/// description: sets the pop-up window's content to the given view, and optionally sizes the window to fit
///
/// parameters: <aView> any view already created to be displayed in the menu
/// <stf> if YES, window is sized to the view's frame. If NO, the window size is not changed
/// result: none
///
/// notes: main view is additionally retained so outlet from NIB may be directly passed in
///
///********************************************************************************************************************
- (void) setMainView:(NSView*) aView sizeToFit:(BOOL) stf
{
_mainView = aView;
// add as a subview which retains it as well
[[self contentView] addSubview:aView];
// if stf, position the view at top, left corner of the window and
// make the window the size of the view
if ( stf )
{
NSRect fr = [self frameRectForContentRect:NSInsetRect( [aView frame], -kGCMenuContentInset, -kGCMenuContentInset )];
fr.origin = NSZeroPoint;
[aView setFrameOrigin:NSMakePoint( kGCMenuContentInset, kGCMenuContentInset )];
[self setFrame:fr display:YES];
}
[_mainView setNeedsDisplay:YES];
// if the view added is an NSControl, set first click to NO by default
if ([aView isKindOfClass:[NSControl class]])
[self setMainViewWantsFirstClick:NO];
}
///*********************************************************************************************************************
///
/// method: mainView
/// scope: public instance method
/// overrides:
/// description: get the main view
///
/// parameters: none
/// result: the main view
///
/// notes:
///
///********************************************************************************************************************
- (NSView*) mainView
{
return _mainView;
}
///*********************************************************************************************************************
///
/// method: setMainViewWantsFirstClick:
/// scope: public instance method
/// overrides:
/// description: sets whether the main view should receive a mouse down on entry to the tracking loop
///
/// parameters: <firstClick> YES to get the first click
/// result: none
///
/// notes: normally should be YES (the default). However views such as NSControl derivatives that implement
/// their own tracking should set NO. If NO, the popup can only be operated by clicking to open, then
/// clicking and dragging within - the continuous click to open, drag through and release operation
/// wont work because the control doesn't get a mouse down to start with.
///
///********************************************************************************************************************
- (void) setMainViewWantsFirstClick:(BOOL) firstClick
{
_passFirstClick = firstClick;
}
///*********************************************************************************************************************
///
/// method: setShouldCloseWhenViewTrackingReturns:
/// scope: public instance method
/// overrides:
/// description: sets whether popup should close or remain visible after main view completes its own tracking
///
/// parameters: <cmup> YES close on return from view tracking, NO to remain visble
/// result: none
///
/// notes: this affects tracking with views that implement their own tracking, such as NSControl. If YES, you
/// get one shot at the control - after operating it, it will be hidden. If NO, the control may be
/// changed as often as you want but you must manually click outside the menu to close it.
///
///********************************************************************************************************************
- (void) setShouldCloseWhenViewTrackingReturns:(BOOL) cmup
{
_oneShotTracking = cmup;
}
///*********************************************************************************************************************
///
/// method: oneShotHasReachedInverse:
/// scope: public instance method
/// overrides: NSObject (OneShotDelegate)
/// description: callback from fade out effect
///
/// parameters: <relpos> goes from 1..0
/// result: none
///
/// notes:
///
///********************************************************************************************************************
- (void) oneShotHasReachedInverse:(float) relpos
{
[self setAlphaValue:relpos];
}
///*********************************************************************************************************************
///
/// method: oneShotComplete
/// scope: public instance method
/// overrides: NSObject (OneShotDelegate)
/// description: callback from fade out effect
///
/// parameters: none
/// result: none
///
/// notes: removes the window from screen - oneshot will then release it
///
///********************************************************************************************************************
- (void) oneShotComplete
{
[[self parentWindow] removeChildWindow:self];
[self orderOut:self];
}
@end
@implementation NSEvent (GCAdditions)
///*********************************************************************************************************************
///
/// method: isMouseEventType:
/// scope: public instance method
/// overrides:
/// description: checks event to see if it's any mouse event
///
/// parameters: none
/// result: YES if the event is a mouse event of any kind
///
/// notes:
///
///********************************************************************************************************************
- (BOOL) isMouseEventType
{
// returns YES if type is any mouse type
NSEventType t = [self type];
return ( t == NSLeftMouseDown ||
t == NSLeftMouseUp ||
t == NSRightMouseDown ||
t == NSRightMouseUp ||
t == NSLeftMouseDragged ||
t == NSRightMouseDragged ||
t == NSOtherMouseDown ||
t == NSOtherMouseUp ||
t == NSOtherMouseDragged );
}
@end

View File

@ -1,19 +0,0 @@
//
// GCPopTestView.h
// GCWindowMenuTest
//
// Created by Graham on Tue Apr 24 2007. Modified from NSView to NSButton by Vincent Spader.
// Copyright (c) 2007 __MyCompanyName__. All rights reserved.
//
#import <AppKit/AppKit.h>
@interface PopupButton : NSButton
{
NSImage* _popButton;
IBOutlet NSView *_popView;
BOOL _hilited;
}
@end

View File

@ -1,38 +0,0 @@
//
// GCPopTestView.m
// GCWindowMenuTest
//
// Created by Graham on Tue Apr 24 2007.
// Copyright (c) 2007 __MyCompanyName__. All rights reserved.
//
#import "PopupButton.h"
#import "GCWindowMenu.h"
@implementation PopupButton
- (void) mouseDown:(NSEvent*) event
{
// create the menu to pop up using the view connected to the _popView outlet
GCWindowMenu* menu = [GCWindowMenu windowMenuWithContentView:_popView];
[menu setShouldCloseWhenViewTrackingReturns:YES];
// place the menu relative to our window
NSPoint p = [self bounds].origin;
p.y += [self bounds].size.height;
p.x += ([self bounds].size.width - [[[_popView window] contentView] bounds].size.width)/2.0;
p = [self convertPoint:p toView:nil];
// draw self highlighted
[self highlight:YES];
// pop up and track the menu
[menu popUpAtPoint:p withEvent:event];
// unhighlight self
[self highlight:NO];
}
@end

View File

@ -1,38 +0,0 @@
//
// ToolTip.h
// Cog
//
// Created by Vincent Spader on 2/8/09.
// Copyright 2009 __MyCompanyName__. All rights reserved.
//
// From http://www.cocoadev.com/index.pl?ToolTip
#import <AppKit/AppKit.h>
@interface ToolTipWindow : NSWindow
{
id closeTimer;
id tooltipObject;
NSColor *backgroundColor;
NSDictionary *textAttributes;
}
// returns the approximate window size needed to display the tooltip string.
- (NSSize)suggestedSizeForTooltip:(id)tooltip;
// setting and getting the bgColor
- (void)setBackgroundColor:(NSColor *)bgColor;
- (NSColor *)backgroundColor;
- (id)init;
- (id)toolTip;
- (void)setToolTip:(id)tip;
- (void)orderFront;
- (void)orderFrontForDuration:(NSTimeInterval)duration;
@end

View File

@ -1,117 +0,0 @@
#import "ToolTipWindow.h"
@implementation ToolTipWindow
- (void)setBackgroundColor:(NSColor *)bgColor
{
backgroundColor = bgColor;
}
- (NSColor *)backgroundColor
{
return backgroundColor;
}
- (NSSize)suggestedSizeForTooltip:(id)tooltip
{
NSSize tipSize = NSZeroSize;
if ([tooltip isKindOfClass:[NSAttributedString class]]) {
tipSize = [tooltip size];
}
else if ([tooltip isKindOfClass:[NSString class]]){
tipSize = [tooltip sizeWithAttributes:textAttributes];
}
if (!NSEqualSizes(tipSize, NSZeroSize))
tipSize.width += 4;
return tipSize;
}
- (id)init
{
self = [super initWithContentRect:NSMakeRect(0,0,0,0)
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO];
{ // window setup...
[self setAlphaValue:0.90];
[self setOpaque:NO];
[self setHasShadow:YES];
[self setBackgroundColor:[NSColor textBackgroundColor]];
[self setLevel:NSStatusWindowLevel];
[self setHidesOnDeactivate:YES];
[self setIgnoresMouseEvents:YES];
[self setReleasedWhenClosed:NO];
}
{ // textfield setup...
NSTextField *field = [[NSTextField alloc] initWithFrame:NSMakeRect(0,0,0,0)];
[field setEditable:NO];
[field setSelectable:NO];
[field setBezeled:NO];
[field setBordered:NO];
[field setDrawsBackground:NO];
[field setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[self setContentView:field];
[self setFrame:[self frameRectForContentRect:[field frame]] display:NO];
[field setStringValue:@" "]; // Just having at least 1 char to allow the next message...
textAttributes = [[field attributedStringValue] attributesAtIndex:0 effectiveRange:nil];
}
return self;
}
- (void)dealloc
{
if (closeTimer) {
[closeTimer invalidate];
}
}
- (id)toolTip { return tooltipObject; }
- (void)setToolTip:(id)tip
{
id contentView = [self contentView];
tooltipObject = tip;
if ([contentView isKindOfClass:[NSTextField class]]) {
if ([tip isKindOfClass:[NSString class]]) [contentView setStringValue:tip];
else
if ([tip isKindOfClass:[NSAttributedString class]]) [contentView setAttributedStringValue:tip];
}
}
- (void)orderFrontForDuration:(NSTimeInterval)duration
{
[self orderFront:nil];
if (closeTimer) { [closeTimer invalidate]; }
closeTimer = [NSTimer timerWithTimeInterval:duration target:self selector:@selector(close) userInfo:nil repeats:NO];
[[NSRunLoop currentRunLoop] addTimer:closeTimer forMode:NSRunLoopCommonModes];
}
- (void)orderFront
{
if (closeTimer) { [closeTimer invalidate]; closeTimer = nil; }
[super orderFront:nil];
}
- (NSString *)description
{
return [NSString stringWithFormat:@"TooltipWindow:\n%@", [[self contentView] stringValue]];
}
@end

View File

@ -7,7 +7,6 @@
//
#import <Cocoa/Cocoa.h>
#import "ToolTipWindow.h"
@interface VolumeSlider : NSSlider {
NSPopover *popover;