From 106d202012f8f052a3cabe044d7287d2283655fc Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 24 Mar 2016 10:04:38 -0400 Subject: [feature] hide browser menu entry if pixelated is disabled --- src/leap/bitmask/gui/mainwindow.py | 4 ++++ src/leap/bitmask/gui/qt_browser.py | 20 ++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'src/leap/bitmask/gui') diff --git a/src/leap/bitmask/gui/mainwindow.py b/src/leap/bitmask/gui/mainwindow.py index 1f497d2d..839aae87 100644 --- a/src/leap/bitmask/gui/mainwindow.py +++ b/src/leap/bitmask/gui/mainwindow.py @@ -222,6 +222,10 @@ class MainWindow(QtGui.QMainWindow, SignalTracker): self.ui.action_preferences.triggered.connect(self._show_preferences) self.ui.action_pixelated_mail.triggered.connect( self._show_pixelated_browser) + + pixelated_enabled = self._settings.get_pixelmail_enabled() + self.ui.action_pixelated_mail.setVisible(pixelated_enabled) + self.ui.action_about_leap.triggered.connect(self._about) self.ui.action_quit.triggered.connect(self.quit) self.ui.action_wizard.triggered.connect(self._show_wizard) diff --git a/src/leap/bitmask/gui/qt_browser.py b/src/leap/bitmask/gui/qt_browser.py index 4bd947cb..e480b363 100644 --- a/src/leap/bitmask/gui/qt_browser.py +++ b/src/leap/bitmask/gui/qt_browser.py @@ -1,3 +1,23 @@ +# -*- coding: utf-8 -*- +# qt_browser.py +# Copyright (C) 2016 LEAP +# +# 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 +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +""" +QtWebKit-based browser to display Pixelated User Agent +""" + from PySide import QtCore, QtWebKit, QtGui PIXELATED_URI = 'http://localhost:9090' -- cgit v1.2.3