summaryrefslogtreecommitdiff
path: root/src/webtab.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2010-09-03 23:53:41 +0200
committerAndrea Diamantini <adjam7@gmail.com>2010-09-03 23:53:41 +0200
commite8dcb9a3671bd4d595106684ddc7efa7ddd32833 (patch)
tree7f5910e63b9cb109e70c4e813a72eb26f8b3d181 /src/webtab.cpp
parentok, it seems working now. But I'm not sure this is the right fix.. (diff)
parentFixes the multiple preview/walet bars in a single tab. (diff)
downloadrekonq-e8dcb9a3671bd4d595106684ddc7efa7ddd32833.tar.xz
Merge commit 'refs/merge-requests/201' of git://gitorious.org/rekonq/mainline into m201
Diffstat (limited to 'src/webtab.cpp')
-rw-r--r--src/webtab.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/webtab.cpp b/src/webtab.cpp
index a9a43bd9..02c94d32 100644
--- a/src/webtab.cpp
+++ b/src/webtab.cpp
@@ -129,35 +129,35 @@ void WebTab::createWalletBar(const QString &key, const QUrl &url)
if (blackList.contains(urlString))
return;
- if(!_walletBar.isNull())
- {
- _walletBar.clear();
+ if(_walletBar.isNull()) {
+ _walletBar = new WalletBar(this);
+ KWebWallet *wallet = page()->wallet();
+ _walletBar.data()->onSaveFormData(key, url);
+ qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, _walletBar.data() );
+
+ connect(_walletBar.data(), SIGNAL(saveFormDataAccepted(const QString &)),
+ wallet, SLOT(acceptSaveFormDataRequest(const QString &)));
+ connect(_walletBar.data(), SIGNAL(saveFormDataRejected(const QString &)),
+ wallet, SLOT(rejectSaveFormDataRequest(const QString &)));
+ } else {
+ _walletBar.data()->notifyUser();
}
- KWebWallet *wallet = page()->wallet();
- _walletBar = new WalletBar(this);
- _walletBar.data()->onSaveFormData(key, url);
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, _walletBar.data() );
-
- connect(_walletBar.data(), SIGNAL(saveFormDataAccepted(const QString &)),
- wallet, SLOT(acceptSaveFormDataRequest(const QString &)));
- connect(_walletBar.data(), SIGNAL(saveFormDataRejected(const QString &)),
- wallet, SLOT(rejectSaveFormDataRequest(const QString &)));
}
void WebTab::createPreviewSelectorBar(int index)
{
- if(!_previewSelectorBar.isNull())
- {
- _previewSelectorBar.clear();
+ if(_previewSelectorBar.isNull()) {
+ _previewSelectorBar = new PreviewSelectorBar(index, this);
+ qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, _previewSelectorBar.data());
+
+ connect(page(), SIGNAL(loadStarted()), _previewSelectorBar.data(), SLOT(loadProgress()));
+ connect(page(), SIGNAL(loadProgress(int)), _previewSelectorBar.data(), SLOT(loadProgress()));
+ connect(page(), SIGNAL(loadFinished(bool)), _previewSelectorBar.data(), SLOT(loadFinished()));
+ connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), _previewSelectorBar.data(), SLOT(verifyUrl()));
+ } else {
+ _previewSelectorBar.data()->notifyUser();
}
- _previewSelectorBar = new PreviewSelectorBar(index, this);
- qobject_cast<QVBoxLayout *>(layout())->insertWidget(0, _previewSelectorBar.data());
-
- connect(page(), SIGNAL(loadStarted()), _previewSelectorBar.data(), SLOT(loadProgress()));
- connect(page(), SIGNAL(loadProgress(int)), _previewSelectorBar.data(), SLOT(loadProgress()));
- connect(page(), SIGNAL(loadFinished(bool)), _previewSelectorBar.data(), SLOT(loadFinished()));
- connect(page()->mainFrame(), SIGNAL(urlChanged(QUrl)), _previewSelectorBar.data(), SLOT(verifyUrl()));
}