Projects
Eulaceura:Factory
drbd
_service:obs_scm:backport-DRBDmon-Fix-Hotkey-fo...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-DRBDmon-Fix-Hotkey-for-details-page-only-from-cursor.patch of Package drbd
From 332c270df839f854eaa7bff0bfc9a7be9a725778 Mon Sep 17 00:00:00 2001 From: Robert Altnoeder <robert.altnoeder@linbit.com> Date: Thu, 15 Feb 2024 16:07:56 +0100 Subject: [PATCH 062/100] DRBDmon: Fix: Hotkey for details page only from cursor navigation mode --- user/drbdmon/terminal/MDspConnections.cpp | 15 +++++++++------ user/drbdmon/terminal/MDspVolumes.cpp | 15 +++++++++------ 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/user/drbdmon/terminal/MDspConnections.cpp b/user/drbdmon/terminal/MDspConnections.cpp index 5b6f39cb..6b95eda8 100644 --- a/user/drbdmon/terminal/MDspConnections.cpp +++ b/user/drbdmon/terminal/MDspConnections.cpp @@ -621,17 +621,20 @@ bool MDspConnections::key_pressed(const uint32_t key) intercepted = true; } else - if (is_cursor_nav() || dsp_comp_hub.dsp_shared->have_connections_selection()) + if (is_cursor_nav()) { - if (key == static_cast<uint32_t> ('A') || key == static_cast<uint32_t> ('a')) + if (key == KeyCodes::ENTER) { - dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::CON_ACTIONS); + dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::CON_DETAIL); intercepted = true; } - else - if (key == KeyCodes::ENTER) + } + + if (!intercepted && (is_cursor_nav() || dsp_comp_hub.dsp_shared->have_connections_selection())) + { + if (key == static_cast<uint32_t> ('A') || key == static_cast<uint32_t> ('a')) { - dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::CON_DETAIL); + dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::CON_ACTIONS); intercepted = true; } } diff --git a/user/drbdmon/terminal/MDspVolumes.cpp b/user/drbdmon/terminal/MDspVolumes.cpp index 21988425..9cc8e9ce 100644 --- a/user/drbdmon/terminal/MDspVolumes.cpp +++ b/user/drbdmon/terminal/MDspVolumes.cpp @@ -307,17 +307,20 @@ bool MDspVolumes::key_pressed(const uint32_t key) intercepted = true; } else - if (is_cursor_nav() || dsp_comp_hub.dsp_shared->have_volumes_selection()) + if (is_cursor_nav()) { - if (key == static_cast<uint32_t> ('A') || key == static_cast<uint32_t> ('a')) + if (key == KeyCodes::ENTER) { - dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::VLM_ACTIONS); + dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::VLM_DETAIL); intercepted = true; } - else - if (key == KeyCodes::ENTER) + } + + if (!intercepted && (is_cursor_nav() || dsp_comp_hub.dsp_shared->have_volumes_selection())) + { + if (key == static_cast<uint32_t> ('A') || key == static_cast<uint32_t> ('a')) { - dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::VLM_DETAIL); + dsp_comp_hub.dsp_selector->switch_to_display(DisplayId::display_page::VLM_ACTIONS); intercepted = true; } } -- 2.33.1.windows.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2