Commit 3329cf7d authored by Laurent Montel's avatar Laurent Montel 😁

Fix enable/disable save button

parent cf7d10dc
......@@ -223,6 +223,7 @@ BrowserWidget::BrowserWidget(KXmlGuiWindow *xmlGuiWindow, QWidget * parent) :
m_stateMaintainer->restoreState();
connect(contentUi.flags, SIGNAL(changed()), this, SLOT(slotFlagsChanged()));
connect(contentUi.tags, SIGNAL(changed()), this, SLOT(slotTagsChanged()));
connect(contentUi.dataView, SIGNAL(textChanged()), this, SLOT(slotDataViewChanged()));
}
BrowserWidget::~BrowserWidget()
......@@ -230,6 +231,11 @@ BrowserWidget::~BrowserWidget()
m_stateMaintainer->saveState();
}
void BrowserWidget::slotDataViewChanged()
{
contentUi.saveButton->setEnabled( true );
}
void BrowserWidget::slotFlagsChanged()
{
contentUi.saveButton->setEnabled( true );
......@@ -352,6 +358,7 @@ void BrowserWidget::setItem( const Akonadi::Item &item )
mMonitor->itemFetchScope().fetchAllAttributes();
qRegisterMetaType<QSet<QByteArray> >();
connect( mMonitor, SIGNAL(itemChanged(Akonadi::Item,QSet<QByteArray>)), SLOT(setItem(Akonadi::Item)), Qt::QueuedConnection );
contentUi.saveButton->setEnabled( false );
}
void BrowserWidget::modelChanged()
......
......@@ -76,9 +76,9 @@ class BrowserWidget: public QWidget
void clear();
void updateItemFetchScope();
void slotFlagsChanged();
void slotTagsChanged();
private:
void slotTagsChanged();
void slotDataViewChanged();
private:
Akonadi::Collection currentCollection() const;
Akonadi::ChangeRecorder *mBrowserMonitor;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment