summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorunknown <Roopesh Chander@.(none)>2009-11-12 12:37:53 +0530
committerunknown <Roopesh Chander@.(none)>2009-11-12 12:37:53 +0530
commit08c0dd8e97e715f341da6ff78997bf39d980ec55 (patch)
tree05c2fa501b7cae458f66a5d4bdeb5e13d593b63b
parent2777df779def787de000349f4dcdf974278df324 (diff)
disable scrap selection on entering the browser
-rw-r--r--mainwindow.cpp8
-rw-r--r--mainwindow.h1
2 files changed, 8 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp
index 622ef77..6b5720d 100644
--- a/mainwindow.cpp
+++ b/mainwindow.cpp
@@ -47,6 +47,7 @@ MainWindow::MainWindow(QWidget *parent)
transitionToScraps->addAnimation(m_browserToScrapsAnimation);
transitionToScraps2->addAnimation(m_browserToScrapsAnimation);
connect(browseWeb, SIGNAL(entered()), m_webView, SLOT(show()));
+ connect(browseWeb, SIGNAL(entered()), SLOT(disableScrapSelection()));
connect(m_browserToScrapsAnimation, SIGNAL(finished()), m_webView, SLOT(hide()));
connect(browseWeb, SIGNAL(entered()), SLOT(showBrowserToolbar()));
@@ -151,7 +152,7 @@ void MainWindow::createBrowserToolbar(QGraphicsScene *scene) {
m_browserToolbar->setBackgroundBrush(palette().background());
m_browserToolbar->setFillLevelBrush(QColor(50, 50, 200).lighter(200));
- connect(m_selectScrapsButton, SIGNAL(clicked(bool)), m_webView, SLOT(setScrapSelectionEnabled(bool)));
+ connect(m_selectScrapsButton, SIGNAL(toggled(bool)), m_webView, SLOT(setScrapSelectionEnabled(bool)));
connect(m_addressBar, SIGNAL(returnPressed()), SLOT(changeLocation()));
}
@@ -430,3 +431,8 @@ void MainWindow::showScrapsToolbar() {
QAbstractAnimation *anim = createToolbarAnim(m_browserToolbar, m_scrapsToolbar, Clockwise, this);
anim->start(QAbstractAnimation::DeleteWhenStopped);
}
+
+void MainWindow::disableScrapSelection() {
+ if (m_selectScrapsButton)
+ m_selectScrapsButton->setChecked(false);
+}
diff --git a/mainwindow.h b/mainwindow.h
index 1eebdc2..e1188d8 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -67,6 +67,7 @@ public slots:
void searchTextChanged(const QString& text);
void showBrowserToolbar();
void showScrapsToolbar();
+ void disableScrapSelection();
private:
Ui::MainWindow *ui;