From f358d4ad94fc770e072d5cfdf6f3eb7982383ca8 Mon Sep 17 00:00:00 2001 From: Dominik Wenger Date: Mon, 30 Jul 2007 19:35:48 +0000 Subject: [PATCH] rbutilQt: fix Dialogs, so they are modal. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14080 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/configure.cpp | 2 ++ rbutil/rbutilqt/progressloggergui.cpp | 1 + rbutil/rbutilqt/progressloggergui.h | 2 +- rbutil/rbutilqt/rbutilqt.cpp | 5 +++-- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp index 63a78a795b..a0a582ce09 100644 --- a/rbutil/rbutilqt/configure.cpp +++ b/rbutil/rbutilqt/configure.cpp @@ -53,6 +53,8 @@ Config::Config(QWidget *parent) : QDialog(parent) ui.listLanguages->setSelectionMode(QAbstractItemView::SingleSelection); connect(ui.listLanguages, SIGNAL(itemSelectionChanged()), this, SLOT(updateLanguage())); + this->setModal(true); + connect(ui.buttonOk, SIGNAL(clicked()), this, SLOT(accept())); connect(ui.buttonCancel, SIGNAL(clicked()), this, SLOT(abort())); connect(ui.radioNoProxy, SIGNAL(toggled(bool)), this, SLOT(setNoProxy(bool))); diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp index 4397d3c2f5..f348d5b96d 100644 --- a/rbutil/rbutilqt/progressloggergui.cpp +++ b/rbutil/rbutilqt/progressloggergui.cpp @@ -22,6 +22,7 @@ ProgressLoggerGui::ProgressLoggerGui(QObject* parent): ProgressloggerInterface(parent) { downloadProgress = new QDialog(); + downloadProgress->setModal(true); dp.setupUi(downloadProgress); connect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort())); } diff --git a/rbutil/rbutilqt/progressloggergui.h b/rbutil/rbutilqt/progressloggergui.h index e0f2d9130a..2290fcb080 100644 --- a/rbutil/rbutilqt/progressloggergui.h +++ b/rbutil/rbutilqt/progressloggergui.h @@ -24,7 +24,7 @@ #include "progressloggerinterface.h" #include "ui_installprogressfrm.h" -class ProgressLoggerGui :public ProgressloggerInterface +class ProgressLoggerGui :public ProgressloggerInterface { Q_OBJECT public: diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index dda324febb..14f34824f7 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -138,10 +138,11 @@ void RbUtilQt::downloadDone(int id, bool error) void RbUtilQt::about() { - QDialog *window = new QDialog; + QDialog *window = new QDialog(this); Ui::aboutBox about; about.setupUi(window); - + window->setModal(true); + QFile licence(":/docs/gpl-2.0.html"); licence.open(QIODevice::ReadOnly); QTextStream c(&licence);