Skip to content

Commit

Permalink
Merge branch '2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
grossmj committed Oct 8, 2021
2 parents f26c638 + cf3e716 commit 2131f07
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 12 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion gns3/crash_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
12 changes: 6 additions & 6 deletions gns3/dialogs/symbol_selection_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/builtin/pages/cloud_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
2 changes: 2 additions & 0 deletions gns3/modules/builtin/pages/ethernet_hub_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/docker/pages/docker_vm_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/dynamips/pages/ios_router_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/iou/pages/iou_device_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
8 changes: 7 additions & 1 deletion gns3/modules/qemu/pages/qemu_vm_configuration_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/qemu/pages/qemu_vm_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/vmware/pages/vmware_vm_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
1 change: 1 addition & 0 deletions gns3/modules/vpcs/pages/vpcs_node_preferences_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down
20 changes: 18 additions & 2 deletions gns3/nodes_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions gns3/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2131f07

Please sign in to comment.