From 413e5da3e00cb2ea6c3268411aac44cd0d5ec5ec Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Thu, 14 Jan 2010 01:20:14 +0000 Subject: [PATCH] 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 --- src/frontends/qt4/GuiCompare.cpp | 8 +++++++- src/frontends/qt4/GuiCompare.h | 5 +---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/frontends/qt4/GuiCompare.cpp b/src/frontends/qt4/GuiCompare.cpp index 51a4a65acd..0913959746 100644 --- a/src/frontends/qt4/GuiCompare.cpp +++ b/src/frontends/qt4/GuiCompare.cpp @@ -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); diff --git a/src/frontends/qt4/GuiCompare.h b/src/frontends/qt4/GuiCompare.h index 0116890495..47f70a12ab 100644 --- a/src/frontends/qt4/GuiCompare.h +++ b/src/frontends/qt4/GuiCompare.h @@ -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_; }; -- 2.39.2