Ignore:
Timestamp:
Oct 24, 2012, 8:25:23 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMplayer: update trunk to 0.8.1

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/favorites.cpp

    r124 r135  
    175175}
    176176
     177bool Favorites::anyItemAvailable() {
     178        if (f_list.isEmpty()) return false;
     179
     180        bool item_available = false;
     181        for (int n = 0; n < f_list.count(); n++) {
     182                if (!f_list[n].isSubentry()) {
     183                        item_available = true;
     184                        break;
     185                }
     186        }
     187
     188        return item_available;
     189}
     190
    177191void Favorites::next() {
    178192        qDebug("Favorites::next");
     193
     194        if (!anyItemAvailable()) return;
    179195
    180196        int current = findFile(current_file);
     
    197213void Favorites::previous() {
    198214        qDebug("Favorites::previous");
     215
     216        if (!anyItemAvailable()) return;
    199217
    200218        int current = findFile(current_file);
Note: See TracChangeset for help on using the changeset viewer.