Rename TabsDelegate::isModifiedTab() to isTabModified()

This commit is contained in:
David Capello 2015-05-04 15:33:05 -03:00
parent f766763a92
commit 53e572eaf5
4 changed files with 7 additions and 7 deletions

View File

@ -179,7 +179,7 @@ void MainWindow::showHomeOnOpen()
}
void MainWindow::showHome()
{
{
if (!getHomeView()->getParent()) {
m_workspace->addView(m_homeView, 0);
}
@ -266,7 +266,7 @@ void MainWindow::onActiveViewChange()
configureWorkspaceLayout();
}
bool MainWindow::isModifiedTab(Tabs* tabs, TabView* tabView)
bool MainWindow::isTabModified(Tabs* tabs, TabView* tabView)
{
if (DocumentView* docView = dynamic_cast<DocumentView*>(tabView)) {
Document* document = docView->getDocument();

View File

@ -82,7 +82,7 @@ namespace app {
void showDataRecovery(crash::DataRecovery* dataRecovery);
// TabsDelegate implementation.
bool isModifiedTab(Tabs* tabs, TabView* tabView) override;
bool isTabModified(Tabs* tabs, TabView* tabView) override;
bool canCloneTab(Tabs* tabs, TabView* tabView) override;
void onSelectTab(Tabs* tabs, TabView* tabView) override;
void onCloseTab(Tabs* tabs, TabView* tabView) override;

View File

@ -100,7 +100,7 @@ void Tabs::addTab(TabView* tabView, bool from_drop, int pos)
tab->oldX = (from_drop ? m_dropNewPosX-tab->width/2: tab->x);
tab->oldWidth = tab->width;
tab->modified = (m_delegate ? m_delegate->isModifiedTab(this, tabView): false);
tab->modified = (m_delegate ? m_delegate->isTabModified(this, tabView): false);
}
void Tabs::removeTab(TabView* tabView, bool with_animation)
@ -131,7 +131,7 @@ void Tabs::removeTab(TabView* tabView, bool with_animation)
if (with_animation) {
if (m_delegate)
tab->modified = m_delegate->isModifiedTab(this, tabView);
tab->modified = m_delegate->isTabModified(this, tabView);
tab->view = nullptr; // The view will be destroyed after Tabs::removeTab() anyway
resetOldPositions();
@ -623,7 +623,7 @@ void Tabs::drawTab(Graphics* g, const gfx::Rect& _box,
if (m_delegate) {
if (tab->view)
tab->modified = m_delegate->isModifiedTab(this, tab->view);
tab->modified = m_delegate->isTabModified(this, tab->view);
if (tab->modified &&
(!hover || !m_hotCloseButton)) {

View File

@ -72,7 +72,7 @@ namespace app {
virtual ~TabsDelegate() { }
// Returns true if the tab represent a modified document.
virtual bool isModifiedTab(Tabs* tabs, TabView* tabView) = 0;
virtual bool isTabModified(Tabs* tabs, TabView* tabView) = 0;
// Returns true if the tab can be cloned.
virtual bool canCloneTab(Tabs* tabs, TabView* tabView) = 0;