diff --git a/Changelog.rtf b/Changelog.rtf new file mode 100644 index 0000000..06e6330 --- /dev/null +++ b/Changelog.rtf @@ -0,0 +1,22 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\margl1440\margr1440\vieww9000\viewh8400\viewkind0 +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc + +\f0\fs24 \cf0 ---------- iLyrics Changelog ----------\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\cf0 \ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc +\cf0 Release No. 1.0 - 06/16/2012\ +\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\cf0 - iLyrics functionality added\ +- Magistrix Lyrics Hoster added\ +\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\qc +\cf0 Release No. 1.0.1 - 06/16/2012\ +\ +\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural +\cf0 - Added Split View on Main Window\ +- Some little code changes} \ No newline at end of file diff --git a/Diamond.tiff b/Diamond.tiff new file mode 100644 index 0000000..043230c Binary files /dev/null and b/Diamond.tiff differ diff --git a/Download-icon.icns b/Download-icon.icns new file mode 100644 index 0000000..9b094d3 Binary files /dev/null and b/Download-icon.icns differ diff --git a/Growl Registration Ticket.growlRegDict b/Growl Registration Ticket.growlRegDict new file mode 100644 index 0000000..6d113a3 --- /dev/null +++ b/Growl Registration Ticket.growlRegDict @@ -0,0 +1,13 @@ + + + + + TicketVersion + 1 + AllNotifications + + Lyrics sent to iTunes + Lyrics saved to File + + + diff --git a/de.lproj/Localizable.strings b/de.lproj/Localizable.strings new file mode 100644 index 0000000..b7297aa --- /dev/null +++ b/de.lproj/Localizable.strings @@ -0,0 +1,68 @@ +/* Standards */ +"OK" = "OK"; + +"Yes" = "Ja"; + +"No" = "Nein"; + +/* "No Selection" label(s) in the main window */ +"iLyrics.text.noSelection" = "Keine Auswahl"; + +/* Text displayed when a lyrics hoster does not return a valid NSDate in it's hosterVersion method */ +"iLyrics.text.illegalDateFormat" = "Keine Angabe"; + +/* Preferences */ +/* Search Token Replacements */ +"iLyrics.searchToken.%name%" = "Songname"; + +"iLyrics.searchToken.%artist%" = "Interpret"; + +"iLyrics.searchToken.%album%" = "Album"; + +/* Magistrix Hoster */ +"Magistrix.text.noPreview" = "Keine Vorschau verfügbar."; + +"Hoster.text.noNetwork" = "Keine Netzwerkverbindung."; + +"Hoster.messages.networkError.title" = "Sie sind zur Zeit nicht mit dem Internet verbunden."; + +"Hoster.messages.networkError.detail" = "Prüfen Sie, ob ihre WLAN oder Ethernet-Verbndung korrekt funktioniert. Weitere Informationenen erhalten Sie mit dem Netzwerkdiagnose Programm."; + +"Hoster.messages.noResults.title" = "Ihre Suche ergab keine Ergebnisse."; + +"Hoster.messages.noResults.detail" = "Magistrix.de hat keine Songtexte in der Datenbank, die mit der Suchanfrage übereinstimmen."; + +"Magistrix.messages.unknownPage.title" = "Ein Fehler ist beim Verarbeiten der Anfrage aufgetreten."; + +"Magistrix.messages.unknownPage.detail" = "Normalerweise kann dieses Problem behoben werden, wenn Sie die neuste Version von iLyrics laden."; + +/* iTunes connection */ +/* By text used in the artist menu item where %@ is the artist */ +"iTunes.text.byFormat" = "von %@"; + +/* iTunes (error) messages */ +"iTunes.messages.iTunesIdle.title" = "iTunes ist zurzeit nicht geöffnet."; + +"iTunes.messages.iTunesIdle.detail" = "Öffnen Sie iTunes um dieses Feature nutzen zu können."; + +"iTunes.messages.noTrackPlaying.title" = "iTunes spielt zurzeit keine Musik."; + +"iTunes.messages.noTrackPlaying.detail" = "Starten sie die Wiedergabe über iTunes oder über den \"Play/Pause\" Button."; + +"iTunes.messages.replaceLyrics.title" = "Der aktuelle iTunes Titel hat bereits einen Songtext. Möchten Sie ihn ersetzen?"; + +"iTunes.messages.replaceLyrics.detail" = "Beim Eretzen geht der alte Songtext vollständig verloren. Diese Aktion kann nicht wiederrufen werden."; + +/* Error while saving */ +"messages.error.saveLyrics.title" = "Der Songtext konnte nicht gespeichert werden."; + +"messages.error.saveLyrics.detail" = "Prüfen Sie, ob Sie Schreibberechtigung an diesem Ort haben."; + +/* Growl */ +"Growl.messages.lyricsSaved.title" = "Songtext gespeichert"; + +"Growl.messages.lyricsSaved.detail" = "nach \"%@\""; + +"Growl.messages.lyricsSent.title" = "Songtext an iTunes gesendet"; + +"Growl.messages.lyricsSent.detail" = ""; \ No newline at end of file diff --git a/en.lproj/Localizable.strings b/en.lproj/Localizable.strings new file mode 100644 index 0000000..be660c0 --- /dev/null +++ b/en.lproj/Localizable.strings @@ -0,0 +1,68 @@ +/* Standards */ +"OK" = "OK"; + +"Yes" = "Yes"; + +"No" = "No"; + +/* "No Selection" label(s) in the main window */ +"iLyrics.text.noSelection" = "No Selection"; + +/* Text displayed when a lyrics hoster does not return a valid NSDate in it's hosterVersion method */ +"iLyrics.text.illegalDateFormat" = "No Specification"; + +/* Preferences */ +/* Search Token Replacements */ +"iLyrics.searchToken.%name%" = "Song Name"; + +"iLyrics.searchToken.%artist%" = "Artist"; + +"iLyrics.searchToken.%album%" = "Album"; + +/* Magistrix Hoster */ +"Magistrix.text.noPreview" = "No Preview available."; + +"Hoster.text.noNetwork" = "No Network connection"; + +"Hoster.messages.networkError.title" = "You are not connected to the internet."; + +"Hoster.messages.networkError.detail" = "Check if you are connected through WLAN or Ethernet. Use the Network Diagnostics for more information."; + +"Hoster.messages.noResults.title" = "Your search did not return any results."; + +"Hoster.messages.noResults.detail" = "Magistrix.de does not provide any lyrics for this search."; + +"Magistrix.messages.unknownPage.title" = "There occured an error while parsing the request."; + +"Magistrix.messages.unknownPage.detail" = "Normally this can be fixed by getting the newest versin of iLyrics."; + +/* iTunes connection */ +/* By text used in the artist menu item where %@ is the artist */ +"iTunes.text.byFormat" = "by %@"; + +/* iTunes (error) messages */ +"iTunes.messages.iTunesIdle.title" = "iTunes is idle."; + +"iTunes.messages.iTunesIdle.detail" = "Please start iTunes to use this feature."; + +"iTunes.messages.noTrackPlaying.title" = "iTunes does currently not play any music."; + +"iTunes.messages.noTrackPlaying.detail" = "Play a track using iTunes or select \"Play/Pause\" from the iTunes menu."; + +"iTunes.messages.replaceLyrics.title" = "The current iTunes track already has lyrics. Do you want to replace them?"; + +"iTunes.messages.replaceLyrics.detail" = "If you replace the old lyrics they can not be restored anymore."; + +/* Error while saving */ +"messages.error.saveLyrics.title" = "The Lyrics could not be saved."; + +"messages.error.saveLyrics.detail" = "Ceck if you have the rights to write to the selected location."; + +/* Growl */ +"Growl.messages.lyricsSaved.title" = "Lyrics Saved"; + +"Growl.messages.lyricsSaved.detail" = "to \"%@\""; + +"Growl.messages.lyricsSent.title" = "Lyrics sent to iTunes"; + +"Growl.messages.lyricsSent.detail" = ""; \ No newline at end of file diff --git a/iLyrics.icns b/iLyrics.icns new file mode 100644 index 0000000..dfa01fa Binary files /dev/null and b/iLyrics.icns differ diff --git a/iLyrics.xcodeproj/project.pbxproj b/iLyrics.xcodeproj/project.pbxproj index a78bbfe..193721c 100644 --- a/iLyrics.xcodeproj/project.pbxproj +++ b/iLyrics.xcodeproj/project.pbxproj @@ -13,22 +13,72 @@ 3B20EF3C1584EA9A006C0CDF /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF3A1584EA9A006C0CDF /* Credits.rtf */; }; 3B20EF3F1584EA9A006C0CDF /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */; }; 3B20EF421584EA9A006C0CDF /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF401584EA9A006C0CDF /* MainMenu.xib */; }; + 3B20EF491584EAA3006C0CDF /* iLyrics.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF481584EAA3006C0CDF /* iLyrics.icns */; }; + 3B20EF4D1584EAAD006C0CDF /* iTunes-icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF4A1584EAAD006C0CDF /* iTunes-icon.icns */; }; + 3B20EF4E1584EAAD006C0CDF /* Diamond.tiff in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */; }; + 3B20EF4F1584EAAD006C0CDF /* Download-icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF4C1584EAAD006C0CDF /* Download-icon.icns */; }; + 3B20EF521584EAF8006C0CDF /* MainController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF511584EAF8006C0CDF /* MainController.m */; }; + 3B20EF551584ECD9006C0CDF /* Lyrics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF541584ECD9006C0CDF /* Lyrics.m */; }; + 3B20EF5C1584F34E006C0CDF /* SearchResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 3B20EF5B1584F34E006C0CDF /* SearchResult.m */; }; + 3B20EF6115853345006C0CDF /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 3B20EF6315853345006C0CDF /* Localizable.strings */; }; + 3B81D4FE1586248F00916CE3 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B81D4FD1586248F00916CE3 /* ScriptingBridge.framework */; }; + 3BBD9B76158C873F00A5CD2C /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3BBD9B75158C873F00A5CD2C /* Growl.framework */; }; + 3BBD9B78158C876200A5CD2C /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 3BBD9B75158C873F00A5CD2C /* Growl.framework */; }; + 3BBD9B7A158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict in Resources */ = {isa = PBXBuildFile; fileRef = 3BBD9B79158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict */; }; + 3BE95011158A269D00E78FEF /* Magistrix.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE95010158A269D00E78FEF /* Magistrix.m */; }; + 3BE95017158A291500E78FEF /* PreferencesController.m in Sources */ = {isa = PBXBuildFile; fileRef = 3BE95016158A291500E78FEF /* PreferencesController.m */; }; /* End PBXBuildFile section */ +/* Begin PBXCopyFilesBuildPhase section */ + 3BBD9B77158C874F00A5CD2C /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 3BBD9B78158C876200A5CD2C /* Growl.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + /* Begin PBXFileReference section */ 3B20EF271584EA9A006C0CDF /* iLyrics.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = iLyrics.app; sourceTree = BUILT_PRODUCTS_DIR; }; 3B20EF2B1584EA9A006C0CDF /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 3B20EF2E1584EA9A006C0CDF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 3B20EF2F1584EA9A006C0CDF /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 3B20EF301584EA9A006C0CDF /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 3B20EF331584EA9A006C0CDF /* iLyrics-Info.plist */ = {isa = PBXFileReference; path = "iLyrics-Info.plist"; sourceTree = ""; }; + 3B20EF331584EA9A006C0CDF /* iLyrics-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "iLyrics-Info.plist"; sourceTree = ""; }; 3B20EF351584EA9A006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 3B20EF371584EA9A006C0CDF /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 3B20EF391584EA9A006C0CDF /* iLyrics-Prefix.pch */ = {isa = PBXFileReference; path = "iLyrics-Prefix.pch"; sourceTree = ""; }; + 3B20EF391584EA9A006C0CDF /* iLyrics-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "iLyrics-Prefix.pch"; sourceTree = ""; }; 3B20EF3B1584EA9A006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; }; - 3B20EF3D1584EA9A006C0CDF /* AppDelegate.h */ = {isa = PBXFileReference; path = AppDelegate.h; sourceTree = ""; }; + 3B20EF3D1584EA9A006C0CDF /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 3B20EF411584EA9A006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = ""; }; + 3B20EF481584EAA3006C0CDF /* iLyrics.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = iLyrics.icns; sourceTree = ""; }; + 3B20EF4A1584EAAD006C0CDF /* iTunes-icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "iTunes-icon.icns"; sourceTree = ""; }; + 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = Diamond.tiff; sourceTree = ""; }; + 3B20EF4C1584EAAD006C0CDF /* Download-icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = "Download-icon.icns"; sourceTree = ""; }; + 3B20EF501584EAF8006C0CDF /* MainController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MainController.h; sourceTree = ""; }; + 3B20EF511584EAF8006C0CDF /* MainController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MainController.m; sourceTree = ""; }; + 3B20EF531584ECD9006C0CDF /* Lyrics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lyrics.h; sourceTree = ""; }; + 3B20EF541584ECD9006C0CDF /* Lyrics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Lyrics.m; sourceTree = ""; }; + 3B20EF5A1584F34E006C0CDF /* SearchResult.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SearchResult.h; sourceTree = ""; }; + 3B20EF5B1584F34E006C0CDF /* SearchResult.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SearchResult.m; sourceTree = ""; }; + 3B20EF5D1584F458006C0CDF /* LyricsHoster.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LyricsHoster.h; sourceTree = ""; }; + 3B20EF6215853345006C0CDF /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = ""; }; + 3B2DC558158CCE8100C004A4 /* Changelog.rtf */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; path = Changelog.rtf; sourceTree = SOURCE_ROOT; }; + 3B81D4FD1586248F00916CE3 /* ScriptingBridge.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ScriptingBridge.framework; path = System/Library/Frameworks/ScriptingBridge.framework; sourceTree = SDKROOT; }; + 3B81D5041586298100916CE3 /* iTunes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iTunes.h; sourceTree = ""; }; + 3BBD9B72158C7F8A00A5CD2C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; + 3BBD9B74158C86DA00A5CD2C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = de; path = de.lproj/Credits.rtf; sourceTree = ""; }; + 3BBD9B75158C873F00A5CD2C /* Growl.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = Growl.framework; sourceTree = ""; }; + 3BBD9B79158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; path = "Growl Registration Ticket.growlRegDict"; sourceTree = ""; }; + 3BE9500F158A269D00E78FEF /* Magistrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Magistrix.h; sourceTree = ""; }; + 3BE95010158A269D00E78FEF /* Magistrix.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Magistrix.m; sourceTree = ""; }; + 3BE95015158A291500E78FEF /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PreferencesController.h; sourceTree = ""; }; + 3BE95016158A291500E78FEF /* PreferencesController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PreferencesController.m; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -36,6 +86,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 3BBD9B76158C873F00A5CD2C /* Growl.framework in Frameworks */, + 3B81D4FE1586248F00916CE3 /* ScriptingBridge.framework in Frameworks */, 3B20EF2C1584EA9A006C0CDF /* Cocoa.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -46,6 +98,7 @@ 3B20EF1C1584EA9A006C0CDF = { isa = PBXGroup; children = ( + 3B20EF5E15853331006C0CDF /* Resources */, 3B20EF311584EA9A006C0CDF /* iLyrics */, 3B20EF2A1584EA9A006C0CDF /* Frameworks */, 3B20EF281584EA9A006C0CDF /* Products */, @@ -63,6 +116,8 @@ 3B20EF2A1584EA9A006C0CDF /* Frameworks */ = { isa = PBXGroup; children = ( + 3BBD9B75158C873F00A5CD2C /* Growl.framework */, + 3B81D4FD1586248F00916CE3 /* ScriptingBridge.framework */, 3B20EF2B1584EA9A006C0CDF /* Cocoa.framework */, 3B20EF2D1584EA9A006C0CDF /* Other Frameworks */, ); @@ -82,9 +137,19 @@ 3B20EF311584EA9A006C0CDF /* iLyrics */ = { isa = PBXGroup; children = ( + 3B2DC558158CCE8100C004A4 /* Changelog.rtf */, 3B20EF3D1584EA9A006C0CDF /* AppDelegate.h */, 3B20EF3E1584EA9A006C0CDF /* AppDelegate.m */, 3B20EF401584EA9A006C0CDF /* MainMenu.xib */, + 3BE95015158A291500E78FEF /* PreferencesController.h */, + 3BE95016158A291500E78FEF /* PreferencesController.m */, + 3B20EF501584EAF8006C0CDF /* MainController.h */, + 3B20EF511584EAF8006C0CDF /* MainController.m */, + 3B20EF5A1584F34E006C0CDF /* SearchResult.h */, + 3B20EF5B1584F34E006C0CDF /* SearchResult.m */, + 3B20EF531584ECD9006C0CDF /* Lyrics.h */, + 3B20EF541584ECD9006C0CDF /* Lyrics.m */, + 3B20EF591584F31D006C0CDF /* Lyrics Hoster */, 3B20EF321584EA9A006C0CDF /* Supporting Files */, ); path = iLyrics; @@ -93,6 +158,7 @@ 3B20EF321584EA9A006C0CDF /* Supporting Files */ = { isa = PBXGroup; children = ( + 3B81D5041586298100916CE3 /* iTunes.h */, 3B20EF331584EA9A006C0CDF /* iLyrics-Info.plist */, 3B20EF341584EA9A006C0CDF /* InfoPlist.strings */, 3B20EF371584EA9A006C0CDF /* main.m */, @@ -102,6 +168,29 @@ name = "Supporting Files"; sourceTree = ""; }; + 3B20EF591584F31D006C0CDF /* Lyrics Hoster */ = { + isa = PBXGroup; + children = ( + 3BE9500F158A269D00E78FEF /* Magistrix.h */, + 3BE95010158A269D00E78FEF /* Magistrix.m */, + 3B20EF5D1584F458006C0CDF /* LyricsHoster.h */, + ); + name = "Lyrics Hoster"; + sourceTree = ""; + }; + 3B20EF5E15853331006C0CDF /* Resources */ = { + isa = PBXGroup; + children = ( + 3BBD9B79158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict */, + 3B20EF481584EAA3006C0CDF /* iLyrics.icns */, + 3B20EF4A1584EAAD006C0CDF /* iTunes-icon.icns */, + 3B20EF4B1584EAAD006C0CDF /* Diamond.tiff */, + 3B20EF4C1584EAAD006C0CDF /* Download-icon.icns */, + 3B20EF6315853345006C0CDF /* Localizable.strings */, + ); + name = Resources; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -112,6 +201,7 @@ 3B20EF231584EA9A006C0CDF /* Sources */, 3B20EF241584EA9A006C0CDF /* Frameworks */, 3B20EF251584EA9A006C0CDF /* Resources */, + 3BBD9B77158C874F00A5CD2C /* CopyFiles */, ); buildRules = ( ); @@ -136,6 +226,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + de, ); mainGroup = 3B20EF1C1584EA9A006C0CDF; productRefGroup = 3B20EF281584EA9A006C0CDF /* Products */; @@ -155,6 +246,12 @@ 3B20EF361584EA9A006C0CDF /* InfoPlist.strings in Resources */, 3B20EF3C1584EA9A006C0CDF /* Credits.rtf in Resources */, 3B20EF421584EA9A006C0CDF /* MainMenu.xib in Resources */, + 3B20EF491584EAA3006C0CDF /* iLyrics.icns in Resources */, + 3B20EF4D1584EAAD006C0CDF /* iTunes-icon.icns in Resources */, + 3B20EF4E1584EAAD006C0CDF /* Diamond.tiff in Resources */, + 3B20EF4F1584EAAD006C0CDF /* Download-icon.icns in Resources */, + 3B20EF6115853345006C0CDF /* Localizable.strings in Resources */, + 3BBD9B7A158C87D000A5CD2C /* Growl Registration Ticket.growlRegDict in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -167,6 +264,11 @@ files = ( 3B20EF381584EA9A006C0CDF /* main.m in Sources */, 3B20EF3F1584EA9A006C0CDF /* AppDelegate.m in Sources */, + 3B20EF521584EAF8006C0CDF /* MainController.m in Sources */, + 3B20EF551584ECD9006C0CDF /* Lyrics.m in Sources */, + 3B20EF5C1584F34E006C0CDF /* SearchResult.m in Sources */, + 3BE95011158A269D00E78FEF /* Magistrix.m in Sources */, + 3BE95017158A291500E78FEF /* PreferencesController.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -185,6 +287,7 @@ isa = PBXVariantGroup; children = ( 3B20EF3B1584EA9A006C0CDF /* en */, + 3BBD9B74158C86DA00A5CD2C /* de */, ); name = Credits.rtf; sourceTree = ""; @@ -197,6 +300,15 @@ name = MainMenu.xib; sourceTree = ""; }; + 3B20EF6315853345006C0CDF /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 3B20EF6215853345006C0CDF /* en */, + 3BBD9B72158C7F8A00A5CD2C /* de */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ @@ -250,6 +362,10 @@ 3B20EF461584EA9A006C0CDF /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "iLyrics/iLyrics-Prefix.pch"; INFOPLIST_FILE = "iLyrics/iLyrics-Info.plist"; @@ -261,6 +377,10 @@ 3B20EF471584EA9A006C0CDF /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)\"", + ); GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "iLyrics/iLyrics-Prefix.pch"; INFOPLIST_FILE = "iLyrics/iLyrics-Info.plist"; @@ -288,6 +408,7 @@ 3B20EF471584EA9A006C0CDF /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; diff --git a/iLyrics/AppDelegate.h b/iLyrics/AppDelegate.h index 539c0ce..d88cb2f 100644 --- a/iLyrics/AppDelegate.h +++ b/iLyrics/AppDelegate.h @@ -7,9 +7,25 @@ // #import +#import +#import "iTunes.h" +#import "PreferencesController.h" +#import "MainController.h" -@interface AppDelegate : NSObject +@interface AppDelegate : NSObject @property (assign) IBOutlet NSWindow *window; +@property (weak) IBOutlet MainController *mainController; +@property (unsafe_unretained) IBOutlet NSWindow *preferencesWindow; +@property (weak) IBOutlet PreferencesController *preferencesController; +@property (weak) IBOutlet NSButton *quitWhenAllWindowClosedCheckBox; + +//- (IBAction)showPreferences:(id)sender; +//- (IBAction)searchFormatChanged:(id)sender; +- (IBAction)runiTunes:(id)sender; +- (IBAction)quitiTunes:(id)sender; +- (IBAction)playPauseiTunes:(id)sender; +- (IBAction)previousTrack:(id)sender; +- (IBAction)nextTrack:(id)sender; @end diff --git a/iLyrics/AppDelegate.m b/iLyrics/AppDelegate.m index 57d5612..e3c72cc 100644 --- a/iLyrics/AppDelegate.m +++ b/iLyrics/AppDelegate.m @@ -7,14 +7,95 @@ // #import "AppDelegate.h" +#import "Magistrix.h" -@implementation AppDelegate +@implementation AppDelegate { + iTunesApplication *iTunes; + NSArray *keyTokens; + NSMutableArray *searchFormat; + Magistrix *magistrix; +} -@synthesize window = _window; +@synthesize window; +@synthesize mainController; +@synthesize preferencesWindow; +@synthesize preferencesController; +@synthesize quitWhenAllWindowClosedCheckBox; - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { - // Insert code here to initialize your application + magistrix = [[Magistrix alloc] init]; + [preferencesController addHoster:magistrix]; + keyTokens = [NSArray arrayWithObjects:@"%name%", @"%artist%", @"%album%", nil]; + [window setExcludedFromWindowsMenu:YES]; + iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [quitWhenAllWindowClosedCheckBox setState:[defaults boolForKey:@"Quit when all windows are closed"]?NSOnState:NSOffState]; + [mainController loadFromDefaults:defaults]; } +-(NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender { + NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; + [defaults setBool:[quitWhenAllWindowClosedCheckBox state] == NSOnState forKey:@"Quit when all windows are closed"]; + [mainController saveToDefalts:defaults]; + [defaults synchronize]; + return NSTerminateNow; +} + +-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender { + return [quitWhenAllWindowClosedCheckBox state] == NSOnState; +} + +-(BOOL)validateMenuItem:(NSMenuItem *)menuItem { + SEL action = [menuItem action]; + if (action == @selector(runitunes:)) { + return ![iTunes isRunning]; + } + if (action == @selector(quitiTunes:) || action == @selector(playPauseiTunes:) || action == @selector(previousTrack:) || action == @selector(nextTrack:)) { + return [iTunes isRunning]; + } + return [self respondsToSelector:action]; +} +/* +- (IBAction)showPreferences:(id)sender { + [searchFormatField setObjectValue:searchFormat]; + [preferencesWindow makeKeyAndOrderFront:sender]; +} + +- (IBAction)searchFormatChanged:(id)sender { + NSArray *tokens = [searchFormatField objectValue]; + [searchFormat removeAllObjects]; + [searchFormat addObjectsFromArray:tokens]; +} +*/ +-(NSString *)searchFormat { + NSMutableString *string = [[NSMutableString alloc] init]; + for (NSString *token in searchFormat) { + [string appendString:token]; + } + return string; +} + +- (IBAction)runiTunes:(id)sender { + [iTunes run]; + [window update]; +} + +- (IBAction)quitiTunes:(id)sender { + [iTunes quit]; + [window update]; +} + +- (IBAction)playPauseiTunes:(id)sender { + [iTunes playpause]; + [window update]; +} + +- (IBAction)previousTrack:(id)sender { + [iTunes previousTrack]; +} + +- (IBAction)nextTrack:(id)sender { + [iTunes nextTrack]; +} @end diff --git a/iLyrics/Lyrics.h b/iLyrics/Lyrics.h new file mode 100644 index 0000000..eb6f370 --- /dev/null +++ b/iLyrics/Lyrics.h @@ -0,0 +1,17 @@ +// +// Lyrics.h +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface Lyrics : NSObject +@property NSString *name; +@property NSString *artist; +@property NSString *lyrics; +-(id)initWithName: (NSString*) name byArtist: (NSString*) artist withLyrics: (NSString*) lyrics; + +@end diff --git a/iLyrics/Lyrics.m b/iLyrics/Lyrics.m new file mode 100644 index 0000000..0435c89 --- /dev/null +++ b/iLyrics/Lyrics.m @@ -0,0 +1,24 @@ +// +// Lyrics.m +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "Lyrics.h" + +@implementation Lyrics + +@synthesize name; +@synthesize artist; +@synthesize lyrics; + +-(id)initWithName:(NSString *)son byArtist:(NSString *)art withLyrics:(NSString *)lyr { + lyrics = lyr; + artist = art; + name = son; + return self; +} + +@end diff --git a/iLyrics/LyricsHoster.h b/iLyrics/LyricsHoster.h new file mode 100644 index 0000000..cf1fca6 --- /dev/null +++ b/iLyrics/LyricsHoster.h @@ -0,0 +1,30 @@ +// +// LyricsHoster.h +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import "SearchResult.h" +#import "Lyrics.h" + +@protocol LyricsHoster + +-(NSString*) name; + +-(NSDate*) hosterVersion; + +-(void) startNewSearchForQuery: (NSString*) query; + +-(BOOL) hasMoreResults; + +//Return an empty array for a "No results found" message and nil for a "network error". +-(NSArray*) nextResults; + +-(void) resetLoadedResults; + +-(Lyrics*) lyricsBySearchResult: (SearchResult *) result; + +@end diff --git a/iLyrics/Magistrix.h b/iLyrics/Magistrix.h new file mode 100644 index 0000000..3e87735 --- /dev/null +++ b/iLyrics/Magistrix.h @@ -0,0 +1,14 @@ +// +// Magistrix.h +// iLyrics +// +// Created by Kim Wittenburg on 14.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import "LyricsHoster.h" + +@interface Magistrix : NSObject + +@end diff --git a/iLyrics/Magistrix.m b/iLyrics/Magistrix.m new file mode 100644 index 0000000..0eace77 --- /dev/null +++ b/iLyrics/Magistrix.m @@ -0,0 +1,210 @@ +// +// Magistrix.m +// iLyrics +// +// Created by Kim Wittenburg on 14.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// +// +//TODO: Use correct Date + +#import "Magistrix.h" + +typedef enum { + LyricsPage, + ResultsPage, + NoResultsPage, + UnknownPage +} PageType; + +@implementation Magistrix { + NSString *query; + int loadedResults; + int resultCount; +} + +-(NSString*) name { + return @"Magistrix"; +} + +-(NSDate *)hosterVersion { + return [NSDate dateWithString:@"2012-06-16 11:00:00 +0100"]; +} + +-(void) startNewSearchForQuery: (NSString*) q { + [self resetLoadedResults]; + query = q; +} + +-(BOOL) hasMoreResults { + return loadedResults < resultCount; +} + +-(NSArray*) nextResults { + int site = (loadedResults/10) + 1; + NSString *searchPath = [NSString stringWithFormat:@"http://www.magistrix.de/lyrics/search?q=%@&page=%i", [query stringByReplacingOccurrencesOfString:@" " withString:@"+"], site]; + NSURL *searchURL = [NSURL URLWithString:searchPath]; + NSError *error; + NSString *page = [NSString stringWithContentsOfURL:searchURL encoding:NSUTF8StringEncoding error:&error]; + if (error) { + return nil; + } + PageType pType = [self typeOfPage:page]; + if (pType == LyricsPage) { + resultCount = 1; + loadedResults = 1; + return [NSArray arrayWithObject:[self searchResultFromLyricsPage:page atURL:searchURL]]; + } else if (pType == ResultsPage) { + [self shouldSetResultCountFromPage:page]; + return [self searchResultsFromPage:page]; + } else if (pType == NoResultsPage) { + return [[NSArray alloc] init]; + } else { + NSRunAlertPanel(NSLocalizedString(@"Magistrix.messages.unknownPage.title", @""), NSLocalizedString(@"Magistrix.messages.unknownPage.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + return [[NSArray alloc] init]; + } +} + +-(PageType) typeOfPage: (NSString *) page { + if ([page rangeOfString:@"Songtext-Suche"].location != NSNotFound) { + if ([page rangeOfString:@"
"].location != NSNotFound) { + return NoResultsPage; + } else { + return ResultsPage; + } + } + if ([page rangeOfString:@"
"].location != NSNotFound) { + return LyricsPage; + } + return UnknownPage; +} + +-(SearchResult*) searchResultFromLyricsPage: (NSString *) page atURL: (NSURL *) url{ + int headingStart = NSMaxRange([page rangeOfString:@"

"]); + int headingEnd = [page rangeOfString:@"

"].location; + int artistStart = NSMaxRange([page rangeOfString:@">" options:NSCaseInsensitiveSearch range:NSMakeRange(headingStart, headingEnd-headingStart)]); + NSRange artistEndTag = [page rangeOfString:@"" options:NSCaseInsensitiveSearch range:NSMakeRange(artistStart, headingEnd-artistStart)]; + int artistEnd = artistEndTag.location; + int songNameStart = NSMaxRange(artistEndTag); + int songNameEnd = headingEnd; + NSString *artist = [page substringWithRange:NSMakeRange(artistStart, artistEnd-artistStart)]; + NSString *songName = [page substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)]; + //Remove the " Lyric" and the " – " from the Song name + songName = [[songName substringToIndex:[songName length]-[@" Lyric" length]] substringFromIndex:[@" – " length]]; + NSString *preview = [self lyricsFromPage:page]; + return [[SearchResult alloc]initWithName:songName fromArtist:artist preview:preview link:url]; +} + +-(NSArray*) searchResultsFromPage: (NSString *) page { + int resultsTableStart = NSMaxRange([page rangeOfString:@""]); + int resultsTableEnd = [page rangeOfString:@"
"].location; + NSArray *resultTags = [self resultTagsFromTable:[page substringWithRange:NSMakeRange(resultsTableStart, resultsTableEnd-resultsTableStart)]]; + NSMutableArray *searchResults = [[NSMutableArray alloc] init]; + for (NSString *tag in resultTags) { + [searchResults addObject:[self searchResultFromResultTag:tag]]; + } + //Increase loadedResults by 10 which is a full results site + //Even if there are less than 10 results on a page (would not have any effect) + loadedResults += 10; + return searchResults; +} + +-(NSArray*) resultTagsFromTable: (NSString *) table { + NSRange restRange = NSMakeRange(0, [table length]); + NSMutableArray *tags = [[NSMutableArray alloc] init]; + NSUInteger currentIndex = [table rangeOfString:@""].location; + while (currentIndex != NSNotFound) { + int startIndex = currentIndex + [@"" length]; + int endIndex = [table rangeOfString:@"" options:NSCaseInsensitiveSearch range:restRange].location; + NSRange tagRange = NSMakeRange(startIndex, endIndex-startIndex); + [tags addObject:[table substringWithRange:tagRange]]; + restRange = [self restRangeFromString:table subtractingRange:tagRange]; + restRange.length -= [@"" length]; + restRange.location += [@"" length]; + currentIndex = [table rangeOfString:@"" options:NSCaseInsensitiveSearch range:restRange].location; + } + return tags; +} + +-(SearchResult*) searchResultFromResultTag: (NSString *) tag { + NSRange artistStartRange = [tag rangeOfString:@">"]; + int artistEndIndex = [tag rangeOfString:@"<" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:artistStartRange]].location; + int artistStartIndex = NSMaxRange(artistStartRange); + NSString *artist = [tag substringWithRange:NSMakeRange(artistStartIndex, artistEndIndex-artistStartIndex)]; + + NSRange restRange = [self restRangeFromString:tag subtractingRange:NSMakeRange(artistEndIndex, [@"" length])]; + NSRange songNameTagStartRange = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]]); + int songNameEnd = [tag rangeOfString:@"" options:NSCaseInsensitiveSearch range:[self restRangeFromString:tag subtractingRange:songNameTagStartRange]].location; + NSString *songName = [tag substringWithRange:NSMakeRange(songNameStart, songNameEnd-songNameStart)]; + int previewStart = songNameEnd + [@"" length] + [@"\n

" length]; + NSRange previewRestRange = NSMakeRange(previewStart, [tag length]-previewStart); + int previewEnd = [tag rangeOfString:@"

" options:NSCaseInsensitiveSearch range:previewRestRange].location; + NSString *preview = [self stringByRemovingHTMLTags:[tag substringWithRange:NSMakeRange(previewStart, previewEnd-previewStart)]]; + return [[SearchResult alloc] initWithName:songName fromArtist:artist preview:preview link:link]; +} + +-(NSURL*) urlFromHref: (NSString *) link { + if ([link hasPrefix:@"/"]) { + return [NSURL URLWithString:[NSString stringWithFormat:@"http://www.Magistrix.de%@", link]]; + } else { + return [NSURL URLWithString:link]; + } +} + +-(NSString*) stringByRemovingHTMLTags: (NSString *)string { + return [[[[[[[[[[string stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@""] stringByReplacingOccurrencesOfString:@"

" withString:@""] stringByReplacingOccurrencesOfString:@"
" withString:@""] stringByReplacingOccurrencesOfString:@""" withString:@"\""]; +} + +-(NSRange) restRangeFromString: (NSString *) page subtractingRange: (NSRange) aRange { + int loc = NSMaxRange(aRange); + return NSMakeRange(loc, [page length]-loc); +} + +-(void) shouldSetResultCountFromPage: (NSString *) page { + if (resultCount == 0) { + //Nothing loaded before + NSRange resultsLabelStartRange = [page rangeOfString:@"

Ergebnisse 1 bis "]; + int resultsLabelEnd = [page rangeOfString:@"

" options:NSCaseInsensitiveSearch range:[self restRangeFromString:page subtractingRange:resultsLabelStartRange]].location; + NSString *resultsLabel = [page substringWithRange:NSMakeRange(NSMaxRange(resultsLabelStartRange), resultsLabelEnd-resultsLabelStartRange.location)]; + if ([resultsLabel rangeOfString:@"ungefähr"].location != NSNotFound){ + //Needs not more than 100 which means 10 sites (which is the maximum) + resultCount = 100; + } else { + int resultsStart = NSMaxRange([resultsLabel rangeOfString:@"von "]); + int resultsEnd = [resultsLabel rangeOfString:@"<"].location; + NSString *results = [resultsLabel substringWithRange:NSMakeRange(resultsStart, resultsEnd-resultsStart)]; + resultCount = [results intValue]; + } + if (resultCount > 100) { + resultCount = 100; + } + } +} + +-(void) resetLoadedResults { + loadedResults = 0; +} + +-(Lyrics*) lyricsBySearchResult: (SearchResult *) result { + NSError *error = nil; + NSString *page = [NSString stringWithContentsOfURL:[result link] encoding:NSUTF8StringEncoding error:&error]; + if (error) { + return nil; + } + NSString *lyrics = [self lyricsFromPage:page]; + return [[Lyrics alloc] initWithName:[result name] byArtist:[result artist] withLyrics:lyrics]; +} + + +-(NSString *) lyricsFromPage: (NSString *)page { + int lyricsStart = NSMaxRange([page rangeOfString:@"
"]) + [@"\n" length]; + NSRange restRange = NSMakeRange(lyricsStart, [page length]-lyricsStart); + int lyricsEnd = [page rangeOfString:@"
" options:NSCaseInsensitiveSearch range:restRange].location; + NSString *lyrics = [self stringByRemovingHTMLTags:[page substringWithRange:NSMakeRange(lyricsStart, lyricsEnd-lyricsStart)]]; + return lyrics; +} +@end diff --git a/iLyrics/MainController.h b/iLyrics/MainController.h new file mode 100644 index 0000000..fd34377 --- /dev/null +++ b/iLyrics/MainController.h @@ -0,0 +1,46 @@ +// +// MainController.h +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import +#import +#import +#import "iTunes.h" +#import "Magistrix.h" +#import "SearchResult.h" +#import "Lyrics.h" +#import + +@interface MainController : NSObject +@property (weak) IBOutlet NSMenuItem *iLyricsMenuItem; +@property (unsafe_unretained) IBOutlet NSWindow *window; +@property (weak) IBOutlet NSSearchField *searchField; +@property (weak) IBOutlet NSOutlineView *resultsOutline; +@property (weak) IBOutlet NSButton *loadMoreResultsButton; +@property (weak) IBOutlet NSButton *showPreviewCheckBox; +@property (weak) IBOutlet NSPopover *previewPopover; +@property (unsafe_unretained) IBOutlet NSTextView *previewTextArea; +@property (weak) IBOutlet NSTextField *songLabel; +@property (weak) IBOutlet NSTextField *artistLabel; +@property (weak) IBOutlet NSButton *sendToiTunesButton; +@property (weak) IBOutlet NSButton *downloadLyricsButton; +@property (unsafe_unretained) IBOutlet NSTextView *lyricsArea; +@property (readonly) Lyrics *currentLyrics; + +- (IBAction)getCurrentiTunesSong:(id)sender; +- (IBAction)startNewSearch:(id)sender; +- (IBAction)loadNextResults:(id)sender; +- (IBAction)resetLoadedResults:(id)sender; +- (IBAction)lyricsSelectionChanged:(NSOutlineView *)sender; +- (IBAction)sendLyricsToiTunes:(id)sender; +- (IBAction)downloadLyrics:(id)sender; +- (IBAction)showiLyricsWindow:(id)sender; +- (void)saveToDefalts: (NSUserDefaults *)defaults; +- (void)loadFromDefaults: (NSUserDefaults *)defaults; + +@end diff --git a/iLyrics/MainController.m b/iLyrics/MainController.m new file mode 100644 index 0000000..cff1b22 --- /dev/null +++ b/iLyrics/MainController.m @@ -0,0 +1,283 @@ +// +// MainController.m +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "MainController.h" + +@implementation MainController { + NSMutableArray *data; + id currentHoster; + BOOL lyricsSelected; + NSInteger selectedSavePanelButton; + NSURL *saveFile; + iTunesApplication *iTunes; + Lyrics *currentLyrics; + int selectedRow; +} +@synthesize iLyricsMenuItem; +@synthesize window; +@synthesize searchField; +@synthesize resultsOutline; +@synthesize loadMoreResultsButton; +@synthesize showPreviewCheckBox; +@synthesize previewPopover; +@synthesize previewTextArea; +@synthesize songLabel; +@synthesize artistLabel; +@synthesize sendToiTunesButton; +@synthesize downloadLyricsButton; +@synthesize lyricsArea; + + +-(id)init { + iTunes = [SBApplication applicationWithBundleIdentifier:@"com.apple.iTunes"]; + data = [[NSMutableArray alloc] init]; + currentHoster = [[Magistrix alloc] init]; + return [super init]; +} + +#pragma mark - +#pragma mark Outline view Data Source and Delegate +-(NSInteger)outlineView:(NSOutlineView *)outlineView numberOfChildrenOfItem:(id)item { + return item == nil ? [data count] : 0; +} + +-(id)outlineView:(NSOutlineView *)outlineView child:(NSInteger)index ofItem:(id)item { + return [data objectAtIndex:index]; +} + +-(BOOL)outlineView:(NSOutlineView *)outlineView isItemExpandable:(id)item { + return NO; +} + +-(id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)tableColumn byItem:(id)item { + if ([[tableColumn identifier] isEqualToString:@"song"]) { + return [item name]; + } else { + return [item artist]; + } + return nil; +} + + +-(NSString *)outlineView:(NSOutlineView *)outlineView toolTipForCell:(NSCell *)cell rect:(NSRectPointer)rect tableColumn:(NSTableColumn *)tableColumn item:(id)item mouseLocation:(NSPoint)mouseLocation { + //item is an instance of SearchResult + [self shouldShowPreviewForCellRect:*rect searchResult:item]; + return nil; +} + +#pragma mark - +#pragma mark Responding to Lyrics Search + +- (IBAction)getCurrentiTunesSong:(id)sender { + iTunesTrack *track = [iTunes currentTrack]; + if (track == nil) { + NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.iTunesIdle.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iTunes.messages.iTunesIdle.detail", @"")); + return; + } + NSString *name = [track name]; + NSString *artist = [track artist]; + if (name == nil) { + NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.noTrackPlaying.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iTunes.messages.noTrackPlaying.detail", @"")); + return; + } + NSString *searchText = [NSString stringWithFormat:@"%@ - %@", name, artist]; + [searchField setStringValue:searchText]; + [searchField performClick:sender]; +} + +- (IBAction)startNewSearch:(id)sender { + [self resetLoadedResults:sender]; + if ([[searchField stringValue] length] > 0) { + [currentHoster startNewSearchForQuery:[searchField stringValue]]; + [self loadNextResults:sender]; + } +} + +- (IBAction)loadNextResults:(id)sender { + NSArray *nextResults = [currentHoster nextResults]; + if (nextResults == nil) { + NSRunCriticalAlertPanel(NSLocalizedString(@"Hoster.messages.networkError.title", @""), NSLocalizedString(@"Hoster.messages.networkError.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + return; + } + if ([nextResults count] == 0) { + NSRunAlertPanel(NSLocalizedString(@"Hoster.messages.noResults.title", @""), NSLocalizedString(@"Hoster.messages.noResults.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + return; + } + [data addObjectsFromArray:nextResults]; + [resultsOutline reloadData]; + [loadMoreResultsButton setEnabled:[currentHoster hasMoreResults]]; +} + +-(IBAction)resetLoadedResults:(id)sender { + [currentHoster resetLoadedResults]; + [data removeAllObjects]; + [resultsOutline reloadData]; + [loadMoreResultsButton setEnabled:[currentHoster hasMoreResults]]; + [self lyricsSelectionChanged:resultsOutline]; +} + +- (IBAction)lyricsSelectionChanged:(NSOutlineView *)sender { + int index = [sender selectedRow]; + if (index < 0) { + lyricsSelected = NO; + currentLyrics = nil; + NSString *noSelectionText = NSLocalizedString(@"iLyrics.text.noSelection", @""); + [songLabel setStringValue:noSelectionText]; + [artistLabel setStringValue:noSelectionText]; + [lyricsArea setString:noSelectionText]; + [lyricsArea setEditable:NO]; + } else { + if (selectedRow != index) { + lyricsSelected = YES; + SearchResult *result = [data objectAtIndex:index]; + Lyrics *lyrics = [currentHoster lyricsBySearchResult:result]; + currentLyrics = lyrics; + if (lyrics == nil) { + NSRunCriticalAlertPanel(NSLocalizedString(@"Hoster.messages.networkError.title", @""), NSLocalizedString(@"Hoster.messages.networkError.detail", @""), NSLocalizedString(@"OK", @""), nil, nil); + NSString *noNetwork = NSLocalizedString(@"Hoster.text.noNetwork", @""); + [songLabel setStringValue:noNetwork]; + [artistLabel setStringValue:noNetwork]; + [lyricsArea setString:noNetwork]; + [lyricsArea setEditable:NO]; + } + [songLabel setStringValue:[lyrics name]]; + [artistLabel setStringValue:[lyrics artist]]; + [lyricsArea setString:[lyrics lyrics]]; + [lyricsArea setEditable:YES]; + } + } + selectedRow = index; + [window update]; +} + +-(void) shouldShowPreviewForCellRect: (NSRect) rect searchResult: (SearchResult *) result { + if ([showPreviewCheckBox state] == NSOnState) { + NSString *lyrics = [result preview]; + if (lyrics) { + rect.size.width = [resultsOutline frame].size.width; + [previewTextArea setString:lyrics]; + [previewPopover showRelativeToRect:rect ofView:resultsOutline preferredEdge:NSMaxXEdge]; + } + } +} + +- (IBAction)sendLyricsToiTunes:(id)sender { + iTunesTrack *track = [iTunes currentTrack]; + NSString *name = [track name]; + if (name == nil) { + NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.noTrackPlaying.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"iTunes.messages.noTrackPlaying.detail", @"")); + return; + } + NSString *oldLyrics = [track lyrics]; + if (oldLyrics != nil && [oldLyrics length] > 0) { + NSBeginAlertSheet(NSLocalizedString(@"iTunes.messages.replaceLyrics.title", @""), NSLocalizedString(@"Yes", @""), NSLocalizedString(@"No", @""), nil, window, self, @selector(replaceLyricsSheetDidEnd:returnCode:contextInfo:), nil, nil, NSLocalizedString(@"iTunes.messages.replaceLyrics.detail", @"")); + } else { + [self replaceLyricsSheetDidEnd:nil returnCode:NSAlertDefaultReturn contextInfo:nil]; + } +} + +- (void)replaceLyricsSheetDidEnd:(NSWindow *)sheet returnCode:(NSInteger)returnCode contextInfo:(void *)contextInfo { + if (returnCode == NSAlertDefaultReturn) { + [[iTunes currentTrack] setLyrics:[lyricsArea string]]; + [GrowlApplicationBridge notifyWithTitle:NSLocalizedString(@"Growl.messages.lyricsSent.title", @"") description:NSLocalizedString(@"Growl.messages.lyricsSent.detail", @"") notificationName:@"Lyrics sent to iTunes" iconData:nil priority:0 isSticky:NO clickContext:nil]; + } +} + +- (IBAction)downloadLyrics:(id)sender { + NSSavePanel *savePanel = [NSSavePanel savePanel]; + [savePanel setAllowedFileTypes:[NSArray arrayWithObject:@"txt"]]; + [savePanel setAllowsOtherFileTypes:YES]; + [savePanel setCanSelectHiddenExtension:YES]; + [savePanel setExtensionHidden:YES]; + [savePanel setNameFieldStringValue:[currentLyrics name]]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(savePanelDidClose:) name:NSWindowDidEndSheetNotification object:window]; + void (^handler) (NSInteger) = ^(NSInteger result) { + selectedSavePanelButton = result; + saveFile = [savePanel URL]; + }; + [savePanel beginSheetModalForWindow:window completionHandler:handler]; +} + +-(void) savePanelDidClose: (NSNotification *) notification{ + [[NSNotificationCenter defaultCenter] removeObserver:self name:NSWindowDidEndSheetNotification object:window]; + if (selectedSavePanelButton == NSOKButton) { + BOOL success = [[[lyricsArea string] dataUsingEncoding:NSUTF8StringEncoding] writeToURL:saveFile atomically:NO]; + if (!success) { + NSBeginAlertSheet(NSLocalizedString(@"messages.error.saveLyrics.title", @""), NSLocalizedString(@"OK", @""), nil, nil, window, nil, nil, nil, nil, NSLocalizedString(@"messages.error.saveLyrics.detail", @"")); + } else { + [GrowlApplicationBridge notifyWithTitle:NSLocalizedString(@"Growl.messages.lyricsSaved.title", @"") description:[NSString stringWithFormat:NSLocalizedString(@"Growl.messages.lyricsSaved.detail", @""), [saveFile path]] notificationName:@"Lyrics saved to File" iconData:nil priority:0 isSticky:NO clickContext:nil]; + } + } +} + +-(Lyrics *)currentLyrics { + return currentLyrics; +} + +#pragma mark - +#pragma mark Show the window + +- (IBAction)showiLyricsWindow:(id)sender { + [window makeKeyAndOrderFront:sender]; +} + +#pragma mark window delegate + +-(BOOL)validateMenuItem:(NSMenuItem *)menuItem { + return [self validateUserInterfaceItem:menuItem]; +} + +-(BOOL)validateToolbarItem:(NSToolbarItem *)theItem { + return [self validateUserInterfaceItem:theItem]; +} + +-(BOOL)validateUserInterfaceItem:(id)item { + SEL action = [item action]; + if (action == @selector(downloadLyrics:)) { + [downloadLyricsButton setEnabled:lyricsSelected]; + return lyricsSelected; + } + if (action == @selector(sendLyricsToiTunes:)) { + BOOL enabled = lyricsSelected && [iTunes isRunning]; + [sendToiTunesButton setEnabled:enabled]; + return enabled; + } + if (action == @selector(getCurrentiTunesSong:)) { + return [iTunes isRunning]; + } + if (action == @selector(showPreview:)) { + return [resultsOutline clickedRow] >= 0; + } + return [self respondsToSelector:[item action]]; +} + +-(void)windowDidBecomeMain:(NSNotification *)notification { + [iLyricsMenuItem setOffStateImage:nil]; + [iLyricsMenuItem setState:NSOnState]; +} + +-(void)windowDidResignMain:(NSNotification *)notification { + [iLyricsMenuItem setOffStateImage:nil]; + [iLyricsMenuItem setState:NSOffState]; +} + +-(void)windowDidMiniaturize:(NSNotification *)notification { + NSString *imgPath = [[NSBundle mainBundle] pathForImageResource:@"Diamond"]; + NSImage *miniaturizedImage = [[NSImage alloc] initWithContentsOfFile:imgPath]; + [iLyricsMenuItem setOffStateImage:miniaturizedImage]; + [iLyricsMenuItem setState:NSOffState]; +} + +-(void)saveToDefalts:(NSUserDefaults *)defaults { + [defaults setBool:[showPreviewCheckBox state] == NSOnState forKey:@"Show preview"]; +} + +-(void)loadFromDefaults:(NSUserDefaults *)defaults { + [showPreviewCheckBox setState:[defaults boolForKey:@"Show preview"]?NSOnState:NSOffState]; +} +@end diff --git a/iLyrics/PreferencesController.h b/iLyrics/PreferencesController.h new file mode 100644 index 0000000..b1ca4c7 --- /dev/null +++ b/iLyrics/PreferencesController.h @@ -0,0 +1,20 @@ +// +// PreferencesController.h +// iLyrics +// +// Created by Kim Wittenburg on 14.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import +#import "LyricsHoster.h" + +@interface PreferencesController : NSObject + +@property (weak) IBOutlet NSTableView *hosterTable; +@property NSArray *hosters; + +-(void) addHoster: (id) hoster; +-(void) removeHoster: (id) hoster; + +@end diff --git a/iLyrics/PreferencesController.m b/iLyrics/PreferencesController.m new file mode 100644 index 0000000..ec846e6 --- /dev/null +++ b/iLyrics/PreferencesController.m @@ -0,0 +1,64 @@ +// +// PreferencesController.m +// iLyrics +// +// Created by Kim Wittenburg on 14.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "PreferencesController.h" + +@implementation PreferencesController { + NSMutableArray *hosters; +} +@synthesize hosterTable; + +-(id)init { + hosters = [[NSMutableArray alloc] init]; + return [super init]; +} + +#pragma mark - +#pragma mark Properties + +-(NSArray *)hosters { + return hosters; +} + +-(void)setHosters:(NSArray *)hstrs { + hosters = [NSMutableArray arrayWithArray:hstrs]; + [hosterTable reloadData]; +} + +#pragma mark Modifying hosters + +-(void)addHoster:(id)hoster { + [hosters addObject:hoster]; + [hosterTable reloadData]; +} + +-(void)removeHoster:(id)hoster { + [hosters removeObject:hoster]; + [hosterTable reloadData]; +} + +#pragma mark - +#pragma mark Table Data Source +-(NSInteger)numberOfRowsInTableView:(NSTableView *)tableView { + return [hosters count]; +} + +-(id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { + if ([[tableColumn identifier] isEqualToString:@"hoster"]) { + return [[hosters objectAtIndex:row] name]; + } else { + NSDate *version = [[hosters objectAtIndex:row] hosterVersion]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateStyle:NSDateFormatterLongStyle]; + [dateFormatter setTimeStyle:NSDateFormatterNoStyle]; + return [dateFormatter stringFromDate:version]; + // return desc == nil ? NSLocalizedString(@"iLyrics.text.illegalDateFormat", @"") : desc; + } +} + +@end diff --git a/iLyrics/SearchResult.h b/iLyrics/SearchResult.h new file mode 100644 index 0000000..266b85c --- /dev/null +++ b/iLyrics/SearchResult.h @@ -0,0 +1,19 @@ +// +// SearchResult.h +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import + +@interface SearchResult : NSObject +@property NSString *name; +@property NSString *artist; +@property NSString *preview; +@property id link; + +-(id)initWithName: (NSString*) name fromArtist: (NSString*) artist preview: (NSString*) preview link: (id) link; + +@end diff --git a/iLyrics/SearchResult.m b/iLyrics/SearchResult.m new file mode 100644 index 0000000..f6eb15b --- /dev/null +++ b/iLyrics/SearchResult.m @@ -0,0 +1,25 @@ +// +// SearchResult.m +// iLyrics +// +// Created by Kim Wittenburg on 10.06.12. +// Copyright (c) 2012 __MyCompanyName__. All rights reserved. +// + +#import "SearchResult.h" + +@implementation SearchResult +@synthesize name; +@synthesize artist; +@synthesize preview; +@synthesize link; + +-(id)initWithName:(NSString *)sng fromArtist:(NSString *)art preview:(NSString *)pre link:(id)l { + name = sng; + artist = art; + preview = pre; + link = l; + return self; +} + +@end diff --git a/iLyrics/de.lproj/Credits.rtf b/iLyrics/de.lproj/Credits.rtf new file mode 100644 index 0000000..405b985 --- /dev/null +++ b/iLyrics/de.lproj/Credits.rtf @@ -0,0 +1,19 @@ +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} +{\colortbl;\red255\green255\blue255;} +\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 + +\f0\b\fs24 \cf0 Entwickelt von: +\b0 \ + Kim Wittenburg\ +\ + +\b Designed von: +\b0 \ + Kim Wittenburg\ +\ + +\b Getestet von: +\b0 \ + Kim Wittenbug} \ No newline at end of file diff --git a/iLyrics/en.lproj/Credits.rtf b/iLyrics/en.lproj/Credits.rtf index 46576ef..21fb96a 100644 --- a/iLyrics/en.lproj/Credits.rtf +++ b/iLyrics/en.lproj/Credits.rtf @@ -1,29 +1,19 @@ -{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;} +{\rtf1\ansi\ansicpg1252\cocoartf1138\cocoasubrtf470 +{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} -\paperw9840\paperh8400 -\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural +\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0 +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720 \f0\b\fs24 \cf0 Engineering: \b0 \ - Some people\ + Kim Wittenburg\ \ \b Human Interface Design: \b0 \ - Some other people\ + Kim Wittenburg\ \ \b Testing: \b0 \ - Hopefully not nobody\ -\ - -\b Documentation: -\b0 \ - Whoever\ -\ - -\b With special thanks to: -\b0 \ - Mom\ -} + Kim Wittenbug} \ No newline at end of file diff --git a/iLyrics/en.lproj/MainMenu.xib b/iLyrics/en.lproj/MainMenu.xib index ce5b9af..f26ad82 100644 --- a/iLyrics/en.lproj/MainMenu.xib +++ b/iLyrics/en.lproj/MainMenu.xib @@ -2,20 +2,41 @@ 1070 - 11C42 - 1938 - 1138.17 - 567.00 + 11E53 + 2182 + 1138.47 + 569.00 com.apple.InterfaceBuilder.CocoaPlugin - 1938 + 2182 - NSWindowTemplate - NSView + NSTableHeaderView NSMenu - NSMenuItem + NSToolbarItem + NSButton + NSToolbarFlexibleSpaceItem NSCustomObject + NSSplitView + NSTableView + NSViewController + NSCustomView + NSSearchField + NSTextField + NSSearchFieldCell + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSToolbarSpaceItem + NSView + NSOutlineView + NSToolbar + NSScrollView + NSPopover + NSTextView + NSMenuItem + NSScroller com.apple.InterfaceBuilder.CocoaPlugin @@ -698,483 +719,6 @@ - - - Format - - 2147483647 - - - submenuAction: - - Format - - - - Font - - 2147483647 - - - submenuAction: - - Font - - - - Show Fonts - t - 1048576 - 2147483647 - - - - - - Bold - b - 1048576 - 2147483647 - - - 2 - - - - Italic - i - 1048576 - 2147483647 - - - 1 - - - - Underline - u - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Bigger - + - 1048576 - 2147483647 - - - 3 - - - - Smaller - - - 1048576 - 2147483647 - - - 4 - - - - YES - YES - - - 2147483647 - - - - - - Kern - - 2147483647 - - - submenuAction: - - Kern - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Tighten - - 2147483647 - - - - - - Loosen - - 2147483647 - - - - - - - - - Ligature - - 2147483647 - - - submenuAction: - - Ligature - - - - Use Default - - 2147483647 - - - - - - Use None - - 2147483647 - - - - - - Use All - - 2147483647 - - - - - - - - - Baseline - - 2147483647 - - - submenuAction: - - Baseline - - - - Use Default - - 2147483647 - - - - - - Superscript - - 2147483647 - - - - - - Subscript - - 2147483647 - - - - - - Raise - - 2147483647 - - - - - - Lower - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Colors - C - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Copy Style - c - 1572864 - 2147483647 - - - - - - Paste Style - v - 1572864 - 2147483647 - - - - - _NSFontMenu - - - - - Text - - 2147483647 - - - submenuAction: - - Text - - - - Align Left - { - 1048576 - 2147483647 - - - - - - Center - | - 1048576 - 2147483647 - - - - - - Justify - - 2147483647 - - - - - - Align Right - } - 1048576 - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - Writing Direction - - 2147483647 - - - submenuAction: - - Writing Direction - - - - YES - Paragraph - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - YES - YES - - - 2147483647 - - - - - - YES - Selection - - 2147483647 - - - - - - CURlZmF1bHQ - - 2147483647 - - - - - - CUxlZnQgdG8gUmlnaHQ - - 2147483647 - - - - - - CVJpZ2h0IHRvIExlZnQ - - 2147483647 - - - - - - - - - YES - YES - - - 2147483647 - - - - - - Show Ruler - - 2147483647 - - - - - - Copy Ruler - c - 1310720 - 2147483647 - - - - - - Paste Ruler - v - 1310720 - 2147483647 - - - - - - - - - View @@ -1208,6 +752,91 @@ + + + iTunes + + 2147483647 + + + submenuAction: + + iTunes + + + + Run iTunes + + 2147483647 + + + + + + Quit iTunes + + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Play/Pause + + 2147483647 + + + + + + Previous Track + + 1572864 + 2147483647 + + + + + + Next Track + + 1572864 + 2147483647 + + + + + + YES + YES + + + 2147483647 + + + + + + Search Lyrics From current Song + + 1048576 + 2147483647 + + + + + + Window @@ -1258,6 +887,25 @@ + + + YES + YES + + + 2147483647 + + + + + + iLyrics + 1 + 1048576 + 2147483647 + + + _NSWindowsMenu @@ -1292,27 +940,1272 @@ 15 2 - {{335, 390}, {480, 360}} + {{471, 390}, {861, 462}} 1954021376 iLyrics NSWindow - + + + 3C5E2FC9-5A86-4216-8E48-A966E4D2ED98 + + + YES + YES + YES + YES + 1 + 1 + + + + 00575FBD-B768-428B-938D-5BB769F0FF96 + + Search + Search + + + + 268 + {{0, 14}, {96, 22}} + _NS:9 + YES + + 343014976 + 268436544 + + + LucidaGrande + 13 + 1044 + + Search... + _NS:9 + + YES + 1 + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + controlTextColor + + 3 + MAA + + + + 130560 + 0 + search + + _searchFieldSearch: + + 138690815 + 0 + + 400 + 75 + + + 130560 + 0 + clear + + + cancel + + + + + _searchFieldCancel: + + 138690815 + 0 + + 400 + 75 + + 10 + YES + + + + + + {96, 22} + {96, 22} + YES + YES + 0 + YES + 0 + + + + 5B496B66-64F2-4E7B-9926-E769A97FCF71 + + Download + Download + + + + NSImage + Download-icon + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + + + + 6DA322F2-E0F6-42F0-8E00-A5FAC1340B60 + + Get from iTunes + Get from iTunes + + + + NSImage + iTunes-icon + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + + + + 88C0A8FA-3C6C-432C-AA80-E79FE3539FD6 + + Send to iTunes + Send to iTunes + + + + + + {0, 0} + {0, 0} + YES + YES + -1 + YES + 0 + + + NSToolbarFlexibleSpaceItem + + Flexible Space + + + + + + {1, 5} + {20000, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + + + + + NSToolbarSpaceItem + + Space + + + + + + {32, 5} + {32, 32} + YES + YES + -1 + YES + 0 + + YES + YES + + + 1048576 + 2147483647 + + + + + + + + + + + + + + + + + + + + + + + + 256 + + + + 274 + + + + 264 + + + + 293 + {{118, 1}, {63, 18}} + + + + _NS:9 + YES + + -2080244224 + 131072 + Preview + + LucidaGrande + 11 + 3100 + + _NS:9 + + 1211912703 + 2 + + NSImage + NSSwitch + + + NSSwitch + + + + 200 + 25 + + + + + 289 + {{181, -1}, {120, 23}} + + + + _NS:22 + YES + + -1543373312 + 134348800 + Load more results + + _NS:22 + + -2033434369 + 162 + + + 400 + 75 + + + + + 292 + {{0, -1}, {114, 23}} + + + + _NS:22 + YES + + -2080244224 + 134348800 + Reset loaded results + + _NS:22 + + -2033434369 + 162 + + + 400 + 75 + + + + + 4370 + + + + 2304 + + + + 4352 + {299, 415} + + + + _NS:13 + YES + + + 256 + {299, 17} + + + + _NS:16 + + + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:18 + + + + song + 194.5859375 + 16 + 1000 + + 75628096 + 2048 + Song + + + 3 + MC4zMzMzMzI5ODU2AA + + + 6 + System + headerTextColor + + + + + 337772097 + 272631808 + Text + + _NS:9 + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + + 3 + YES + + + + artist + 98 + 40 + 1000 + + 75628096 + 2048 + Artist + + + + + + 337772097 + 272631808 + Text + + _NS:9 + + + + + 3 + YES + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + 1388314624 + + + 4 + 15 + 0 + YES + 0 + 1 + + + {{1, 17}, {299, 415}} + + + + _NS:11 + + + 6 + System + controlBackgroundColor + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + + _NS:58 + + _doScroller: + 37 + 0.13909779489040375 + + + + -2147483392 + {{1, 417}, {238, 15}} + + + + _NS:60 + 1 + + _doScroller: + 0.98755186721991706 + + + + 2304 + + + + {{1, 0}, {299, 17}} + + + + _NS:15 + + + 4 + + + {{0, 29}, {301, 433}} + + + + _NS:9 + 133682 + + + + + QSAAAEEgAABBmAAAQZgAAA + + + {301, 462} + + + _NS:11 + NSView + + + + 256 + + + + 274 + + + + 2304 + + + + 2322 + {520, 14} + + + + _NS:13 + + + + + + + + + + + + 134 + + + + 520 + 1 + + + 67244001 + 0 + + + + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + 1 + MCAwIDEAA + + + {8, -8} + 13 + + + + + + 2 + + 6 + {623, 10000000} + {238, 0} + + + + {{1, 1}, {520, 367}} + + + + _NS:11 + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + 3 + MCAwAA + + + + 6 + + + + 256 + {{506, 1}, {15, 361}} + + + _NS:84 + + _doScroller: + 1 + 0.85256409645080566 + + + + 256 + {{1, 353}, {514, 15}} + + + + _NS:33 + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {522, 369} + + + + _NS:9 + 133170 + + + + + + + 266 + + + + 265 + {{374, 9}, {134, 32}} + + + + _NS:9 + YES + + 604110336 + 134217728 + Download + + _NS:9 + + -2038284033 + 129 + + + 200 + 25 + + + + + 265 + {{374, 37}, {134, 32}} + + + + _NS:9 + YES + + 604110336 + 134217728 + Send to iTunes + + _NS:9 + + -2038284033 + 129 + + + 200 + 25 + + + + + 266 + {{62, 20}, {313, 17}} + + + + _NS:9 + {250, 750} + YES + + 69336641 + 272631808 + No Selection + + LucidaGrande + 13 + 16 + + _NS:9 + + + + + + + + 268 + {{17, 22}, {43, 17}} + + + + _NS:1505 + YES + + 68288064 + 272630784 + Artist: + + _NS:1505 + + + + + + + + 266 + {{62, 47}, {313, 17}} + + + + _NS:9 + {250, 750} + YES + + 69336641 + 272631808 + No Selection + + _NS:9 + + + + + + + + 268 + {{17, 47}, {40, 17}} + + + + _NS:1505 + YES + + 68288064 + 272630784 + Song: + + _NS:1505 + + + + + + + {{0, 377}, {522, 85}} + + + + _NS:9 + NSView + + + {{311, 0}, {550, 462}} + + + _NS:13 + NSView + + + {861, 462} + + + _NS:9 + YES + 3 + + + {861, 462} + + + + + {{0, 0}, {1680, 1028}} + {10000000000000, 10000000000000} + 3 + 128 + YES + + + 15 + 2 + {{163, 199}, {480, 270}} + 1685586944 + iLyrics Preferences + NSWindow + + + 256 - {480, 360} + + + + 268 + {{18, 234}, {233, 18}} + + + _NS:9 + YES + + -2080244224 + 0 + Quit when all windows are closed + + _NS:9 + + 1211912703 + 2 + + + + + 200 + 25 + + + + + 268 + + + + 2304 + + + + 256 + {438, 171} + + + _NS:13 + YES + + + 256 + {438, 17} + + + + + + -2147483392 + {{224, 0}, {16, 17}} + + _NS:19 + + + + hoster + 272.64453125 + 40 + 1000 + + 75628096 + 2048 + Lyrics Hoster + + + 3 + MC4zMzMzMzI5ODU2AA + + + + + 337772097 + 272631808 + Text + + _NS:9 + + + + + 3 + YES + + + + version + 158.62890625 + 10 + 3.4028234663852886e+38 + + 75628096 + 2048 + Version + + + 6 + System + headerColor + + + + + + 337772097 + 272631808 + Text + + _NS:9 + + + + + 3 + YES + + + + 3 + 2 + + + 17 + -692060160 + + + 2 + 15 + 0 + YES + 0 + 1 + + + {{1, 17}, {438, 171}} + + + _NS:11 + + + 4 + + + + -2147483392 + {{224, 17}, {15, 102}} + + + _NS:58 + + _doScroller: + 0.9941860465116279 + + + + -2147483392 + {{1, 173}, {438, 15}} + + _NS:60 + 1 + + _doScroller: + 0.97986577181208057 + + + + 2304 + + + + {{1, 0}, {438, 17}} + + + + + 4 + + + {{20, 14}, {440, 189}} + + + _NS:9 + 133682 + + + + + QSAAAEEgAABBmAAAQZgAAA + + + + 268 + {{17, 211}, {93, 17}} + + + _NS:1505 + YES + + 68288064 + 272630784 + Lyrics Hosters + + _NS:1505 + + + + + + + {480, 270} + + _NS:20 - {{0, 0}, {1920, 1178}} + {{0, 0}, {1680, 1028}} {10000000000000, 10000000000000} YES + + + + 268 + + + + 268 + {{195, -1}, {108, 19}} + + _NS:9 + YES + + -2080244224 + 134217728 + Done + + LucidaGrande + 12 + 16 + + _NS:9 + + -2038152961 + 164 + + + 400 + 75 + + + + + 256 + + + + 2304 + + + + 2322 + {301, 14} + + + _NS:13 + + + + + + + + + + + + 134 + + + + 301 + 1 + + + 67112865 + 0 + + + + + + + + + + + + + + + 0 + + 6 + {463, 10000000} + {223, 0} + + + + {{1, 1}, {301, 170}} + + + _NS:11 + + + + {4, 5} + + 79691776 + + + + + + file://localhost/Applications/Xcode.app/Contents/SharedFrameworks/DVTKit.framework/Resources/DVTIbeamCursor.tiff + + + + + + + 4 + + + + 256 + {{287, 1}, {15, 170}} + + + _NS:84 + + _doScroller: + 1 + 0.85256409645080566 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + _NS:33 + 1 + + _doScroller: + 1 + 0.94565218687057495 + + + {{0, 20}, {303, 172}} + + + _NS:9 + 133138 + + + + + + {303, 192} + + _NS:9 + NSView + + + + 0 + 1 + 0.0 + 0.0 + YES + AppDelegate NSFontManager + + MainController + + + PreferencesController + @@ -1492,14 +2385,6 @@ 240 - - - performFindPanelAction: - - - - 241 - centerSelectionInVisibleArea: @@ -1612,134 +2497,6 @@ 374 - - - raiseBaseline: - - - - 426 - - - - lowerBaseline: - - - - 427 - - - - copyFont: - - - - 428 - - - - subscript: - - - - 429 - - - - superscript: - - - - 430 - - - - tightenKerning: - - - - 431 - - - - underline: - - - - 432 - - - - orderFrontColorPanel: - - - - 433 - - - - useAllLigatures: - - - - 434 - - - - loosenKerning: - - - - 435 - - - - pasteFont: - - - - 436 - - - - unscript: - - - - 437 - - - - useStandardKerning: - - - - 438 - - - - useStandardLigatures: - - - - 439 - - - - turnOffLigatures: - - - - 440 - - - - turnOffKerning: - - - - 441 - toggleAutomaticSpellingCorrection: @@ -1836,110 +2593,6 @@ 493 - - - alignCenter: - - - - 518 - - - - pasteRuler: - - - - 519 - - - - toggleRuler: - - - - 520 - - - - alignRight: - - - - 521 - - - - copyRuler: - - - - 522 - - - - alignJustified: - - - - 523 - - - - alignLeft: - - - - 524 - - - - makeBaseWritingDirectionNatural: - - - - 525 - - - - makeBaseWritingDirectionLeftToRight: - - - - 526 - - - - makeBaseWritingDirectionRightToLeft: - - - - 527 - - - - makeTextWritingDirectionNatural: - - - - 528 - - - - makeTextWritingDirectionLeftToRight: - - - - 529 - - - - makeTextWritingDirectionRightToLeft: - - - - 530 - performFindPanelAction: @@ -1950,43 +2603,19 @@ - addFontTrait: - - + performFindPanelAction: + + - 421 + 241 - - addFontTrait: - - + + delegate + + - 422 - - - - modifyFont: - - - - 423 - - - - orderFrontFontPanel: - - - - 424 - - - - modifyFont: - - - - 425 + 609 @@ -1996,12 +2625,348 @@ 532 + + + playPauseiTunes: + + + + 1223 + + + + previousTrack: + + + + 1224 + + + + nextTrack: + + + + 1225 + + + + quitiTunes: + + + + 1229 + + + + runiTunes: + + + + 1230 + + + + preferencesWindow + + + + 1335 + + + + quitWhenAllWindowClosedCheckBox + + + + 1842 + + + + preferencesController + + + + 1900 + + + + mainController + + + + 1909 + + + + iLyricsMenuItem + + + + 607 + + + + window + + + + 608 + + + + downloadLyrics: + + + + 1201 + + + + searchField + + + + 1236 + + + + startNewSearch: + + + + 1237 + + + + sendLyricsToiTunes: + + + + 1378 + + + + showiLyricsWindow: + + + + 1560 + + + + getCurrentiTunesSong: + + + + 1561 + + + + getCurrentiTunesSong: + + + + 1562 + + + + previewPopover + + + + 1579 + + + + previewTextArea + + + + 1580 + + + + downloadLyricsButton + + + + 1446 + + + + artistLabel + + + + 751 + + + + downloadLyrics: + + + + 1445 + + + + sendLyricsToiTunes: + + + + 1379 + + + + songLabel + + + + 750 + + + + sendToiTunesButton + + + + 1233 + + + + lyricsArea + + + + 1190 + + + + resultsOutline + + + + 829 + + + + lyricsSelectionChanged: + + + + 884 + + + + resetLoadedResults: + + + + 1551 + + + + loadMoreResultsButton + + + + 1905 + + + + loadNextResults: + + + + 1552 + + + + showPreviewCheckBox + + + + 1799 + + + + delegate + + + + 1553 + + + + dataSource + + + + 592 + + + + delegate + + + + 828 + + + + makeKeyAndOrderFront: + + + + 1899 + + + + view + + + + 1578 + + + + contentViewController + + + + 1565 + + + + performClose: + + + + 1614 + + + + dataSource + + + + 1898 + + + + hosterTable + + + + 1901 + 0 - + @@ -2032,8 +2997,8 @@ - + @@ -2390,6 +3355,8 @@ + + @@ -2514,244 +3481,18 @@ + 372 + + + - - 375 - - - - - - - - 376 - - - - - - - - - 377 - - - - - - - - 388 - - - - - - - - - - - - - - - - - - - - - - - 389 - - - - - 390 - - - - - 391 - - - - - 392 - - - - - 393 - - - - - 394 - - - - - 395 - - - - - 396 - - - - - 397 - - - - - - - - 398 - - - - - - - - 399 - - - - - - - - 400 - - - - - 401 - - - - - 402 - - - - - 403 - - - - - 404 - - - - - 405 - - - - - - - - - - - - 406 - - - - - 407 - - - - - 408 - - - - - 409 - - - - - 410 - - - - - 411 - - - - - - - - - - 412 - - - - - 413 - - - - - 414 - - - - - 415 - - - - - - - - - - - 416 - - - - - 417 - - - - - 418 - - - - - 419 - - - 420 @@ -2851,157 +3592,589 @@ - - 496 - - - - - - - - 497 - - - - - - - - - - - - - - - - - 498 - - - - - 499 - - - - - 500 - - - - - 501 - - - - - 502 - - - - - 503 - - - - - - - - 504 - - - - - 505 - - - - - 506 - - - - - 507 - - - - - 508 - - - - - - - - - - - - - - - - 509 - - - - - 510 - - - - - 511 - - - - - 512 - - - - - 513 - - - - - 514 - - - - - 515 - - - - - 516 - - - - - 517 - - - 534 + + 536 + + + + + 593 + + + + + + + + + + + + + 594 + + + + + 597 + + + + + 599 + + + + + 600 + + + + + 601 + + + + + 604 + + + + + + + + 602 + + + + + + + + 603 + + + + + 605 + + + + + 606 + + + + + 1205 + + + + + + + + 1206 + + + + + + + + + + + + + + + 1207 + + + + + 1208 + + + + + 1210 + + + + + 1212 + + + + + 1213 + + + + + 1215 + + + + + 1216 + + + + + 1219 + + + + + 1238 + + + + + + + + 1239 + + + + + + + + + + 1563 + + + Popover View Controller + + + 1564 + + + + + 1566 + + + + + + + + + 1567 + + + + + + + + + + 1568 + + + + + 1569 + + + + + 1570 + + + + + 1586 + + + + + + + + 1587 + + + + + 1838 + + + + + + + + 1839 + + + + + 1843 + + + + + + + + + + + 1844 + + + + + + + + + 1845 + + + + + 1847 + + + + + 1848 + + + + + + + + 1856 + + + + + + + + 1857 + + + + + 1879 + + + + + + + + 1895 + + + + + 1896 + + + + + 1897 + + + + + 1904 + + + + + 1910 + + + + + + + + + 1911 + + + + + + + + + + + 1912 + + + + + + + + + 908 + + + + + + + + + + + + + 1432 + + + + + + + + 659 + + + + + + + + 653 + + + + + + + + 615 + + + + + + + + 620 + + + + + + + + 832 + + + + + + + + 833 + + + + + 621 + + + + + 616 + + + + + 654 + + + + + 660 + + + + + 1433 + + + + + 1102 + + + + + + + + + + 1105 + + + + + 1104 + + + + + 1103 + + + + + 548 + + + + + + + + + + + 549 + + + + + + + + + 553 + + + + + + + + 1191 + + + + + 554 + + + + + + + + 1192 + + + + + 550 + + + + + 551 + + + + + 552 + + + + + 1473 + + + + + + + + 1474 + + + + + 1477 + + + + + + + + 1478 + + + + + 1615 + + + + + + + + 1616 + + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3011,11 +4184,46 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3058,45 +4266,12 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin {{380, 496}, {480, 360}} com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3114,33 +4289,38 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -3151,1423 +4331,225 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - 535 + 2512 - - ABCardController - NSObject - - id - id - id - id - id - id - id - - - - addCardViewField: - id - - - copy: - id - - - cut: - id - - - doDelete: - id - - - find: - id - - - paste: - id - - - saveChanges: - id - - - - ABCardView - NSButton - NSManagedObjectContext - NSSearchField - NSTextField - NSWindow - - - - mCardView - ABCardView - - - mEditButton - NSButton - - - mManagedObjectContext - NSManagedObjectContext - - - mSearchField - NSSearchField - - - mStatusTextField - NSTextField - - - mWindow - NSWindow - - - - IBProjectSource - ./Classes/ABCardController.h - - - - ABCardView - NSView - - id - id - - - - commitAndSave: - id - - - statusImageClicked: - id - - - - NSImageView - NSView - ABNameFrameView - NSView - NSImage - ABImageView - - - - mBuddyStatusImage - NSImageView - - - mHeaderView - NSView - - - mNameView - ABNameFrameView - - - mNextKeyView - NSView - - - mUserImage - NSImage - - - mUserImageView - ABImageView - - - - IBProjectSource - ./Classes/ABCardView.h - - - - ABImageView - NSImageView - - id - id - id - id - - - - copy: - id - - - cut: - id - - - delete: - id - - - paste: - id - - - - IBProjectSource - ./Classes/ABImageView.h - - - - DVTAutoLayoutView - NSView - - IBProjectSource - ./Classes/DVTAutoLayoutView.h - - - - DVTBorderedView - DVTAutoLayoutView - - contentView - NSView - - - contentView - - contentView - NSView - - - - IBProjectSource - ./Classes/DVTBorderedView.h - - - - DVTDelayedMenuButton - NSButton - - IBProjectSource - ./Classes/DVTDelayedMenuButton.h - - - - DVTGradientImageButton - NSButton - - IBProjectSource - ./Classes/DVTGradientImageButton.h - - - - DVTImageAndTextCell - NSTextFieldCell - - IBProjectSource - ./Classes/DVTImageAndTextCell.h - - - - DVTImageAndTextColumn - NSTableColumn - - IBProjectSource - ./Classes/DVTImageAndTextColumn.h - - - - DVTOutlineView - NSOutlineView - - IBProjectSource - ./Classes/DVTOutlineView.h - - - - DVTSplitView - NSSplitView - - IBProjectSource - ./Classes/DVTSplitView.h - - - - DVTStackView - DVTAutoLayoutView - - IBProjectSource - ./Classes/DVTStackView.h - - - - DVTViewController - NSViewController - - IBProjectSource - ./Classes/DVTViewController.h - - - - HFController - NSObject - - selectAll: - id - - - selectAll: - - selectAll: - id - - - - IBProjectSource - ./Classes/HFController.h - - - - HFRepresenterTextView - NSView - - selectAll: - id - - - selectAll: - - selectAll: - id - - - - IBProjectSource - ./Classes/HFRepresenterTextView.h - - - - IBEditor - NSObject - - id - id - id - - - - changeFont: - id - - - selectAll: - id - - - sizeSelectionToFit: - id - - - - IBProjectSource - ./Classes/IBEditor.h - - - - IDECapsuleListView - DVTStackView - - dataSource - id - - - dataSource - - dataSource - id - - - - IBProjectSource - ./Classes/IDECapsuleListView.h - - - - IDEDMArrayController - NSArrayController - - IBProjectSource - ./Classes/IDEDMArrayController.h - - - - IDEDMEditor - IDEEditor - - DVTBorderedView - NSView - IDEDMEditorSourceListController - DVTSplitView - - - - bottomToolbarBorderView - DVTBorderedView - - - sourceListSplitViewPane - NSView - - - sourceListViewController - IDEDMEditorSourceListController - - - splitView - DVTSplitView - - - - IBProjectSource - ./Classes/IDEDMEditor.h - - - - IDEDMEditorController - IDEViewController - - IBProjectSource - ./Classes/IDEDMEditorController.h - - - - IDEDMEditorSourceListController - IDEDMEditorController - - DVTBorderedView - IDEDMEditor - DVTImageAndTextColumn - DVTOutlineView - NSTreeController - - - - borderedView - DVTBorderedView - - - parentEditor - IDEDMEditor - - - primaryColumn - DVTImageAndTextColumn - - - sourceListOutlineView - DVTOutlineView - - - sourceListTreeController - NSTreeController - - - - IBProjectSource - ./Classes/IDEDMEditorSourceListController.h - - - - IDEDMHighlightImageAndTextCell - DVTImageAndTextCell - - IBProjectSource - ./Classes/IDEDMHighlightImageAndTextCell.h - - - - IDEDataModelBrowserEditor - IDEDMEditorController - - IDEDataModelPropertiesTableController - IDECapsuleListView - NSArrayController - IDEDataModelPropertiesTableController - IDEDataModelEntityContentsEditor - IDEDataModelPropertiesTableController - - - - attributesTableViewController - IDEDataModelPropertiesTableController - - - capsuleView - IDECapsuleListView - - - entityArrayController - NSArrayController - - - fetchedPropertiesTableViewController - IDEDataModelPropertiesTableController - - - parentEditor - IDEDataModelEntityContentsEditor - - - relationshipsTableViewController - IDEDataModelPropertiesTableController - - - - IBProjectSource - ./Classes/IDEDataModelBrowserEditor.h - - - - IDEDataModelConfigurationEditor - IDEDMEditorController - - IDECapsuleListView - IDEDataModelEditor - IDEDataModelConfigurationTableController - - - - capsuleListView - IDECapsuleListView - - - parentEditor - IDEDataModelEditor - - - tableController - IDEDataModelConfigurationTableController - - - - IBProjectSource - ./Classes/IDEDataModelConfigurationEditor.h - - - - IDEDataModelConfigurationTableController - IDEDMEditorController - - NSArrayController - NSArrayController - IDEDataModelConfigurationEditor - XDTableView - - - - configurationsArrayController - NSArrayController - - - entitiesArrayController - NSArrayController - - - parentEditor - IDEDataModelConfigurationEditor - - - tableView - XDTableView - - - - IBProjectSource - ./Classes/IDEDataModelConfigurationTableController.h - - - - IDEDataModelDiagramEditor - IDEDMEditorController - - XDDiagramView - IDEDataModelEntityContentsEditor - - - - diagramView - XDDiagramView - - - parentEditor - IDEDataModelEntityContentsEditor - - - - IBProjectSource - ./Classes/IDEDataModelDiagramEditor.h - - - - IDEDataModelEditor - IDEDMEditor - - DVTDelayedMenuButton - DVTDelayedMenuButton - NSSegmentedControl - IDEDataModelConfigurationEditor - IDEDataModelEntityContentsEditor - IDEDataModelFetchRequestEditor - NSSegmentedControl - NSTabView - - - - addEntityButton - DVTDelayedMenuButton - - - addPropertyButton - DVTDelayedMenuButton - - - browserDiagramSegmentControl - NSSegmentedControl - - - configurationViewController - IDEDataModelConfigurationEditor - - - entityContentsViewController - IDEDataModelEntityContentsEditor - - - fetchRequestViewController - IDEDataModelFetchRequestEditor - - - hierarchySegmentControl - NSSegmentedControl - - - tabView - NSTabView - - - - IBProjectSource - ./Classes/IDEDataModelEditor.h - - - - IDEDataModelEntityContentsEditor - IDEDMEditorController - - IDEDataModelBrowserEditor - IDEDataModelDiagramEditor - IDEDataModelEditor - NSTabView - - - - browserViewController - IDEDataModelBrowserEditor - - - diagramViewController - IDEDataModelDiagramEditor - - - parentEditor - IDEDataModelEditor - - - tabView - NSTabView - - - - IBProjectSource - ./Classes/IDEDataModelEntityContentsEditor.h - - - - IDEDataModelFetchRequestEditor - IDEDMEditorController - - NSArrayController - IDEDataModelEditor - IDECapsuleListView - - - - entityController - NSArrayController - - - parentEditor - IDEDataModelEditor - - - tableView - IDECapsuleListView - - - - IBProjectSource - ./Classes/IDEDataModelFetchRequestEditor.h - - - - IDEDataModelPropertiesTableController - IDEDMEditorController - - IDEDMArrayController - NSTableColumn - NSArrayController - IDEDataModelBrowserEditor - IDEDMHighlightImageAndTextCell - XDTableView - - - - arrayController - IDEDMArrayController - - - entitiesColumn - NSTableColumn - - - entityArrayController - NSArrayController - - - parentEditor - IDEDataModelBrowserEditor - - - propertyNameAndImageCell - IDEDMHighlightImageAndTextCell - - - tableView - XDTableView - - - - IBProjectSource - ./Classes/IDEDataModelPropertiesTableController.h - - - - IDEDocSetOutlineView - NSOutlineView - - IBProjectSource - ./Classes/IDEDocSetOutlineView.h - - - - IDEDocSetOutlineViewController - NSObject - - id - id - id - id - id - - - - getDocSetAction: - id - - - showProblemInfoForUpdate: - id - - - subscribeToPublisherAction: - id - - - unsubscribeFromPublisher: - id - - - updateDocSetAction: - id - - - - docSetOutlineView - IDEDocSetOutlineView - - - docSetOutlineView - - docSetOutlineView - IDEDocSetOutlineView - - - - IBProjectSource - ./Classes/IDEDocSetOutlineViewController.h - - - - IDEDocViewingPrefPaneController - IDEViewController - - id - id - id - id - id - id - id - id - id - - - - addSubscription: - id - - - checkForAndInstallUpdatesNow: - id - - - minimumFontSizeComboBoxAction: - id - - - minimumFontSizeEnabledAction: - id - - - showHelp: - id - - - showSubscriptionSheet: - id - - - subscriptionCancelAction: - id - - - toggleAutoCheckForAndInstallUpdates: - id - - - toggleDocSetInfo: - id - - - - DVTGradientImageButton - DVTGradientImageButton - DVTGradientImageButton - NSSplitView - NSView - NSView - DVTBorderedView - DVTBorderedView - NSButton - NSTextView - IDEDocSetOutlineViewController - NSComboBox - NSTextField - NSButton - NSTextField - NSWindow - NSButton - - - - _addButton - DVTGradientImageButton - - - _deleteButton - DVTGradientImageButton - - - _showInfoAreaButton - DVTGradientImageButton - - - _splitView - NSSplitView - - - _splitViewDocSetInfoSubview - NSView - - - _splitViewDocSetsListSubview - NSView - - - borderedViewAroundSplitView - DVTBorderedView - - - borderedViewBelowTable - DVTBorderedView - - - checkAndInstallNowButton - NSButton - - - docSetInfoTextView - NSTextView - - - docSetOutlineViewController - IDEDocSetOutlineViewController - - - minimumFontSizeControl - NSComboBox - - - noUpdatesAvailableMessage - NSTextField - - - showInfoButton - NSButton - - - subscriptionTextField - NSTextField - - - subscriptionWindow - NSWindow - - - validateAddSubscriptionButton - NSButton - - - - IBProjectSource - ./Classes/IDEDocViewingPrefPaneController.h - - - - IDEEditor - IDEViewController - - IBProjectSource - ./Classes/IDEEditor.h - - - - IDEViewController - DVTViewController - - IBProjectSource - ./Classes/IDEViewController.h - - - - IKImageView - - id - id - id - id - - - - copy: - id - - - crop: - id - - - cut: - id - - - paste: - id - - - - IBProjectSource - ./Classes/IKImageView.h - - - - NSDocument - - id - id - id - id - id - id - - - - printDocument: - id - - - revertDocumentToSaved: - id - - - runPageLayout: - id - - - saveDocument: - id - - - saveDocumentAs: - id - - - saveDocumentTo: - id - - - - IBProjectSource - ./Classes/NSDocument.h - - - - QLPreviewBubble - NSObject - - id - id - - - - hide: - id - - - show: - id - - - - parentWindow - NSWindow - - - parentWindow - - parentWindow - NSWindow - - - - IBProjectSource - ./Classes/QLPreviewBubble.h - - - - QTMovieView - - id - id - id - id - id - - - - showAll: - id - - - showCustomButton: - id - - - toggleLoops: - id - - - zoomIn: - id - - - zoomOut: - id - - - - IBProjectSource - ./Classes/QTMovieView.h - - - - WebView - - id - id - id - id - - - - reloadFromOrigin: - id - - - resetPageZoom: - id - - - zoomPageIn: - id - - - zoomPageOut: - id - - - - IBProjectSource - ./Classes/WebView.h - - - - XDDiagramView - NSView - - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - id - - - - _graphLayouterMenuItemAction: - id - - - _zoomPopUpButtonAction: - id - - - alignBottomEdges: - id - - - alignCentersHorizontallyInContainer: - id - - - alignCentersVerticallyInContainer: - id - - - alignHorizontalCenters: - id - - - alignLeftEdges: - id - - - alignRightEdges: - id - - - alignTopEdges: - id - - - alignVerticalCenters: - id - - - bringToFront: - id - - - collapseAllCompartments: - id - - - copy: - id - - - cut: - id - - - delete: - id - - - deleteBackward: - id - - - deleteForward: - id - - - deselectAll: - id - - - diagramZoomIn: - id - - - diagramZoomOut: - id - - - expandAllCompartments: - id - - - flipHorizontally: - id - - - flipVertically: - id - - - layoutGraphicsConcentrically: - id - - - layoutGraphicsHierarchically: - id - - - lock: - id - - - makeSameHeight: - id - - - makeSameWidth: - id - - - moveDown: - id - - - moveDownAndModifySelection: - id - - - moveLeft: - id - - - moveLeftAndModifySelection: - id - - - moveRight: - id - - - moveRightAndModifySelection: - id - - - moveUp: - id - - - moveUpAndModifySelection: - id - - - paste: - id - - - rollDownAllCompartments: - id - - - rollUpAllCompartments: - id - - - selectAll: - id - - - sendToBack: - id - - - sizeToFit: - id - - - toggleGridShown: - id - - - toggleHiddenGraphicsShown: - id - - - togglePageBreaksShown: - id - - - toggleRuler: - id - - - toggleSnapsToGrid: - id - - - unlock: - id - - - - _diagramController - IDEDataModelDiagramEditor - - - _diagramController - - _diagramController - IDEDataModelDiagramEditor - - - - IBProjectSource - ./Classes/XDDiagramView.h - - - - XDTableView - NSTableView - - showAllTableColumns: - id - - - showAllTableColumns: - - showAllTableColumns: - id - - - - IBProjectSource - ./Classes/XDTableView.h - - AppDelegate NSObject - id - id + id + id + id + id + id - - applicationShouldTerminate: + + nextTrack: id - - applicationWillFinishLaunching: + + playPauseiTunes: id + + previousTrack: + id + + + quitiTunes: + id + + + runiTunes: + id + + + + MainController + PreferencesController + NSWindow + NSButton + NSWindow + + + + mainController + MainController + + + preferencesController + PreferencesController + + + preferencesWindow + NSWindow + + + quitWhenAllWindowClosedCheckBox + NSButton + + + window + NSWindow + IBProjectSource ./Classes/AppDelegate.h + + MainController + NSObject + + id + id + id + NSOutlineView + id + id + id + id + + + + downloadLyrics: + id + + + getCurrentiTunesSong: + id + + + loadNextResults: + id + + + lyricsSelectionChanged: + NSOutlineView + + + resetLoadedResults: + id + + + sendLyricsToiTunes: + id + + + showiLyricsWindow: + id + + + startNewSearch: + id + + + + NSTextField + NSButton + NSMenuItem + NSButton + NSTextView + NSPopover + NSTextView + NSOutlineView + NSSearchField + NSButton + NSButton + NSTextField + NSWindow + + + + artistLabel + NSTextField + + + downloadLyricsButton + NSButton + + + iLyricsMenuItem + NSMenuItem + + + loadMoreResultsButton + NSButton + + + lyricsArea + NSTextView + + + previewPopover + NSPopover + + + previewTextArea + NSTextView + + + resultsOutline + NSOutlineView + + + searchField + NSSearchField + + + sendToiTunesButton + NSButton + + + showPreviewCheckBox + NSButton + + + songLabel + NSTextField + + + window + NSWindow + + + + IBProjectSource + ./Classes/MainController.h + + + + PreferencesController + NSObject + + hosterTable + NSTableView + + + hosterTable + + hosterTable + NSTableView + + + + IBProjectSource + ./Classes/PreferencesController.h + + 0 @@ -4579,9 +4561,11 @@ YES 3 - {9, 8} - {7, 2} + {256, 256} + {11, 11} + {10, 3} + {15, 15} + {512, 512} - YES diff --git a/iLyrics/iLyrics-Info.plist b/iLyrics/iLyrics-Info.plist index a4be5b4..8a0ac83 100644 --- a/iLyrics/iLyrics-Info.plist +++ b/iLyrics/iLyrics-Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIconFile - + iLyrics.icns CFBundleIdentifier wittenburg.kim.${PRODUCT_NAME:rfc1034identifier} CFBundleInfoDictionaryVersion diff --git a/iLyrics/iTunes.h b/iLyrics/iTunes.h new file mode 100644 index 0000000..5da6f8d --- /dev/null +++ b/iLyrics/iTunes.h @@ -0,0 +1,506 @@ +/* + * iTunes.h + */ + +#import +#import + + +@class iTunesPrintSettings, iTunesApplication, iTunesItem, iTunesArtwork, iTunesEncoder, iTunesEQPreset, iTunesPlaylist, iTunesAudioCDPlaylist, iTunesDevicePlaylist, iTunesLibraryPlaylist, iTunesRadioTunerPlaylist, iTunesSource, iTunesTrack, iTunesAudioCDTrack, iTunesDeviceTrack, iTunesFileTrack, iTunesSharedTrack, iTunesURLTrack, iTunesUserPlaylist, iTunesFolderPlaylist, iTunesVisual, iTunesWindow, iTunesBrowserWindow, iTunesEQWindow, iTunesPlaylistWindow; + +enum iTunesEKnd { + iTunesEKndTrackListing = 'kTrk' /* a basic listing of tracks within a playlist */, + iTunesEKndAlbumListing = 'kAlb' /* a listing of a playlist grouped by album */, + iTunesEKndCdInsert = 'kCDi' /* a printout of the playlist for jewel case inserts */ +}; +typedef enum iTunesEKnd iTunesEKnd; + +enum iTunesEnum { + iTunesEnumStandard = 'lwst' /* Standard PostScript error handling */, + iTunesEnumDetailed = 'lwdt' /* print a detailed report of PostScript errors */ +}; +typedef enum iTunesEnum iTunesEnum; + +enum iTunesEPlS { + iTunesEPlSStopped = 'kPSS', + iTunesEPlSPlaying = 'kPSP', + iTunesEPlSPaused = 'kPSp', + iTunesEPlSFastForwarding = 'kPSF', + iTunesEPlSRewinding = 'kPSR' +}; +typedef enum iTunesEPlS iTunesEPlS; + +enum iTunesERpt { + iTunesERptOff = 'kRpO', + iTunesERptOne = 'kRp1', + iTunesERptAll = 'kAll' +}; +typedef enum iTunesERpt iTunesERpt; + +enum iTunesEVSz { + iTunesEVSzSmall = 'kVSS', + iTunesEVSzMedium = 'kVSM', + iTunesEVSzLarge = 'kVSL' +}; +typedef enum iTunesEVSz iTunesEVSz; + +enum iTunesESrc { + iTunesESrcLibrary = 'kLib', + iTunesESrcIPod = 'kPod', + iTunesESrcAudioCD = 'kACD', + iTunesESrcMP3CD = 'kMCD', + iTunesESrcDevice = 'kDev', + iTunesESrcRadioTuner = 'kTun', + iTunesESrcSharedLibrary = 'kShd', + iTunesESrcUnknown = 'kUnk' +}; +typedef enum iTunesESrc iTunesESrc; + +enum iTunesESrA { + iTunesESrAAlbums = 'kSrL' /* albums only */, + iTunesESrAAll = 'kAll' /* all text fields */, + iTunesESrAArtists = 'kSrR' /* artists only */, + iTunesESrAComposers = 'kSrC' /* composers only */, + iTunesESrADisplayed = 'kSrV' /* visible text fields */, + iTunesESrASongs = 'kSrS' /* song names only */ +}; +typedef enum iTunesESrA iTunesESrA; + +enum iTunesESpK { + iTunesESpKNone = 'kNon', + iTunesESpKBooks = 'kSpA', + iTunesESpKFolder = 'kSpF', + iTunesESpKGenius = 'kSpG', + iTunesESpKITunesU = 'kSpU', + iTunesESpKLibrary = 'kSpL', + iTunesESpKMovies = 'kSpI', + iTunesESpKMusic = 'kSpZ', + iTunesESpKPartyShuffle = 'kSpS', + iTunesESpKPodcasts = 'kSpP', + iTunesESpKPurchasedMusic = 'kSpM', + iTunesESpKTVShows = 'kSpT' +}; +typedef enum iTunesESpK iTunesESpK; + +enum iTunesEVdK { + iTunesEVdKNone = 'kNon' /* not a video or unknown video kind */, + iTunesEVdKMovie = 'kVdM' /* movie track */, + iTunesEVdKMusicVideo = 'kVdV' /* music video track */, + iTunesEVdKTVShow = 'kVdT' /* TV show track */ +}; +typedef enum iTunesEVdK iTunesEVdK; + +enum iTunesERtK { + iTunesERtKUser = 'kRtU' /* user-specified rating */, + iTunesERtKComputed = 'kRtC' /* iTunes-computed rating */ +}; +typedef enum iTunesERtK iTunesERtK; + + + +/* + * Standard Suite + */ + +@interface iTunesPrintSettings : SBObject + +@property (readonly) NSInteger copies; // the number of copies of a document to be printed +@property (readonly) BOOL collating; // Should printed copies be collated? +@property (readonly) NSInteger startingPage; // the first page of the document to be printed +@property (readonly) NSInteger endingPage; // the last page of the document to be printed +@property (readonly) NSInteger pagesAcross; // number of logical pages laid across a physical page +@property (readonly) NSInteger pagesDown; // number of logical pages laid out down a physical page +@property (readonly) iTunesEnum errorHandling; // how errors are handled +@property (copy, readonly) NSDate *requestedPrintTime; // the time at which the desktop printer should print the document +@property (copy, readonly) NSArray *printerFeatures; // printer specific options +@property (copy, readonly) NSString *faxNumber; // for fax number +@property (copy, readonly) NSString *targetPrinter; // for target printer + +- (void) printPrintDialog:(BOOL)printDialog withProperties:(iTunesPrintSettings *)withProperties kind:(iTunesEKnd)kind theme:(NSString *)theme; // Print the specified object(s) +- (void) close; // Close an object +- (void) delete; // Delete an element from an object +- (SBObject *) duplicateTo:(SBObject *)to; // Duplicate one or more object(s) +- (BOOL) exists; // Verify if an object exists +- (void) open; // open the specified object(s) +- (void) playOnce:(BOOL)once; // play the current track or the specified track or file. + +@end + + + +/* + * iTunes Suite + */ + +// The application program +@interface iTunesApplication : SBApplication + +- (SBElementArray *) browserWindows; +- (SBElementArray *) encoders; +- (SBElementArray *) EQPresets; +- (SBElementArray *) EQWindows; +- (SBElementArray *) playlistWindows; +- (SBElementArray *) sources; +- (SBElementArray *) visuals; +- (SBElementArray *) windows; + +@property (copy) iTunesEncoder *currentEncoder; // the currently selected encoder (MP3, AIFF, WAV, etc.) +@property (copy) iTunesEQPreset *currentEQPreset; // the currently selected equalizer preset +@property (copy, readonly) iTunesPlaylist *currentPlaylist; // the playlist containing the currently targeted track +@property (copy, readonly) NSString *currentStreamTitle; // the name of the current song in the playing stream (provided by streaming server) +@property (copy, readonly) NSString *currentStreamURL; // the URL of the playing stream or streaming web site (provided by streaming server) +@property (copy, readonly) iTunesTrack *currentTrack; // the current targeted track +@property (copy) iTunesVisual *currentVisual; // the currently selected visual plug-in +@property BOOL EQEnabled; // is the equalizer enabled? +@property BOOL fixedIndexing; // true if all AppleScript track indices should be independent of the play order of the owning playlist. +@property BOOL frontmost; // is iTunes the frontmost application? +@property BOOL fullScreen; // are visuals displayed using the entire screen? +@property (copy, readonly) NSString *name; // the name of the application +@property BOOL mute; // has the sound output been muted? +@property NSInteger playerPosition; // the player’s position within the currently playing track in seconds. +@property (readonly) iTunesEPlS playerState; // is iTunes stopped, paused, or playing? +@property (copy, readonly) SBObject *selection; // the selection visible to the user +@property NSInteger soundVolume; // the sound output volume (0 = minimum, 100 = maximum) +@property (copy, readonly) NSString *version; // the version of iTunes +@property BOOL visualsEnabled; // are visuals currently being displayed? +@property iTunesEVSz visualSize; // the size of the displayed visual + +- (void) printPrintDialog:(BOOL)printDialog withProperties:(iTunesPrintSettings *)withProperties kind:(iTunesEKnd)kind theme:(NSString *)theme; // Print the specified object(s) +- (void) run; // run iTunes +- (void) quit; // quit iTunes +- (iTunesTrack *) add:(NSArray *)x to:(SBObject *)to; // add one or more files to a playlist +- (void) backTrack; // reposition to beginning of current track or go to previous track if already at start of current track +- (iTunesTrack *) convert:(NSArray *)x; // convert one or more files or tracks +- (void) fastForward; // skip forward in a playing track +- (void) nextTrack; // advance to the next track in the current playlist +- (void) pause; // pause playback +- (void) playOnce:(BOOL)once; // play the current track or the specified track or file. +- (void) playpause; // toggle the playing/paused state of the current track +- (void) previousTrack; // return to the previous track in the current playlist +- (void) resume; // disable fast forward/rewind and resume playback, if playing. +- (void) rewind; // skip backwards in a playing track +- (void) stop; // stop playback +- (void) update; // update the specified iPod +- (void) eject; // eject the specified iPod +- (void) subscribe:(NSString *)x; // subscribe to a podcast feed +- (void) updateAllPodcasts; // update all subscribed podcast feeds +- (void) updatePodcast; // update podcast feed +- (void) openLocation:(NSString *)x; // Opens a Music Store or audio stream URL + +@end + +// an item +@interface iTunesItem : SBObject + +@property (copy, readonly) SBObject *container; // the container of the item +- (NSInteger) id; // the id of the item +@property (readonly) NSInteger index; // The index of the item in internal application order. +@property (copy) NSString *name; // the name of the item +@property (copy, readonly) NSString *persistentID; // the id of the item as a hexidecimal string. This id does not change over time. + +- (void) printPrintDialog:(BOOL)printDialog withProperties:(iTunesPrintSettings *)withProperties kind:(iTunesEKnd)kind theme:(NSString *)theme; // Print the specified object(s) +- (void) close; // Close an object +- (void) delete; // Delete an element from an object +- (SBObject *) duplicateTo:(SBObject *)to; // Duplicate one or more object(s) +- (BOOL) exists; // Verify if an object exists +- (void) open; // open the specified object(s) +- (void) playOnce:(BOOL)once; // play the current track or the specified track or file. +- (void) reveal; // reveal and select a track or playlist + +@end + +// a piece of art within a track +@interface iTunesArtwork : iTunesItem + +@property (copy) NSImage *data; // data for this artwork, in the form of a picture +@property (copy) NSString *objectDescription; // description of artwork as a string +@property (readonly) BOOL downloaded; // was this artwork downloaded by iTunes? +@property (copy, readonly) NSNumber *format; // the data format for this piece of artwork +@property NSInteger kind; // kind or purpose of this piece of artwork +@property (copy) NSData *rawData; // data for this artwork, in original format + + +@end + +// converts a track to a specific file format +@interface iTunesEncoder : iTunesItem + +@property (copy, readonly) NSString *format; // the data format created by the encoder + + +@end + +// equalizer preset configuration +@interface iTunesEQPreset : iTunesItem + +@property double band1; // the equalizer 32 Hz band level (-12.0 dB to +12.0 dB) +@property double band2; // the equalizer 64 Hz band level (-12.0 dB to +12.0 dB) +@property double band3; // the equalizer 125 Hz band level (-12.0 dB to +12.0 dB) +@property double band4; // the equalizer 250 Hz band level (-12.0 dB to +12.0 dB) +@property double band5; // the equalizer 500 Hz band level (-12.0 dB to +12.0 dB) +@property double band6; // the equalizer 1 kHz band level (-12.0 dB to +12.0 dB) +@property double band7; // the equalizer 2 kHz band level (-12.0 dB to +12.0 dB) +@property double band8; // the equalizer 4 kHz band level (-12.0 dB to +12.0 dB) +@property double band9; // the equalizer 8 kHz band level (-12.0 dB to +12.0 dB) +@property double band10; // the equalizer 16 kHz band level (-12.0 dB to +12.0 dB) +@property (readonly) BOOL modifiable; // can this preset be modified? +@property double preamp; // the equalizer preamp level (-12.0 dB to +12.0 dB) +@property BOOL updateTracks; // should tracks which refer to this preset be updated when the preset is renamed or deleted? + + +@end + +// a list of songs/streams +@interface iTunesPlaylist : iTunesItem + +- (SBElementArray *) tracks; + +@property (readonly) NSInteger duration; // the total length of all songs (in seconds) +@property (copy) NSString *name; // the name of the playlist +@property (copy, readonly) iTunesPlaylist *parent; // folder which contains this playlist (if any) +@property BOOL shuffle; // play the songs in this playlist in random order? +@property (readonly) long long size; // the total size of all songs (in bytes) +@property iTunesERpt songRepeat; // playback repeat mode +@property (readonly) iTunesESpK specialKind; // special playlist kind +@property (copy, readonly) NSString *time; // the length of all songs in MM:SS format +@property (readonly) BOOL visible; // is this playlist visible in the Source list? + +- (void) moveTo:(SBObject *)to; // Move playlist(s) to a new location +- (iTunesTrack *) searchFor:(NSString *)for_ only:(iTunesESrA)only; // search a playlist for tracks matching the search string. Identical to entering search text in the Search field in iTunes. + +@end + +// a playlist representing an audio CD +@interface iTunesAudioCDPlaylist : iTunesPlaylist + +- (SBElementArray *) audioCDTracks; + +@property (copy) NSString *artist; // the artist of the CD +@property BOOL compilation; // is this CD a compilation album? +@property (copy) NSString *composer; // the composer of the CD +@property NSInteger discCount; // the total number of discs in this CD’s album +@property NSInteger discNumber; // the index of this CD disc in the source album +@property (copy) NSString *genre; // the genre of the CD +@property NSInteger year; // the year the album was recorded/released + + +@end + +// a playlist representing the contents of a portable device +@interface iTunesDevicePlaylist : iTunesPlaylist + +- (SBElementArray *) deviceTracks; + + +@end + +// the master music library playlist +@interface iTunesLibraryPlaylist : iTunesPlaylist + +- (SBElementArray *) fileTracks; +- (SBElementArray *) URLTracks; +- (SBElementArray *) sharedTracks; + + +@end + +// the radio tuner playlist +@interface iTunesRadioTunerPlaylist : iTunesPlaylist + +- (SBElementArray *) URLTracks; + + +@end + +// a music source (music library, CD, device, etc.) +@interface iTunesSource : iTunesItem + +- (SBElementArray *) audioCDPlaylists; +- (SBElementArray *) devicePlaylists; +- (SBElementArray *) libraryPlaylists; +- (SBElementArray *) playlists; +- (SBElementArray *) radioTunerPlaylists; +- (SBElementArray *) userPlaylists; + +@property (readonly) long long capacity; // the total size of the source if it has a fixed size +@property (readonly) long long freeSpace; // the free space on the source if it has a fixed size +@property (readonly) iTunesESrc kind; + +- (void) update; // update the specified iPod +- (void) eject; // eject the specified iPod + +@end + +// playable audio source +@interface iTunesTrack : iTunesItem + +- (SBElementArray *) artworks; + +@property (copy) NSString *album; // the album name of the track +@property (copy) NSString *albumArtist; // the album artist of the track +@property NSInteger albumRating; // the rating of the album for this track (0 to 100) +@property (readonly) iTunesERtK albumRatingKind; // the rating kind of the album rating for this track +@property (copy) NSString *artist; // the artist/source of the track +@property (readonly) NSInteger bitRate; // the bit rate of the track (in kbps) +@property double bookmark; // the bookmark time of the track in seconds +@property BOOL bookmarkable; // is the playback position for this track remembered? +@property NSInteger bpm; // the tempo of this track in beats per minute +@property (copy) NSString *category; // the category of the track +@property (copy) NSString *comment; // freeform notes about the track +@property BOOL compilation; // is this track from a compilation album? +@property (copy) NSString *composer; // the composer of the track +@property (readonly) NSInteger databaseID; // the common, unique ID for this track. If two tracks in different playlists have the same database ID, they are sharing the same data. +@property (copy, readonly) NSDate *dateAdded; // the date the track was added to the playlist +@property (copy) NSString *objectDescription; // the description of the track +@property NSInteger discCount; // the total number of discs in the source album +@property NSInteger discNumber; // the index of the disc containing this track on the source album +@property (readonly) double duration; // the length of the track in seconds +@property BOOL enabled; // is this track checked for playback? +@property (copy) NSString *episodeID; // the episode ID of the track +@property NSInteger episodeNumber; // the episode number of the track +@property (copy) NSString *EQ; // the name of the EQ preset of the track +@property double finish; // the stop time of the track in seconds +@property BOOL gapless; // is this track from a gapless album? +@property (copy) NSString *genre; // the music/audio genre (category) of the track +@property (copy) NSString *grouping; // the grouping (piece) of the track. Generally used to denote movements within a classical work. +@property (copy, readonly) NSString *kind; // a text description of the track +@property (copy) NSString *longDescription; +@property (copy) NSString *lyrics; // the lyrics of the track +@property (copy, readonly) NSDate *modificationDate; // the modification date of the content of this track +@property NSInteger playedCount; // number of times this track has been played +@property (copy) NSDate *playedDate; // the date and time this track was last played +@property (readonly) BOOL podcast; // is this track a podcast episode? +@property NSInteger rating; // the rating of this track (0 to 100) +@property (readonly) iTunesERtK ratingKind; // the rating kind of this track +@property (copy, readonly) NSDate *releaseDate; // the release date of this track +@property (readonly) NSInteger sampleRate; // the sample rate of the track (in Hz) +@property NSInteger seasonNumber; // the season number of the track +@property BOOL shufflable; // is this track included when shuffling? +@property NSInteger skippedCount; // number of times this track has been skipped +@property (copy) NSDate *skippedDate; // the date and time this track was last skipped +@property (copy) NSString *show; // the show name of the track +@property (copy) NSString *sortAlbum; // override string to use for the track when sorting by album +@property (copy) NSString *sortArtist; // override string to use for the track when sorting by artist +@property (copy) NSString *sortAlbumArtist; // override string to use for the track when sorting by album artist +@property (copy) NSString *sortName; // override string to use for the track when sorting by name +@property (copy) NSString *sortComposer; // override string to use for the track when sorting by composer +@property (copy) NSString *sortShow; // override string to use for the track when sorting by show name +@property (readonly) NSInteger size; // the size of the track (in bytes) +@property double start; // the start time of the track in seconds +@property (copy, readonly) NSString *time; // the length of the track in MM:SS format +@property NSInteger trackCount; // the total number of tracks on the source album +@property NSInteger trackNumber; // the index of the track on the source album +@property BOOL unplayed; // is this track unplayed? +@property iTunesEVdK videoKind; // kind of video track +@property NSInteger volumeAdjustment; // relative volume adjustment of the track (-100% to 100%) +@property NSInteger year; // the year the track was recorded/released + + +@end + +// a track on an audio CD +@interface iTunesAudioCDTrack : iTunesTrack + +@property (copy, readonly) NSURL *location; // the location of the file represented by this track + + +@end + +// a track residing on a portable music player +@interface iTunesDeviceTrack : iTunesTrack + + +@end + +// a track representing an audio file (MP3, AIFF, etc.) +@interface iTunesFileTrack : iTunesTrack + +@property (copy) NSURL *location; // the location of the file represented by this track + +- (void) refresh; // update file track information from the current information in the track’s file + +@end + +// a track residing in a shared library +@interface iTunesSharedTrack : iTunesTrack + + +@end + +// a track representing a network stream +@interface iTunesURLTrack : iTunesTrack + +@property (copy) NSString *address; // the URL for this track + +- (void) download; // download podcast episode + +@end + +// custom playlists created by the user +@interface iTunesUserPlaylist : iTunesPlaylist + +- (SBElementArray *) fileTracks; +- (SBElementArray *) URLTracks; +- (SBElementArray *) sharedTracks; + +@property BOOL shared; // is this playlist shared? +@property (readonly) BOOL smart; // is this a Smart Playlist? + + +@end + +// a folder that contains other playlists +@interface iTunesFolderPlaylist : iTunesUserPlaylist + + +@end + +// a visual plug-in +@interface iTunesVisual : iTunesItem + + +@end + +// any window +@interface iTunesWindow : iTunesItem + +@property NSRect bounds; // the boundary rectangle for the window +@property (readonly) BOOL closeable; // does the window have a close box? +@property (readonly) BOOL collapseable; // does the window have a collapse (windowshade) box? +@property BOOL collapsed; // is the window collapsed? +@property NSPoint position; // the upper left position of the window +@property (readonly) BOOL resizable; // is the window resizable? +@property BOOL visible; // is the window visible? +@property (readonly) BOOL zoomable; // is the window zoomable? +@property BOOL zoomed; // is the window zoomed? + + +@end + +// the main iTunes window +@interface iTunesBrowserWindow : iTunesWindow + +@property BOOL minimized; // is the small player visible? +@property (copy, readonly) SBObject *selection; // the selected songs +@property (copy) iTunesPlaylist *view; // the playlist currently displayed in the window + + +@end + +// the iTunes equalizer window +@interface iTunesEQWindow : iTunesWindow + +@property BOOL minimized; // is the small EQ window visible? + + +@end + +// a sub-window showing a single playlist +@interface iTunesPlaylistWindow : iTunesWindow + +@property (copy, readonly) SBObject *selection; // the selected songs +@property (copy, readonly) iTunesPlaylist *view; // the playlist displayed in the window + + +@end + diff --git a/iTunes-icon.icns b/iTunes-icon.icns new file mode 100644 index 0000000..7e92888 Binary files /dev/null and b/iTunes-icon.icns differ