diff --git a/CHANGELOG b/CHANGELOG index e96d96950..3152110d5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,15 @@ # Change Log +## 2.2.26 08/10/2021 + +* Upgrade embedded Python to version 3.7 in Windows package +* Upgrade Visual C++ Redistributable for Visual Studio 2019 in Windows package +* Fix SSL support in Windows package +* Open "template configuration" dialog with double click on template name in "Preferences". Fixes #3239 +* Only show "virtio" network adapter when legacy node is enabled. Fixes https://github.com/GNS3/gns3-gui/issues/1969 +* Double-click on a template opens "template configuration" dialog. Fixes #3236 +* Fix "Custom symbols" can't be unfolded after using "Filter" field. Fixes #3231 + ## 2.2.25 14/09/2021 * Fix menu disabled for modal dialogs on macOS. Fixes #3007 diff --git a/gns3/crash_report.py b/gns3/crash_report.py index 66d8e0da0..f05a4a8e0 100644 --- a/gns3/crash_report.py +++ b/gns3/crash_report.py @@ -51,7 +51,7 @@ class CrashReport: Report crash to a third party service """ - DSN = "https://ca0e3be7dada465495fc33615f6143b8:4ddf20c171744e138fd327929c5e15f2@o19455.ingest.sentry.io/38506" + DSN = "https://803fefdf04db46ee9f4f245a53e58e70:91e2e200ee32481a976937182357ecc8@o19455.ingest.sentry.io/38506" _instance = None def __init__(self): diff --git a/gns3/dialogs/symbol_selection_dialog.py b/gns3/dialogs/symbol_selection_dialog.py index 4e9462509..3a6b7cc37 100644 --- a/gns3/dialogs/symbol_selection_dialog.py +++ b/gns3/dialogs/symbol_selection_dialog.py @@ -119,13 +119,13 @@ def _filter(self): """ text = self.uiSearchLineEdit.text() for item in self._symbol_items: - if not item.data(0, QtCore.Qt.UserRole).builtin(): - item.setHidden(True) + # if not item.data(0, QtCore.Qt.UserRole).builtin(): + # item.setHidden(True) + # else: + if not text.strip() or text.strip().lower() in item.text(0).lower(): + item.setHidden(False) else: - if len(text.strip()) == 0 or text.strip().lower() in item.text(0).lower(): - item.setHidden(False) - else: - item.setHidden(True) + item.setHidden(True) def _customSymbolToggledSlot(self, checked): """ diff --git a/gns3/modules/builtin/pages/cloud_preferences_page.py b/gns3/modules/builtin/pages/cloud_preferences_page.py index a2978b846..c206f392d 100644 --- a/gns3/modules/builtin/pages/cloud_preferences_page.py +++ b/gns3/modules/builtin/pages/cloud_preferences_page.py @@ -52,6 +52,7 @@ def __init__(self): self.uiEditCloudNodePushButton.clicked.connect(self._editCloudNodeSlot) self.uiDeleteCloudNodePushButton.clicked.connect(self._deleteCloudNodeSlot) self.uiCloudNodesTreeWidget.itemSelectionChanged.connect(self._cloudNodeChangedSlot) + self.uiCloudNodesTreeWidget.itemDoubleClicked.connect(self._editCloudNodeSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/builtin/pages/ethernet_hub_preferences_page.py b/gns3/modules/builtin/pages/ethernet_hub_preferences_page.py index cfec58708..a37da7aa6 100644 --- a/gns3/modules/builtin/pages/ethernet_hub_preferences_page.py +++ b/gns3/modules/builtin/pages/ethernet_hub_preferences_page.py @@ -53,6 +53,8 @@ def __init__(self): self.uiEditEthernetHubPushButton.clicked.connect(self._editEthernetHubSlot) self.uiDeleteEthernetHubPushButton.clicked.connect(self._deleteEthernetHubSlot) self.uiEthernetHubsTreeWidget.itemSelectionChanged.connect(self._ethernetHubChangedSlot) + self.uiEthernetHubsTreeWidget.itemDoubleClicked.connect(self._editEthernetHubSlot) + def _createSectionItem(self, name): """ diff --git a/gns3/modules/builtin/pages/ethernet_switch_preferences_page.py b/gns3/modules/builtin/pages/ethernet_switch_preferences_page.py index 68b4bad42..aebc56b7e 100644 --- a/gns3/modules/builtin/pages/ethernet_switch_preferences_page.py +++ b/gns3/modules/builtin/pages/ethernet_switch_preferences_page.py @@ -53,6 +53,7 @@ def __init__(self): self.uiEditEthernetSwitchPushButton.clicked.connect(self._editEthernetSwitchSlot) self.uiDeleteEthernetSwitchPushButton.clicked.connect(self._deleteEthernetSwitchSlot) self.uiEthernetSwitchesTreeWidget.itemSelectionChanged.connect(self._ethernetSwitchChangedSlot) + self.uiEthernetSwitchesTreeWidget.itemDoubleClicked.connect(self._editEthernetSwitchSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/docker/pages/docker_vm_preferences_page.py b/gns3/modules/docker/pages/docker_vm_preferences_page.py index 16ae4dc34..4b69b033b 100644 --- a/gns3/modules/docker/pages/docker_vm_preferences_page.py +++ b/gns3/modules/docker/pages/docker_vm_preferences_page.py @@ -52,6 +52,7 @@ def __init__(self): self.uiEditDockerVMPushButton.clicked.connect(self._dockerImageEditSlot) self.uiDeleteDockerVMPushButton.clicked.connect(self._dockerImageDeleteSlot) self.uiDockerVMsTreeWidget.itemSelectionChanged.connect(self._dockerImageChangedSlot) + self.uiDockerVMsTreeWidget.itemDoubleClicked.connect(self._dockerImageEditSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/dynamips/pages/ios_router_preferences_page.py b/gns3/modules/dynamips/pages/ios_router_preferences_page.py index 137546a03..58c36d0d1 100644 --- a/gns3/modules/dynamips/pages/ios_router_preferences_page.py +++ b/gns3/modules/dynamips/pages/ios_router_preferences_page.py @@ -70,6 +70,7 @@ def __init__(self): self.uiDeleteIOSRouterPushButton.clicked.connect(self._iosRouterDeleteSlot) self.uiIOSRoutersTreeWidget.itemSelectionChanged.connect(self._iosRouterChangedSlot) self.uiDecompressIOSPushButton.clicked.connect(self._decompressIOSSlot) + self.uiIOSRoutersTreeWidget.itemDoubleClicked.connect(self._iosRouterEditSlot) def _iosRouterChangedSlot(self): """ diff --git a/gns3/modules/iou/pages/iou_device_preferences_page.py b/gns3/modules/iou/pages/iou_device_preferences_page.py index 6eebdcb1f..0af6c47a7 100644 --- a/gns3/modules/iou/pages/iou_device_preferences_page.py +++ b/gns3/modules/iou/pages/iou_device_preferences_page.py @@ -59,6 +59,7 @@ def __init__(self): self.uiEditIOUDevicePushButton.clicked.connect(self._iouDeviceEditSlot) self.uiDeleteIOUDevicePushButton.clicked.connect(self._iouDeviceDeleteSlot) self.uiIOUDevicesTreeWidget.itemSelectionChanged.connect(self._iouDeviceChangedSlot) + self.uiIOUDevicesTreeWidget.itemDoubleClicked.connect(self._iouDeviceEditSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/qemu/pages/qemu_vm_configuration_page.py b/gns3/modules/qemu/pages/qemu_vm_configuration_page.py index 144bb68b2..c240f9bf5 100644 --- a/gns3/modules/qemu/pages/qemu_vm_configuration_page.py +++ b/gns3/modules/qemu/pages/qemu_vm_configuration_page.py @@ -102,6 +102,7 @@ def __init__(self): # Supported NIC models: e1000, e1000-82544gc, e1000-82545em, e1000e, i82550, i82551, i82557a, i82557b, i82557c, i82558a # i82558b, i82559a, i82559b, i82559c, i82559er, i82562, i82801, ne2k_pci, pcnet, rocker, rtl8139, virtio-net-pci, vmxnet3 + # This list can be retrieved using "qemu-system-x86_64 -nic model=?" or "qemu-system-x86_64 -device help" self._legacy_devices = ("e1000", "i82551", "i82557b", "i82559er", "ne2k_pci", "pcnet", "rtl8139", "virtio") self._qemu_network_devices = OrderedDict([("e1000", "Intel Gigabit Ethernet"), ("e1000-82544gc", "Intel 82544GC Gigabit Ethernet"), @@ -154,6 +155,9 @@ def _refreshQemuNetworkDevices(self, legacy_networking=False): for device_name, device_description in self._qemu_network_devices.items(): if legacy_networking and device_name not in self._legacy_devices: continue + # special case for virtio legacy networking + if not legacy_networking and device_name == "virtio": + continue self.uiAdapterTypesComboBox.addItem("{} ({})".format(device_description, device_name), device_name) @staticmethod @@ -421,7 +425,9 @@ def _customAdaptersConfigurationSlot(self): if nic in self._legacy_devices: network_devices[nic] = desc else: - network_devices = self._qemu_network_devices + network_devices = self._qemu_network_devices.copy() + # special case for virtio legacy networking + network_devices.pop("virtio") dialog = CustomAdaptersConfigurationDialog(ports, self._custom_adapters, default_adapter, network_devices, base_mac_address, parent=self) dialog.show() diff --git a/gns3/modules/qemu/pages/qemu_vm_preferences_page.py b/gns3/modules/qemu/pages/qemu_vm_preferences_page.py index 7769d171f..0e5d717e6 100644 --- a/gns3/modules/qemu/pages/qemu_vm_preferences_page.py +++ b/gns3/modules/qemu/pages/qemu_vm_preferences_page.py @@ -54,6 +54,7 @@ def __init__(self): self.uiEditQemuVMPushButton.clicked.connect(self._qemuVMEditSlot) self.uiDeleteQemuVMPushButton.clicked.connect(self._qemuVMDeleteSlot) self.uiQemuVMsTreeWidget.itemSelectionChanged.connect(self._qemuVMChangedSlot) + self.uiQemuVMsTreeWidget.itemDoubleClicked.connect(self._qemuVMEditSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/virtualbox/pages/virtualbox_vm_preferences_page.py b/gns3/modules/virtualbox/pages/virtualbox_vm_preferences_page.py index 2ec5bb109..f2ec203a5 100644 --- a/gns3/modules/virtualbox/pages/virtualbox_vm_preferences_page.py +++ b/gns3/modules/virtualbox/pages/virtualbox_vm_preferences_page.py @@ -54,6 +54,7 @@ def __init__(self): self.uiEditVirtualBoxVMPushButton.clicked.connect(self._vboxVMEditSlot) self.uiDeleteVirtualBoxVMPushButton.clicked.connect(self._vboxVMDeleteSlot) self.uiVirtualBoxVMsTreeWidget.itemSelectionChanged.connect(self._vboxVMChangedSlot) + self.uiVirtualBoxVMsTreeWidget.itemDoubleClicked.connect(self._vboxVMEditSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/vmware/pages/vmware_vm_preferences_page.py b/gns3/modules/vmware/pages/vmware_vm_preferences_page.py index 1c60fb8b4..3f6fc1e6a 100644 --- a/gns3/modules/vmware/pages/vmware_vm_preferences_page.py +++ b/gns3/modules/vmware/pages/vmware_vm_preferences_page.py @@ -53,6 +53,7 @@ def __init__(self): self.uiEditVMwareVMPushButton.clicked.connect(self._vmwareVMEditSlot) self.uiDeleteVMwareVMPushButton.clicked.connect(self._vmwareVMDeleteSlot) self.uiVMwareVMsTreeWidget.itemSelectionChanged.connect(self._vmwareVMChangedSlot) + self.uiVMwareVMsTreeWidget.itemDoubleClicked.connect(self._vmwareVMEditSlot) def _createSectionItem(self, name): """ diff --git a/gns3/modules/vpcs/pages/vpcs_node_preferences_page.py b/gns3/modules/vpcs/pages/vpcs_node_preferences_page.py index 91f567a0c..1a96487d8 100644 --- a/gns3/modules/vpcs/pages/vpcs_node_preferences_page.py +++ b/gns3/modules/vpcs/pages/vpcs_node_preferences_page.py @@ -53,6 +53,7 @@ def __init__(self): self.uiEditVPCSPushButton.clicked.connect(self._editVPCSSlot) self.uiDeleteVPCSPushButton.clicked.connect(self._deleteVPCSSlot) self.uiVPCSTreeWidget.itemSelectionChanged.connect(self._vpcsChangedSlot) + self.uiVPCSTreeWidget.itemDoubleClicked.connect(self._editVPCSSlot) def _createSectionItem(self, name): """ diff --git a/gns3/nodes_view.py b/gns3/nodes_view.py index dbd4e45b2..5c76620ba 100644 --- a/gns3/nodes_view.py +++ b/gns3/nodes_view.py @@ -151,6 +151,22 @@ def contextMenuEvent(self, event): self._showContextualMenu(event.globalPos()) + def mouseDoubleClickEvent(self, event): + """ + Handles all mouse double click events. + + :param event: QMouseEvent instance + """ + + item = self.itemAt(event.pos()) + if item: + template = TemplateManager.instance().getTemplate(item.data(0, QtCore.Qt.UserRole)) + if template: + configuration_page = TEMPLATE_TYPE_TO_CONFIGURATION_PAGE.get(template.template_type()) + if not template.builtin() and configuration_page: + self._configurationSlot(template, configuration_page) + super().mouseDoubleClickEvent(event) + def mouseMoveEvent(self, event): """ Handles all mouse move events. @@ -204,14 +220,14 @@ def _showContextualMenu(self, pos): menu.exec_(pos) - def _configurationSlot(self, template, configuration_page, source): + def _configurationSlot(self, template, configuration_page, source=None): dialog = ConfigurationDialog(template.name(), template.settings(), configuration_page(), parent=self) dialog.show() if dialog.exec_(): TemplateManager.instance().updateTemplate(template) - def _deleteSlot(self, template, source): + def _deleteSlot(self, template, source=None): reply = QtWidgets.QMessageBox.question(self, "Template", "Delete {} template?".format(template.name()), QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No) diff --git a/gns3/version.py b/gns3/version.py index d826feff5..fcf306f95 100644 --- a/gns3/version.py +++ b/gns3/version.py @@ -23,8 +23,8 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "2.2.25" -__version_info__ = (2, 2, 25, 0) +__version__ = "2.2.26" +__version_info__ = (2, 2, 26, 0) if "dev" in __version__: try: