From a13b21c6dc1747037d3498625302e0de4526775e Mon Sep 17 00:00:00 2001 From: Umcaruje Date: Mon, 11 Jul 2016 00:12:59 +0200 Subject: [PATCH] Fix dialog button mismatch --- data/themes/default/discard.png | Bin 0 -> 217 bytes data/themes/default/ignore.png | Bin 0 -> 506 bytes data/themes/default/recover.png | Bin 0 -> 303 bytes src/core/main.cpp | 29 +++++++++++++++-------------- 4 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 data/themes/default/discard.png create mode 100644 data/themes/default/ignore.png create mode 100755 data/themes/default/recover.png diff --git a/data/themes/default/discard.png b/data/themes/default/discard.png new file mode 100644 index 0000000000000000000000000000000000000000..6dec18588c0595f7df19a9b8063bb9ba315f06da GIT binary patch literal 217 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR49o!0(WC^WyShghbM(|yb0%C}v}4{nyzopr E0P9LcU;qFB literal 0 HcmV?d00001 diff --git a/data/themes/default/ignore.png b/data/themes/default/ignore.png new file mode 100644 index 0000000000000000000000000000000000000000..9e0e3f876b1b8a764d3449851f6a698ca963a521 GIT binary patch literal 506 zcmV0znXlf6z`7Ldhj2NNcMFu`<{aYF>e7proNC z*zyE6)M#U4p@o6o3OY&?3yaTUXXA42?HLS{Y%ZDE{dQ({X08J05K=t|Rnl>Zy)CID z=}OY2>0TwhNP3j?TzC?Qtr{?+TxPcS7b6C}2G(})0~iB6AOp^TJ}?Egwr6c;lHghZ zeF9nq5eYa4mI1t$0?z_yH39YO6j%jmiGtff_$g2Qx&RiroVUF_EVqt*?@~ literal 0 HcmV?d00001 diff --git a/data/themes/default/recover.png b/data/themes/default/recover.png new file mode 100755 index 0000000000000000000000000000000000000000..42d8be333af5cf67dcfe0686757d098c645f820e GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fEX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4+C`{moi-_Nc$5wn@34Rkkyr>mdKI;Vst08NQ>3jhEB literal 0 HcmV?d00001 diff --git a/src/core/main.cpp b/src/core/main.cpp index 8bfd974b7c1..913efd30e64 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -736,34 +736,35 @@ int main( int argc, char * * argv ) MainWindow::tr( "Discard" ), MainWindow::tr( "Launch a default session and delete " "the restored files. This is not reversible." ), - MainWindow::tr( "Quit" ), + MainWindow::tr( "Exit" ), MainWindow::tr( "Shut down LMMS with no further action." ) ) ); mb.setIcon( QMessageBox::Warning ); mb.setWindowIcon( embed::getIconPixmap( "icon" ) ); - mb.setStandardButtons( QMessageBox::Ok | - QMessageBox::Discard ); - - mb.setButtonText( QMessageBox::Ok, - MainWindow::tr( "Recover" ) ); - - QAbstractButton * recover; - QAbstractButton * discard; + QPushButton * recover; QPushButton * ignore; + QPushButton * discard; QPushButton * exit; - recover = mb.QMessageBox::button( QMessageBox::Ok ); - discard = mb.QMessageBox::button( QMessageBox::Discard ); + recover = mb.addButton( MainWindow::tr( "Recover" ), + QMessageBox::AcceptRole ); + recover->setIcon( embed::getIconPixmap( "recover" ) ); + + discard = mb.addButton( MainWindow::tr( "Discard" ), + QMessageBox::DestructiveRole ); + discard->setIcon( embed::getIconPixmap( "discard" ) ); + ignore = mb.addButton( MainWindow::tr( "Ignore" ), QMessageBox::NoRole ); - ignore->setIcon( embed::getIconPixmap( "no_entry" ) ); + ignore->setIcon( embed::getIconPixmap( "ignore" ) ); + exit = mb.addButton( MainWindow::tr( "Exit" ), QMessageBox::RejectRole ); exit->setIcon( embed::getIconPixmap( "exit" ) ); - mb.setDefaultButton( QMessageBox::Ok ); + mb.setDefaultButton( recover ); mb.setEscapeButton( exit ); mb.exec(); @@ -771,7 +772,7 @@ int main( int argc, char * * argv ) { gui->mainWindow()->sessionCleanup(); } - else if( mb.clickedButton() == recover ) // ::Recover + else if( mb.clickedButton() == recover ) // Recover { fileToLoad = recoveryFile; gui->mainWindow()->setSession( MainWindow::SessionState::Recover );