def __init__(self, width, height, app, parent=None):
        super(MainWindow, self).__init__(parent)
        CommandBase.__init__(self)

        recent_projects = self.load_recent_projects()

        self.existing_dialog = ExistingProjectDialog(recent_projects, self.load_project, parent=self)

        drect = QtGui.QApplication.desktop().availableGeometry(self)
        center = drect.center()
        self.move(center.x() - self.width() * 0.5, center.y() - self.height()*0.5)

        self.icon_style = 'width:48px;height:48px;background-color:white;border-radius:5px;border:1px solid rgb(50,50,50);'

        self.last_project_dir = self.load_last_project_path()

        status_bar = QtGui.QStatusBar()
        self.setStatusBar(status_bar)

        self.project_path = ''
        self.project_menu = self.menuBar().addMenu('File')
        browse_action = QtGui.QAction('Open Project', self.project_menu,
                                      shortcut=QtGui.QKeySequence.Open,
                                      statusTip='Open an existing or new project.',
                                      triggered=self.browse_dir)
        self.project_menu.addAction(browse_action)
        self.project_menu.addSeparator()

        self.recent_file_actions = []

        for i in range(MAX_RECENT):
            if i == 9:
                key = 0
            else:
                key = i+1
            action = QtGui.QAction(self, visible=False, triggered=self.open_recent_file,
                                   shortcut=QtGui.QKeySequence('Ctrl+{}'.format(key)))
            self.recent_file_actions.append(action)
            self.project_menu.addAction(action)

        self.recent_separator = self.project_menu.addSeparator()

        self.update_recent_files()

        exit_action = QtGui.QAction('Exit', self.project_menu)
        exit_action.triggered.connect(QtGui.qApp.closeAllWindows)
        self.project_menu.addAction(exit_action)

        self.logger = logger

        self.gui_app = app
        self.desktop_width = app.desktop().screenGeometry().width()
        self.desktop_height = app.desktop().screenGeometry().height()

        self.options_enabled = False
        self.output_package_json = True
        self.setWindowIcon(QtGui.QIcon(get_file('files/images/icon.png')))
        self.update_json = False

        self.setup_nw_versions()

        self.thread = None
        self.original_packagejson = {}

        self.resize(width, height)

        self.extract_error = None

        self.create_application_layout()

        self.option_settings_enabled(False)

        self.setWindowTitle(u"Web2Executable {}".format(__gui_version__))
        self.update_nw_versions(None)
dataset/ETHPy150Open jyapayne/Web2Executable/main.py/MainWindow.__init__/original