From 4dfc6e070a833e1725d7eb21303c7a7e15e6a6f8 Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Tue, 2 Jan 2024 16:13:20 +0100 Subject: [PATCH] Remove about button from help panel --- src/ert/gui/suggestor/suggestor.py | 17 ----------------- tests/unit_tests/gui/test_main_window.py | 10 ---------- 2 files changed, 27 deletions(-) diff --git a/src/ert/gui/suggestor/suggestor.py b/src/ert/gui/suggestor/suggestor.py index 77d29685c51..be0f5aedacc 100644 --- a/src/ert/gui/suggestor/suggestor.py +++ b/src/ert/gui/suggestor/suggestor.py @@ -16,8 +16,6 @@ QWidget, ) -from ert.gui.about_dialog import AboutDialog - from ._colors import BLUE_TEXT from ._suggestor_message import SuggestorMessage @@ -30,12 +28,6 @@ def _clicked_help_button(menu_label: str, link: str): webbrowser.open(link) -def _clicked_about_button(about_dialog): - logger = logging.getLogger(__name__) - logger.info("Pressed help button About") - about_dialog.show() - - LIGHT_GREY = "#f7f7f7" MEDIUM_GREY = "#eaeaea" HEAVY_GREY = "#dcdcdc" @@ -175,15 +167,6 @@ def _help_panel(self, help_links: Dict[str, str]): ) help_buttons_layout.addWidget(button) - about_button = QPushButton("About", parent=self) - about_button.setStyleSheet(LINK_STYLE) - about_button.setCursor(QCursor(Qt.CursorShape.PointingHandCursor)) - about_button.setObjectName("about_button") - help_buttons_layout.addWidget(about_button) - help_buttons_layout.addStretch(-1) - - diag = AboutDialog(self) - about_button.clicked.connect(lambda: _clicked_about_button(diag)) return help_button_frame def _problem_area(self, errors, warnings, deprecations): diff --git a/tests/unit_tests/gui/test_main_window.py b/tests/unit_tests/gui/test_main_window.py index 0128f538359..1b49818d7ce 100644 --- a/tests/unit_tests/gui/test_main_window.py +++ b/tests/unit_tests/gui/test_main_window.py @@ -292,7 +292,6 @@ def test_help_buttons_in_suggester_dialog(tmp_path, qtbot): """ WHEN I am shown an error in the gui THEN the suggester gui comes up - AND I can find the version of ert by opening the about panel AND go to github to submit an issue by clicking a button. """ config_file = tmp_path / "config.ert" @@ -308,15 +307,6 @@ def test_help_buttons_in_suggester_dialog(tmp_path, qtbot): ) assert isinstance(gui, Suggestor) - about_button = get_child(gui, QWidget, name="about_button") - qtbot.mouseClick(about_button, Qt.LeftButton) - - help_dialog = get_child(gui, AboutDialog) - assert help_dialog.windowTitle() == "About" - - about_close_button = get_child(help_dialog, QWidget, name="close_button") - qtbot.mouseClick(about_close_button, Qt.LeftButton) - with patch("webbrowser.open", MagicMock(return_value=True)) as browser_open: github_button = get_child(gui, QWidget, name="GitHub page") qtbot.mouseClick(github_button, Qt.LeftButton)