Set the hourglass cursor for the dialog while running. However, the Cancel button can always be pressed, so this one gets a normal cursor.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33024 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-01-14 01:20:14 +00:00
parent 51b38ee015
commit 413e5da3e0
2 changed files with 8 additions and 5 deletions

View File

@ -66,6 +66,8 @@ GuiCompare::GuiCompare(GuiView & lv)
progressBar->setValue(0);
progressBar->setEnabled(false);
closePB->setCursor(Qt::ArrowCursor);
bc().setPolicy(ButtonPolicy::OkApplyCancelPolicy);
bc().setOK(okPB);
}
@ -170,8 +172,12 @@ QString GuiCompare::browse(QString const & in_name) const
}
void GuiCompare::enableControls(bool enable) const
void GuiCompare::enableControls(bool enable)
{
// Set the hourglass cursor for the dialog, but
// never for the cancel button.
setCursor(enable ? Qt::ArrowCursor : Qt::WaitCursor);
newFileLA->setEnabled(enable);
newFilePB->setEnabled(enable);
newFileCB->setEnabled(enable);

View File

@ -74,7 +74,7 @@ private:
/// enable or disable all controls and rename the Close/Cancel button
void enableControls(bool enable) const;
void enableControls(bool enable);
/// browse for a file
QString browse(QString const & in_name) const;
@ -94,9 +94,6 @@ private:
Buffer const * old_buffer_;
/// the buffer that will contain the result
Buffer const * new_buffer_;
/// the window title
mutable QString window_title_;
};