From 8656de5f9e8943720a46534d6fa9e81a871e4cfa Mon Sep 17 00:00:00 2001 From: falkTX Date: Sun, 12 Oct 2014 11:34:09 +0100 Subject: [PATCH] Cleanup --- source/carla_app.py | 4 ++-- source/carla_host.py | 2 +- source/carla_shared.py | 6 +----- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/source/carla_app.py b/source/carla_app.py index 5677dd588..22e2af27b 100644 --- a/source/carla_app.py +++ b/source/carla_app.py @@ -29,7 +29,7 @@ if config_UseQt5: from PyQt5.QtGui import QColor, QPalette from PyQt5.QtWidgets import QApplication else: - from PyQt4.QtCore import QSettings + from PyQt4.QtCore import Qt, QSettings from PyQt4.QtGui import QApplication, QColor, QPalette # ------------------------------------------------------------------------------------------------------------ @@ -243,7 +243,7 @@ class CarlaApplication(object): else: self.fApp.setWindowIcon(QIcon(":/scalable/carla.svg")) - if MACOS and config_UseQt5: + if MACOS: self.fApp.setAttribute(Qt.AA_DontShowIconsInMenus) print("Using \"%s\" theme" % self.fApp.style().objectName()) diff --git a/source/carla_host.py b/source/carla_host.py index 95a9525a6..4f7ae04cb 100644 --- a/source/carla_host.py +++ b/source/carla_host.py @@ -272,7 +272,7 @@ class HostWindow(QMainWindow, PluginEditParentMeta): # ---------------------------------------------------------------------------------------------------- # Set up GUI (special stuff for Mac OS) - if MACOS and config_UseQt5: + if MACOS: self.ui.act_file_quit.setMenuRole(QAction.QuitRole) self.ui.act_settings_configure.setMenuRole(QAction.PreferencesRole) self.ui.act_help_about.setMenuRole(QAction.AboutRole) diff --git a/source/carla_shared.py b/source/carla_shared.py index 59fdab780..3e7d41398 100644 --- a/source/carla_shared.py +++ b/source/carla_shared.py @@ -56,11 +56,7 @@ from carla_backend import * # ------------------------------------------------------------------------------------------------------------ # Platform specific stuff -if MACOS and not config_UseQt5: - from PyQt4.QtGui import qt_mac_set_menubar_icons - qt_mac_set_menubar_icons(False) - -elif WINDOWS: +if WINDOWS: WINDIR = os.getenv("WINDIR") # ------------------------------------------------------------------------------------------------------------