Sat, 18 Mar 2017 17:06:16 +0100
Started to extend the Mercurial user configuration dialog.
--- a/Plugins/VcsPlugins/vcsMercurial/HgUserConfigDialog.py Sat Mar 18 16:20:08 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgUserConfigDialog.py Sat Mar 18 17:06:16 2017 +0100 @@ -62,6 +62,20 @@ self.fpDeleteButton.setIcon(UI.PixmapCache.getIcon("minus.png")) self.fpEditButton.setIcon(UI.PixmapCache.getIcon("edit.png")) + self.protocolAddButton.setIcon(UI.PixmapCache.getIcon("plus.png")) + self.protocolDeleteButton.setIcon(UI.PixmapCache.getIcon("minus.png")) + self.protocolEditButton.setIcon(UI.PixmapCache.getIcon("edit.png")) + + self.minimumProtocolComboBox.addItem("", "") + self.minimumProtocolComboBox.addItem(self.tr("TLS 1.0"), "tls1.0") + self.minimumProtocolComboBox.addItem(self.tr("TLS 1.1"), "tls1.1") + self.minimumProtocolComboBox.addItem(self.tr("TLS 1.2"), "tls1.2") + + if self.__version < (3, 9, 0): + self.disableTls10WarningCheckBox.setEnabled(False) + self.minimumProtocolComboBox.setEnabled(False) + self.minimumProtcolGroupBox.setEnabled(False) + self.tabWidget.setCurrentIndex(0) self.__editor = None @@ -378,6 +392,9 @@ fingerprint.replace("\\", "").strip() ]) self.__finalizeFingerprintsColumns() + # TODO: add support for disabletls10warning = true + # TODO: add support for minimumprotocol = (tls1.0, tls1.1, tls1.2) + # TODO: add support for <hostname>:minimumprotocol = ... @pyqtSlot() def accept(self): @@ -542,3 +559,40 @@ return True return False + + @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) + def on_protocolsList_currentItemChanged(self, current, previous): + """ + Slot documentation goes here. + + @param current DESCRIPTION + @type QTreeWidgetItem + @param previous DESCRIPTION + @type QTreeWidgetItem + """ + # TODO: not implemented yet + return + + @pyqtSlot() + def on_protocolAddButton_clicked(self): + """ + Slot documentation goes here. + """ + # TODO: not implemented yet + raise NotImplementedError + + @pyqtSlot() + def on_protocolDeleteButton_clicked(self): + """ + Slot documentation goes here. + """ + # TODO: not implemented yet + raise NotImplementedError + + @pyqtSlot() + def on_protocolEditButton_clicked(self): + """ + Slot documentation goes here. + """ + # TODO: not implemented yet + raise NotImplementedError
--- a/Plugins/VcsPlugins/vcsMercurial/HgUserConfigDialog.ui Sat Mar 18 16:20:08 2017 +0100 +++ b/Plugins/VcsPlugins/vcsMercurial/HgUserConfigDialog.ui Sat Mar 18 17:06:16 2017 +0100 @@ -7,7 +7,7 @@ <x>0</x> <y>0</y> <width>500</width> - <height>500</height> + <height>550</height> </rect> </property> <property name="windowTitle"> @@ -16,11 +16,11 @@ <property name="sizeGripEnabled"> <bool>true</bool> </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> + <layout class="QVBoxLayout" name="verticalLayout_7"> <item> <widget class="QTabWidget" name="tabWidget"> <property name="currentIndex"> - <number>0</number> + <number>3</number> </property> <widget class="QWidget" name="tab"> <attribute name="title"> @@ -102,6 +102,18 @@ <string>Extensions</string> </attribute> <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> <item> <widget class="QGroupBox" name="groupBox_2"> <property name="title"> @@ -311,7 +323,7 @@ <attribute name="title"> <string>Network</string> </attribute> - <layout class="QVBoxLayout" name="verticalLayout_5"> + <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="leftMargin"> <number>6</number> </property> @@ -408,6 +420,35 @@ </widget> </item> <item> + <spacer name="verticalSpacer_3"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>242</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <widget class="QWidget" name="tab_4"> + <attribute name="title"> + <string>Security</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <item> <widget class="QGroupBox" name="groupBox_4"> <property name="title"> <string>Host Fingerprints</string> @@ -480,6 +521,117 @@ </layout> </widget> </item> + <item> + <widget class="QCheckBox" name="disableTls10WarningCheckBox"> + <property name="text"> + <string>Disable TLS 1.0 Warning</string> + </property> + </widget> + </item> + <item> + <layout class="QHBoxLayout" name="horizontalLayout_3"> + <item> + <widget class="QLabel" name="label_10"> + <property name="text"> + <string>Minimum Protocol:</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="minimumProtocolComboBox"> + <property name="toolTip"> + <string>Select the minimum protocol to use</string> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + <item> + <widget class="QGroupBox" name="minimumProtcolGroupBox"> + <property name="title"> + <string>Minimum Protocol per Host</string> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <item> + <widget class="QTreeWidget" name="protocolsList"> + <property name="alternatingRowColors"> + <bool>true</bool> + </property> + <property name="rootIsDecorated"> + <bool>false</bool> + </property> + <property name="itemsExpandable"> + <bool>false</bool> + </property> + <attribute name="headerStretchLastSection"> + <bool>false</bool> + </attribute> + <column> + <property name="text"> + <string>Host</string> + </property> + </column> + <column> + <property name="text"> + <string>Minimum Protocol</string> + </property> + </column> + </widget> + </item> + <item> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <item> + <widget class="QToolButton" name="protocolAddButton"> + <property name="toolTip"> + <string>Add a host minimum protocol entry</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="protocolDeleteButton"> + <property name="toolTip"> + <string>Delete a host minimum protocol entry</string> + </property> + </widget> + </item> + <item> + <widget class="QToolButton" name="protocolEditButton"> + <property name="toolTip"> + <string>Edit a host minimum protocol entry</string> + </property> + </widget> + </item> + <item> + <spacer name="verticalSpacer_5"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </item> + </layout> + </widget> + </item> </layout> </widget> </widget> @@ -543,6 +695,12 @@ <tabstop>fpAddButton</tabstop> <tabstop>fpDeleteButton</tabstop> <tabstop>fpEditButton</tabstop> + <tabstop>disableTls10WarningCheckBox</tabstop> + <tabstop>minimumProtocolComboBox</tabstop> + <tabstop>protocolsList</tabstop> + <tabstop>protocolAddButton</tabstop> + <tabstop>protocolDeleteButton</tabstop> + <tabstop>protocolEditButton</tabstop> <tabstop>editorButton</tabstop> </tabstops> <resources/>