Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

When the privacy indicator is visible clicking on it will result in

private mode being turned off.
  • Loading branch information...
commit 76efe66ee9b07f06c29f0af94044fd611d7a52db 1 parent bac8748
@icefox icefox authored
View
8 src/locationbar/privacyindicator.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Benjamin C. Meyer <ben@meyerhome.net>
+ * Copyright 2009-2010 Benjamin C. Meyer <ben@meyerhome.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -27,6 +27,12 @@ PrivacyIndicator::PrivacyIndicator(QWidget *parent)
setPixmap(QPixmap(QLatin1String(":graphics/private.png")));
connect(BrowserApplication::instance(), SIGNAL(privacyChanged(bool)),
this, SLOT(setVisible(bool)));
+ setCursor(Qt::ArrowCursor);
setVisible(BrowserApplication::isPrivate());
}
+void PrivacyIndicator::mousePressEvent(QMouseEvent *event)
+{
+ Q_UNUSED(event)
+ BrowserApplication::instance()->setPrivate(false);
+}
View
5 src/locationbar/privacyindicator.h
@@ -1,5 +1,5 @@
/*
- * Copyright 2009 Benjamin C. Meyer <ben@meyerhome.net>
+ * Copyright 2009-2010 Benjamin C. Meyer <ben@meyerhome.net>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,6 +29,9 @@ class PrivacyIndicator : public QLabel
public:
PrivacyIndicator(QWidget *parent = 0);
+protected:
+ void mousePressEvent(QMouseEvent *event);
+
};
#endif // PRIVACYINDICATOR_H
Please sign in to comment.
Something went wrong with that request. Please try again.