EvaFileThread::EvaFileThread(TQObject *receiver, const unsigned int id, const TQValueList<TQString> &dirList, const TQValueList<TQString> &filenameList, const TQValueList<unsigned int> sizeList, const bool isSender) : TQObject(), TQThread(), m_IsSender(isSender), m_Receiver(receiver), m_Id(id), m_Session(0), m_StartOffset(0), m_ExitNow(false), m_BytesSent(0), m_File(NULL), m_Connecter(NULL) { if(dirList.size() != filenameList.size()) { m_ExitNow = true; return; } m_DirList = dirList; m_FileNameList = filenameList; m_SizeList = sizeList; EvaCachedFile *file; for(unsigned int i = 0; i < dirList.size(); ++i){ printf("EvaFileThread::EvaFileThread -- dir: %s\t filename:%s\n", dirList[i].ascii(), filenameList[i].ascii()); if(m_IsSender) file = new EvaCachedFile(dirList[i], filenameList[i]); else file = new EvaCachedFile(dirList[i], filenameList[i], sizeList[i]); m_FileList.append(file); } m_FileList.setAutoDelete(true); m_File = m_FileList.first(); m_Dir = dirList.first(); m_FileName = filenameList.first(); }
void QuickLauncher::loadConfig() { DEBUGSTR << "QuickLauncher::loadConfig()" << endl << flush; //TDEConfig *c = config(); //c->setGroup("General"); setConserveSpace(m_settings->conserveSpace()); setDragEnabled(m_settings->dragEnabled()); /*DEBUGSTR << " IconDim="<<m_iconDim << endl << flush; DEBUGSTR << " ConserveSpace=" << (m_manager->conserveSpace()) << endl << flush; DEBUGSTR << " DragEnabled=" << isDragEnabled() << endl << flush;*/ TQStringList volatileButtons = m_settings->volatileButtons(); TQStringList urls = m_settings->buttons(); if (m_settings->showDesktopEnabled()) { if (!urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) urls.prepend("SPECIAL_BUTTON__SHOW_DESKTOP"); } else { if (urls.contains("SPECIAL_BUTTON__SHOW_DESKTOP")) urls.remove("SPECIAL_BUTTON__SHOW_DESKTOP"); } kdDebug() << "GetButtons " << urls.join("/") << endl; TQStringList::Iterator iter(urls.begin()); int n = 0; while (iter != urls.end()) { TQString url = *iter; addApp(url, n, false); ++iter; ++n; } // Restore sticky state for (n=0; n<int(m_buttons->size()); ++n) { QuickButton* button = (*m_buttons)[n]; if (volatileButtons.contains(button->menuId()) == false) { button->setSticky(true); } button->setDynamicModeEnabled(m_settings->autoAdjustEnabled()); } m_popularity->readConfig(m_settings); m_popularity->setHistoryHorizon(m_settings->historyHorizon()/100.0); TQStringList serviceNames = m_settings->serviceNames(); TQValueList<int> insPos = m_settings->serviceInspos(); for (int n=std::min(serviceNames.size(),insPos.size())-1; n>=0; --n) { m_appOrdering[serviceNames[n]] = insPos[n]; } }