Skip to content

Commit

Permalink
Adjust size for setup dialog and remove question about running the wi…
Browse files Browse the repository at this point in the history
…zard again. Ref #2846
  • Loading branch information
grossmj committed Sep 7, 2019
1 parent da8aa0d commit 4e3eee2
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
11 changes: 3 additions & 8 deletions gns3/dialogs/setup_wizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ def __init__(self, parent):

super().__init__(parent)
self.setupUi(self)
self.adjustSize()

self._gns3_vm_settings = {
"enable": True,
Expand Down Expand Up @@ -411,19 +412,13 @@ def done(self, result):
Controller.instance().setDisplayError(True)
settings = self.parentWidget().settings()
if result:
reply = QtWidgets.QMessageBox.question(self, "Wizard", "Do you want to run the wizard again when starting GNS3?",
QtWidgets.QMessageBox.Yes, QtWidgets.QMessageBox.No)
if reply == QtWidgets.QMessageBox.Yes:
settings["hide_setup_wizard"] = False
elif reply == QtWidgets.QMessageBox.No:
settings["hide_setup_wizard"] = True
settings["hide_setup_wizard"] = True
else:
local_server_settings = LocalServer.instance().localServerSettings()
if local_server_settings["host"] is None:
local_server_settings["host"] = DEFAULT_LOCAL_SERVER_HOST
LocalServer.instance().updateLocalServerSettings(local_server_settings)
settings["hide_setup_wizard"] = self.uiShowCheckBox.isChecked()

settings["hide_setup_wizard"] = not self.uiShowCheckBox.isChecked()
self.parentWidget().setSettings(settings)
super().done(result)

Expand Down
10 changes: 2 additions & 8 deletions gns3/ui/setup_wizard.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,10 @@
<rect>
<x>0</x>
<y>0</y>
<width>1069</width>
<height>615</height>
<width>1081</width>
<height>534</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string>Setup Wizard</string>
</property>
Expand Down
14 changes: 5 additions & 9 deletions gns3/ui/setup_wizard_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,18 @@

# Form implementation generated from reading ui file '/home/grossmj/PycharmProjects/gns3-gui/gns3/ui/setup_wizard.ui'
#
# Created by: PyQt5 UI code generator 5.9
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!


from PyQt5 import QtCore, QtGui, QtWidgets


class Ui_SetupWizard(object):
def setupUi(self, SetupWizard):
SetupWizard.setObjectName("SetupWizard")
SetupWizard.resize(1069, 615)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(SetupWizard.sizePolicy().hasHeightForWidth())
SetupWizard.setSizePolicy(sizePolicy)
SetupWizard.resize(1081, 534)
SetupWizard.setModal(True)
SetupWizard.setWizardStyle(QtWidgets.QWizard.ModernStyle)
SetupWizard.setOptions(QtWidgets.QWizard.NoBackButtonOnStartPage)
Expand Down Expand Up @@ -247,7 +244,7 @@ def retranslateUi(self, SetupWizard):
self.uiVMRadioButton.setToolTip(_translate("SetupWizard", "Dynamips, IOU, VPCS and Qemu will use this virtual machine."))
self.uiVMRadioButton.setText(_translate("SetupWizard", "Run appliances in a virtual machine"))
self.label.setText(_translate("SetupWizard", "Requires to download and install the GNS3 VM (available for free) "))
self.uiLocalRadioButton.setToolTip(_translate("SetupWizard", "Eveything that is supported by your system will run on your computer."))
self.uiLocalRadioButton.setToolTip(_translate("SetupWizard", "Everything that is supported by your system will run on your computer."))
self.uiLocalRadioButton.setText(_translate("SetupWizard", "Run appliances on my local computer"))
self.uiLocalLabel.setText(_translate("SetupWizard", "A limited number of appliances like the Cisco IOS routers <= C7200 can be run"))
self.uiRemoteControllerRadioButton.setText(_translate("SetupWizard", "Run appliances on a remote server (advanced usage)"))
Expand Down Expand Up @@ -286,5 +283,4 @@ def retranslateUi(self, SetupWizard):
self.uiSummaryWizardPage.setSubTitle(_translate("SetupWizard", "The server type has been configured, please see the summary of the settings below"))
self.uiSummaryTreeWidget.headerItem().setText(0, _translate("SetupWizard", "1"))
self.uiSummaryTreeWidget.headerItem().setText(1, _translate("SetupWizard", "2"))

from . import resources_rc

0 comments on commit 4e3eee2

Please sign in to comment.