wesrog / last.fm-tagger
- Source
- Commits
- Network (0)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
9e2266d
last.fm-tagger / PlaylistsController.rb
| 983cdd7c » | wesrog | 2008-07-05 | 1 | # | |
| 2 | # PlaylistsArray.rb | ||||
| f8136043 » | wesrog | 2008-08-20 | 3 | # last.fm-tagger | |
| 983cdd7c » | wesrog | 2008-07-05 | 4 | # | |
| 5 | # Created by Wes Rogers on 7/5/08. | ||||
| 6 | # Copyright (c) 2008 633k.net. All rights reserved. | ||||
| 7 | # | ||||
| 8 | |||||
| 9 | class PlaylistsController < NSArrayController | ||||
| 10 | ib_outlets :playlistsPopUp | ||||
| f8136043 » | wesrog | 2008-08-20 | 11 | ib_action :reloadPlaylists | |
| 983cdd7c » | wesrog | 2008-07-05 | 12 | ||
| 13 | def initialize | ||||
| 14 | @iTunes = SBApplication.applicationWithBundleIdentifier_("com.apple.iTunes") | ||||
| 15 | end | ||||
| 16 | |||||
| 17 | def awakeFromNib | ||||
| 8cdcd413 » | wesrog | 2008-07-06 | 18 | @playlistsPopUp.addItemsWithTitles(@iTunes.sources.first.userPlaylists.reject { |p| p.smart == 1 }.map { |p| p.name }) | |
| 983cdd7c » | wesrog | 2008-07-05 | 19 | end | |
| f8136043 » | wesrog | 2008-08-20 | 20 | ||
| 21 | def reloadPlaylists | ||||
| 9e2266dc » | wesrog | 2008-08-20 | 22 | @playlistsPopUp.removeAllItems | |
| f8136043 » | wesrog | 2008-08-20 | 23 | @playlistsPopUp.addItemsWithTitles(@iTunes.sources.first.userPlaylists.reject { |p| p.smart == 1 }.map { |p| p.name }) | |
| 24 | end | ||||
| 983cdd7c » | wesrog | 2008-07-05 | 25 | end | |
