Example #1
0
Stream::~Stream()
{
   stopSource();
   clear();

   deleteSource();
   alDeleteBuffers(1, buffers);

   ov_clear(&stream);
}
void GuiPreferences::addEvents(void)
{
  connect(m_cancelBtn, SIGNAL(clicked()), this, SLOT(handleCancel()));

  switch(m_formType) {
  case ChangeMonitoringSettings:
    QObject::connect(m_applySettingBtn, SIGNAL(clicked()),  this, SLOT(applyChanges()));
    connect(m_addAsSourceBtn, SIGNAL(clicked()), this, SLOT(addAsSource()));
    connect(m_deleteSourceBtn, SIGNAL(clicked()), this, SLOT(deleteSource()));
    connect(m_showAuthInfoChkbx, SIGNAL(stateChanged(int)), this, SLOT(setAuthChainVisibility(int)));
    break;
  case ChangePassword:
    connect(m_changePwdBtn, SIGNAL(clicked()),  this, SLOT(changePasswd()));
    break;
  case ShowAbout:
    break;
  case BasicLoginForm:
    break;
  default:
    break;
  }
}
Example #3
0
void CBoxeeMediaSourceList::deleteDuplicateApps()
{
  std::map<CStdString, CBoxeeMediaSource> pathsProcessed;
  std::vector<CStdString> sourcesToDelete;
  int counter;
  
  // Go over all the sources
  BoxeeMediaSourceMap::iterator iterator;
  for (iterator = m_sources.begin(); iterator != m_sources.end(); iterator++)
  {
    CBoxeeMediaSource& source = (*iterator).second;
    
    // Only look into apps
    if (!CUtil::IsApp(source.path))
    {
      continue;
    }
    
    // If we already processed this path, no need to do it again
    if (pathsProcessed.find(source.path) != pathsProcessed.end())
    {
      continue;
    }
    
    counter = 0;
    
    // Look for sources with the same path
    BoxeeMediaSourceMap::iterator iterator2;
    for (iterator2 = m_sources.begin(); iterator2 != m_sources.end(); iterator2++)
    {
      CBoxeeMediaSource& source2 = (*iterator2).second;
      
      if (source.path.CompareNoCase(source2.path) == 0)
      {
        ++counter;
      }
      
      // Do not delete the first one
      if (counter > 1)
      {
        sourcesToDelete.push_back(source2.name);
        --counter;
      }
    }
    
    pathsProcessed[source.path] = source;
  }
  
  // Delete all the sources that we collected
  if (!sourcesToDelete.empty())
  {
    for (size_t i = 0; i < sourcesToDelete.size(); i++)
    {
      CLog::Log(LOGDEBUG,"CBoxeeMediaSourceList::deleteDuplicateApps, deleting source %s\n", sourcesToDelete[i].c_str());
      deleteSource(sourcesToDelete[i]);
    }
  }
  
  g_settings.SaveSources();
  load();  
}
Example #4
0
Sound::~Sound()
{
   deleteSource();
}