diff easyhg.py @ 457:b09d0e6214d8

Add security warning about password remember feature
author Chris Cannam
date Wed, 29 Jun 2011 16:40:14 +0100
parents 2f25cc7b81fa
children c22cef015d73
line wrap: on
line diff
--- a/easyhg.py	Wed Jun 29 16:22:53 2011 +0100
+++ b/easyhg.py	Wed Jun 29 16:40:14 2011 +0100
@@ -44,7 +44,7 @@
 #
 easyhg_pyqt_ok = True
 try:
-    from PyQt4 import Qt, QtGui
+    from PyQt4 import Qt, QtCore, QtGui
 except ImportError:
     easyhg_pyqt_ok = False
 easyhg_qtapp = None
@@ -269,6 +269,12 @@
             remember_field.setChecked(self.auth_store.remember)
             remember_field.setText(_('Remember these details while EasyMercurial is running'))
             layout.addWidget(remember_field, 3, 1)
+            warning_field = QtGui.QLabel()
+            warning_field.setText(_('<qt><i><small>Note: Do not select this if anyone else has access to this machine!</small></i><br></qt>'))
+            warning_field.hide()
+            remember_field.connect(remember_field, Qt.SIGNAL("clicked()"),
+                                   warning_field, Qt.SLOT("show()"))
+            layout.addWidget(warning_field, 4, 1, QtCore.Qt.AlignRight)
 
         bb = QtGui.QDialogButtonBox()
         ok = bb.addButton(bb.Ok)
@@ -278,7 +284,7 @@
         ok.setDefault(True)
         bb.connect(ok, Qt.SIGNAL("clicked()"), dialog, Qt.SLOT("accept()"))
         bb.connect(cancel, Qt.SIGNAL("clicked()"), dialog, Qt.SLOT("reject()"))
-        layout.addWidget(bb, 4, 0, 1, 2)
+        layout.addWidget(bb, 5, 0, 1, 2)
 
         dialog.setWindowTitle(_('EasyMercurial: Login'))
         dialog.show()