PlaylistFrame::~PlaylistFrame() { ////@begin PlaylistFrame destruction SessionWindow *sessionWnd = ((SessionWindow *)GetParent()); SkinLite *skinLite = (SkinLite *)(sessionWnd->GetParent()); skinLite->ChangePlaylistExistsStatus(false); if (skinLite->CheckSessionWindowExists()) sessionWnd->EnableSendFileTransfer(); ////@end PlaylistFrame destruction }
/** ReceiveFilesFrame creator. * @param[in] parent. Parent window. * @param[in] id. Window id. Default SYMBOL_RECEIVEFILESFRAME_IDNAME. * @param[in] caption. Window caption. Default SYMBOL_RECEIVEFILESFRAME_TITLE. * @param[in] pos. Window position. Default SYMBOL_RECEIVEFILESFRAME_POSITION. * @param[in] size. Window size. Default SYMBOL_RECEIVEFILESFRAME_SIZE. * @param[in] style. Window style. Default SYMBOL_RECEIVEFILESFRAME_STYLE. */ bool ReceiveFilesFrame::Create( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { wxFrame::Create( parent, id, caption, pos, size, style ); CreateControls(); SessionWindow *sessionWnd = ((SessionWindow *)GetParent()); SkinLite *skinLite = (SkinLite *)(sessionWnd->GetParent()); skinLite->ChangeReceiveFilesExistsStatus(true); return true; }
/** PlaylistFrame constructor. * @param[in] parent. Parent Window. * @param[in] iface. Interface with application. * @param[in] id. Window id. Default SYMBOL_PLAYLISTFRAME_IDNAME. * @param[in] caption. Window caption. Default SYMBOL_PLAYLISTFRAME_TITLE. * @param[in] pos. Window position. Default SYMBOL_PLAYLISTFRAME_POSITION. * @param[in] size. Window size. Default SYMBOL_PLAYLISTFRAME_SIZE. * @param[in] style. Window style. Default SYMBOL_PLAYLISTFRAME_STYLE. */ PlaylistFrame::PlaylistFrame( wxWindow* parent, AppInterface *iface, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) { Init(); m_appInterface = iface; Create( parent, id, caption, pos, size, style ); SessionWindow *sessionWnd = ((SessionWindow *)GetParent()); SkinLite *skinLite = (SkinLite *)(sessionWnd->GetParent()); skinLite->ChangePlaylistExistsStatus(true); sessionWnd->DisableSendFileTransfer(); }
void WindowsManager::closeWindow(Window *window) { const int index = getWindowIndex(window); if (index < 0) { return; } if (window && !window->isPrivate()) { const WindowHistoryInformation history = window->getContentsWidget()->getHistory(); if (!window->isUrlEmpty() || history.entries.count() > 1) { const SessionWindow information = window->getSession(); if (window->getType() != QLatin1String("web")) { removeStoredUrl(information.getUrl()); } m_closedWindows.prepend(information); emit closedWindowsAvailableChanged(true); } } if (m_tabBar->count() == 1) { window = getWindow(0); if (window) { window->clear(); return; } } m_tabBar->removeTab(index); emit windowRemoved(index); if (m_tabBar->count() < 1) { open(); } }
void Window::setSession(SessionWindow session) { m_session = session; setSearchEngine(session.searchEngine); setPinned(session.pinned); if (!SettingsManager::getValue(QLatin1String("Browser/DelayRestoringOfBackgroundTabs")).toBool()) { setUrl(session.getUrl(), false); } }
/** ReceiveFilesFrame destructor. * */ ReceiveFilesFrame::~ReceiveFilesFrame() { SessionWindow *sessionWnd = ((SessionWindow *)GetParent()); SkinLite *skinLite = (SkinLite *)(sessionWnd->GetParent()); skinLite->ChangeReceiveFilesExistsStatus(false); }
void WindowsManager::closeWindow(Window *window) { const int index = getWindowIndex(window); if (index < 0) { return; } if (window && !window->isPrivate()) { const WindowHistoryInformation history = window->getContentsWidget()->getHistory(); if (!window->isUrlEmpty() || history.entries.count() > 1) { const SessionWindow information = window->getSession(); if (window->getType() != QLatin1String("web")) { removeStoredUrl(information.getUrl()); } m_closedWindows.prepend(information); emit closedWindowsAvailableChanged(true); } } const QString lastTabClosingAction = SettingsManager::getValue(QLatin1String("TabBar/LastTabClosingAction")).toString(); if (m_tabBar->count() == 1) { if (lastTabClosingAction == QLatin1String("closeWindow")) { ActionsManager::triggerAction(QLatin1String("CloseWindow"), m_mdi); return; } if (lastTabClosingAction == QLatin1String("openTab")) { window = getWindow(0); if (window) { window->clear(); return; } } else { ActionsManager::getAction(QLatin1String("CloneTab"), m_mdi)->setEnabled(false); emit windowTitleChanged(QString()); } } m_tabBar->removeTab(index); emit windowRemoved(index); if (m_tabBar->count() < 1 && lastTabClosingAction != QLatin1String("doNothing")) { open(); } }