eric6/Plugins/VcsPlugins/vcsMercurial/GpgExtension/HgGpgSignDialog.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7780
41420f82c0ac
child 8143
2c730d5fd177
permissions
-rw-r--r--

Updated copyright for 2021.

1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2011 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to enter data for signing a revision.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
10 from PyQt5.QtCore import pyqtSlot
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
11 from PyQt5.QtWidgets import QDialog, QDialogButtonBox
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 from .Ui_HgGpgSignDialog import Ui_HgGpgSignDialog
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16 class HgGpgSignDialog(QDialog, Ui_HgGpgSignDialog):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 Class implementing a dialog to enter data for signing a revision.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
3008
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
20 def __init__(self, tagsList, branchesList, bookmarksList=None,
7848489bcb92 Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2302
diff changeset
21 parent=None):
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 Constructor
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 @param tagsList list of tags (list of strings)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param branchesList list of branches (list of strings)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @param bookmarksList list of bookmarks (list of strings)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 @param parent reference to the parent widget (QWidget)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2302
diff changeset
30 super(HgGpgSignDialog, self).__init__(parent)
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 self.setupUi(self)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.tagCombo.addItems(sorted(tagsList))
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.branchCombo.addItems(["default"] + sorted(branchesList))
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 if bookmarksList is not None:
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 self.bookmarkCombo.addItems(sorted(bookmarksList))
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 else:
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.bookmarkButton.setHidden(True)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.bookmarkCombo.setHidden(True)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 def __updateOK(self):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 Private slot to update the OK button.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47 enabled = True
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 if self.idButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49 enabled = enabled and self.idEdit.text() != ""
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 elif self.tagButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 enabled = enabled and self.tagCombo.currentText() != ""
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 elif self.branchButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 enabled = enabled and self.branchCombo.currentText() != ""
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 elif self.bookmarkButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 enabled = enabled and self.bookmarkCombo.currentText() != ""
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(enabled)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 @pyqtSlot(bool)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 def on_idButton_toggled(self, checked):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 Private slot to handle changes of the ID select button.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 @param checked state of the button (boolean)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 @pyqtSlot(bool)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 def on_tagButton_toggled(self, checked):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 Private slot to handle changes of the Tag select button.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 @param checked state of the button (boolean)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
74 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
75 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
77 @pyqtSlot(bool)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
78 def on_branchButton_toggled(self, checked):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
80 Private slot to handle changes of the Branch select button.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
81
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
82 @param checked state of the button (boolean)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 @pyqtSlot(bool)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 def on_bookmarkButton_toggled(self, checked):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 Private slot to handle changes of the Bookmark select button.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 @param checked state of the button (boolean)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 @pyqtSlot(str)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 def on_idEdit_textChanged(self, txt):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 Private slot to handle changes of the ID edit.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 @param txt text of the edit (string)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
104 @pyqtSlot(str)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
105 def on_tagCombo_editTextChanged(self, txt):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 Private slot to handle changes of the Tag combo.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 @param txt text of the combo (string)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 @pyqtSlot(str)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114 def on_branchCombo_editTextChanged(self, txt):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 Private slot to handle changes of the Branch combo.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 @param txt text of the combo (string)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
120 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
121
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
122 @pyqtSlot(str)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 def on_bookmarkCombo_editTextChanged(self, txt):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 Private slot to handle changes of the Bookmark combo.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 @param txt text of the combo (string)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 self.__updateOK()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 def getData(self):
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133 Public method to retrieve the entered data.
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 @return tuple giving the revision, a flag indicating not to commit
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
136 the signature, a commit message, an ID of the key to be used,
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
137 a flag indicating a local signature and a flag indicating a forced
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
138 signature (string, boolean, string, string, boolean, boolean)
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
139 """
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
140 if self.numberButton.isChecked():
5476
fb81a812ed9c Fixed a bug in the Mercurial GPG sign dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
141 rev = str(self.numberSpinBox.value())
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
142 elif self.idButton.isChecked():
5476
fb81a812ed9c Fixed a bug in the Mercurial GPG sign dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
143 rev = self.idEdit.text()
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144 elif self.tagButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
145 rev = self.tagCombo.currentText()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
146 elif self.branchButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
147 rev = self.branchCombo.currentText()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
148 elif self.bookmarkButton.isChecked():
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
149 rev = self.bookmarkCombo.currentText()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
150 else:
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
151 rev = ""
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
152
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
153 return (
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
154 rev,
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
155 self.nocommitCheckBox.isChecked(),
1112
8a7d1b9d18db Improved code quality by getting rid of star imports. That way pyflakes can do its job. A few bugs fixed found by flakes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1075
diff changeset
156 self.messageEdit.toPlainText(),
1075
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
157 self.keyEdit.text(),
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
158 self.localCheckBox.isChecked(),
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 self.forceCheckBox.isChecked()
75bfe8bd4243 Added support for the Mercurial gpg extension.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
160 )

eric ide

mercurial