Vanya_Shestakov

Untitled

Oct 22nd, 2021 (edited)
541
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void BrowserManager::clearCashe()
  2. {
  3.     std::filesystem::remove_all(CASHE_PATH.c_str());
  4. }
  5.  
  6. void BrowserManager::clearBrowserData()
  7. {
  8.     std::filesystem::remove_all(BROWSER_DATA_PATH.c_str());
  9. }
  10.  
  11. void __fastcall TSettingsForm::historyBoxDblClick(TObject *Sender)
  12. {
  13.     int size = WebView->historyManager->getSize();
  14.     int index = size - historyBox->ItemIndex - 1;
  15.     std::vector<SiteVisit> history = WebView->historyManager->getHistory();
  16.     WebView->createNewTab();
  17.     WebView->getCurrentBrowser()->Navigate(history[index].getUrl().c_str());
  18.     SettingsForm->Close();
  19. }
  20.  
  21. bool BookmarksManager::clearBookmarks()
  22. {
  23.     bookmarks.clear();
  24.     return writeBookmarks("bookmarks");
  25. }
  26.  
  27. bool HistoryManager::clearHistory()
  28. {
  29.     history.clear();
  30.     return writeHistory("history");
  31. }
  32.  
  33. void TWebView::setLoadingStatus(bool status)
  34. {
  35.     isLoaded = !status;
  36.     if (status)
  37.     {
  38.         activityIndicator->StartAnimation();
  39.     }
  40.     else
  41.     {
  42.         activityIndicator->StopAnimation();
  43.     }
  44.     updateBtn->Visible = !status;
  45.     activityIndicator->Visible = status;
  46. }
RAW Paste Data