Skip to content

Commit

Permalink
Update searchbox value for search (done more for playlist-cmd-invoked…
Browse files Browse the repository at this point in the history
… search).
  • Loading branch information
Kurt Ruppel committed Feb 5, 2011
1 parent 3479a0b commit 059943f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
12 changes: 2 additions & 10 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Options for updating Dashboard/Favorites ###
A) Update periodically via nsIObserver/nsITimer
A) Update periodically via nsIObserver/nsITimer [done]
- Makes sense for the Dashboard
B) Flag update and post event
B) Flag update and post event [done]
- Maybe makes more sense for Favorites? Still a usecase where a user
could go through another client, favorite, and not see the update in
Songbird.
Expand All @@ -11,14 +11,6 @@ Related issue around losing view state... i.e. User plays from favorites
library and then library is refreshed (clear/populate) - Is that ok? Is
there another way to go about this?

### "Secure" information accessible via service interface ###
I didn't have a good solution in mind for restricting access to login
credentials. Both LastFM and Rhapsody I believe surface this information.
Especially when accounting for the autologin process, is there a way
to obfuscate these? Or is it not even worth the trouble?
[DONE] Also set prefs for oauth_token and token_secret... Should probably
encode/decode these strings.

### Blur searchbox once search is triggered ###

### Display informative message when no results are found ###
Expand Down
Binary file added chrome/.DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions chrome/content/directory.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ CloudDirectory.onLoad = function CloudDirectory_onLoad() {
onLoggedInStateChanged: function listener_onLoggedInStateChanged() { },
onProfileUpdated: function listener_onProfileUpdated() { },
onSearchTriggered: function listener_onSearchTriggered() {
self._searchBox.value = decodeURIComponent(self._service.lastSearch);
self._directory.setAttribute("disabled", true);
self._topLayer.hidden = false;
self._idleDeck.selectedIndex = 1;
Expand Down
8 changes: 4 additions & 4 deletions components/src/sbSoundCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -1165,14 +1165,14 @@ sbSoundCloudService.prototype = {
if (this._track_xhr)
this._track_xhr.abort();

this.notifyListeners("onSearchTriggered");
this._library.clear();

if (!aQuery && aUser) {
this._searchService.insertSearch(url + "?" + aFlags, aUser);
} else {
this._searchService.insertSearch(url + "?" + aFlags, aQuery);
}

this.notifyListeners("onSearchTriggered");
this._library.clear();
}

var success = function(xhr) {
Expand Down Expand Up @@ -1391,7 +1391,7 @@ sbSoundCloudService.prototype = {
self._favput_retries = 0;
self.getFavorites();

self.user.favCount += 1;
self.user._favCount += 1;
var favNode = self._servicePaneService
.getNode("urn:soclfavorites");
var favBadge = ServicePaneHelper.getBadge(favNode, "soclfavcount");
Expand Down

0 comments on commit 059943f

Please sign in to comment.