+ if(Settings::instance()->getConnectionType() == Settings::ALWAYS_ASK)
+ {
+ if(!warning_)
+ {
+ warning_ = new QDialog(this);
+ warning_->setWindowTitle(tr("Unable to start daemon"));
+ QHBoxLayout* warningLayout = new QHBoxLayout;
+ QTextEdit* text = new QTextEdit(tr("Daemon cannot be started because it's not allowed to connect to the Internet. You have to either allow automatic Internet connection in Jenirok settings or in global Maemo settings."));
+ text->setReadOnly(true);
+ QDialogButtonBox* buttons = new QDialogButtonBox;
+ buttons->setOrientation(Qt::Vertical);
+ QPushButton* settingsButton = new QPushButton(tr("Open settings"));
+ connect(settingsButton, SIGNAL(pressed()), this, SLOT(showSettings()));
+ QPushButton* okButton = new QPushButton(tr("Close"));
+ connect(okButton, SIGNAL(pressed()), warning_, SLOT(hide()));
+ buttons->addButton(settingsButton, QDialogButtonBox::YesRole);
+ buttons->addButton(okButton, QDialogButtonBox::AcceptRole);
+ warningLayout->addWidget(text);
+ warningLayout->addWidget(buttons);
+ warning_->setLayout(warningLayout);
+ }
+
+ warning_->show();
+
+ return;
+ }
+