Commit a6495771 authored by Ilia Kats's avatar Ilia Kats
Browse files

make connection editor window modal instead of application modal.

BUG: 253317
(cherry picked from commit 0ff348e0)

Conflicts:

	plasma_nm_version.h
parent 6b2842b8
......@@ -66,9 +66,11 @@ ConnectionEditor::~ConnectionEditor()
void ConnectionEditor::editConnection(Knm::Connection::Type type, const QVariantList &args)
{
KDialog configDialog(0);
QWidget *parentWidget = qobject_cast<QWidget*>(parent());
KDialog configDialog(parentWidget);
configDialog.setCaption(i18nc("Edit connection dialog caption", "Edit Network Connection"));
configDialog.setWindowIcon(KIcon("networkmanager"));
configDialog.setWindowModality(Qt::WindowModal);
ConnectionPreferences * cprefs = editorForConnectionType(false, &configDialog, type, args);
connect(cprefs, SIGNAL(valid(bool)), &configDialog, SLOT(enableButtonOk(bool)));
......@@ -89,11 +91,12 @@ void ConnectionEditor::editConnection(Knm::Connection::Type type, const QVariant
Knm::Connection *ConnectionEditor::editConnection(Knm::Connection *con)
{
Knm::Connection *cprefsCon = NULL;
KDialog configDialog(0);
QWidget *parentWidget = qobject_cast<QWidget*>(parent());
KDialog configDialog(parentWidget);
configDialog.setCaption(i18nc("Edit connection dialog caption", "Edit Network Connection"));
configDialog.setWindowIcon(KIcon("networkmanager"));
configDialog.setWindowModality(Qt::WindowModal);
ConnectionPreferences * cprefs = editorForConnectionType(&configDialog, con);
connect(cprefs, SIGNAL(valid(bool)), &configDialog, SLOT(enableButtonOk(bool)));
......@@ -121,9 +124,11 @@ Knm::Connection *ConnectionEditor::editConnection(Knm::Connection *con)
Knm::Connection *ConnectionEditor::createConnection(bool useDefaults, Knm::Connection::Type type, const QVariantList &otherArgs, const bool autoAccept)
{
Knm::Connection *cprefsCon = NULL;
KDialog configDialog(0);
QWidget *parentWidget = qobject_cast<QWidget*>(parent());
KDialog configDialog(parentWidget);
configDialog.setCaption(i18nc("Add connection dialog caption", "Add Network Connection"));
configDialog.setWindowIcon(KIcon("networkmanager"));
configDialog.setWindowModality(Qt::WindowModal);
QVariantList args;
......
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