From db158e0e18bc4e7b99aa979509fc8cf5ad4aef1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Hern=C3=A1ndez=20Cordero?= Date: Mon, 15 Jun 2020 17:46:09 +0200 Subject: [PATCH] Removed tango-icon-theme dependency (#224) * Removed tango-icon-theme dependency Signed-off-by: ahcorde * Removed unused import Signed-off-by: ahcorde --- qt_gui/package.xml | 1 - qt_gui/src/qt_gui/main.py | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/qt_gui/package.xml b/qt_gui/package.xml index 6cb49932..4bb1dafa 100644 --- a/qt_gui/package.xml +++ b/qt_gui/package.xml @@ -22,7 +22,6 @@ ament_index_python python_qt_binding python3-catkin-pkg-modules - tango-icon-theme ament_lint_auto ament_lint_common diff --git a/qt_gui/src/qt_gui/main.py b/qt_gui/src/qt_gui/main.py index 1e44064e..7ac6fa97 100755 --- a/qt_gui/src/qt_gui/main.py +++ b/qt_gui/src/qt_gui/main.py @@ -34,7 +34,6 @@ from argparse import ArgumentParser, SUPPRESS import os -import platform import signal import sys @@ -191,21 +190,6 @@ def _add_plugin_providers(self): def _add_reload_paths(self, reload_importer): reload_importer.add_reload_path(os.path.join(os.path.dirname(__file__), *('..',) * 4)) - def _check_icon_theme_compliance(self): - from python_qt_binding.QtGui import QIcon - # TODO find a better way to verify Theme standard compliance - if QIcon.fromTheme('document-save').isNull() or \ - QIcon.fromTheme('document-open').isNull() or \ - QIcon.fromTheme('edit-cut').isNull() or \ - QIcon.fromTheme('object-flip-horizontal').isNull(): - if platform.system() == 'Darwin' and \ - '/usr/local/share/icons' not in QIcon.themeSearchPaths(): - QIcon.setThemeSearchPaths(QIcon.themeSearchPaths() + ['/usr/local/share/icons']) - original_theme = QIcon.themeName() - QIcon.setThemeName('Tango') - if QIcon.fromTheme('document-save').isNull(): - QIcon.setThemeName(original_theme) - def create_application(self, argv): from python_qt_binding.QtCore import Qt from python_qt_binding.QtWidgets import QApplication @@ -445,8 +429,6 @@ def message_handler(type_, context, msg): app = self.create_application(argv) - self._check_icon_theme_compliance() - settings = QSettings( QSettings.IniFormat, QSettings.UserScope, 'ros.org', self._settings_filename) if len(embed_options_set) == 0: