mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Rename TabsDelegate::isModifiedTab() to isTabModified()
This commit is contained in:
parent
f766763a92
commit
53e572eaf5
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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)) {
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user