void ModulesView::_CloseSaver() { // remove old screen saver preview & config BScreenSaver* saver = _ScreenSaver(); BView* view = fPreviewView->RemovePreview(); if (fSettingsView != NULL) fSettingsBox->RemoveChild(fSettingsView); if (fSaverRunner != NULL) fSaverRunner->Quit(); if (saver != NULL) saver->StopConfig(); delete view; delete fSettingsView; delete fSaverRunner; // the saver runner also unloads the add-on, so it must // be deleted last fSettingsView = NULL; fSaverRunner = NULL; }
void TVideoCompressionView::DetachedFromWindow() { printf("TVideoCompressionView::DetachedFromWindow()\n"); // Get pointer to previewView and detach from BBox BBox *previewBox = (BBox *)FindView("PreviewBox"); TVideoPreviewView *previewView = m_Parent->GetParent()->GetParent()->PreviewView(); if (previewView) { previewView->Hide(); previewBox->RemoveChild(previewView); } BView::DetachedFromWindow(); }