Exemplo n.º 1
0
long GMSourceView::onCmdNewStation(FXObject*sender,FXSelector,void*ptr){
  for (FXint i=0;i<GMPlayerManager::instance()->getNumSources();i++){
    GMSource * src = GMPlayerManager::instance()->getSource(i);
    if (src->getType()==SOURCE_INTERNET_RADIO)
      return src->handle(sender,FXSEL(SEL_COMMAND,GMStreamSource::ID_NEW_STATION),ptr);
    }
  return 0;
  }
Exemplo n.º 2
0
FXbool GMSourceView::listsources() {
  GMTreeItem * item=nullptr;
  GMTreeItem * dbitem=nullptr;
  for (FXint i=0;i<GMPlayerManager::instance()->getNumSources();i++){
    GMSource * src = GMPlayerManager::instance()->getSource(i);
    FXIcon * icon=icon_for_sourcetype(src->getType());
    item = new GMTreeItem(src->getName(),icon,icon,src);
    if (src->getType()==SOURCE_DATABASE_FILTER) {
      FXASSERT(dbitem);
      sourcelist->appendItem(dbitem,item);
      dbitem->setExpanded(true);
      }
    else {
      sourcelist->appendItem(nullptr,item);
      }
    if (src->getType()==SOURCE_DATABASE) dbitem=item;
    }
  sourcelist->sortItems();
  return true;
  }
Exemplo n.º 3
0
FXbool GMSourceView::listsources() {
  GMTreeItem * item=NULL;
  for (FXint i=0;i<GMPlayerManager::instance()->getNumSources();i++){
    GMSource * source = GMPlayerManager::instance()->getSource(i);
    FXIcon * icon=icon_for_sourcetype(source->getType());
    item = new GMTreeItem(source->getName(),icon,icon,source);
    sourcelist->appendItem(NULL,item);
    }
  sourcelist->sortItems();
  return true;
  }