Conversation
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
|
@claude[agent] Cycle through sub-tabs as well (present in Advanced tab) |
There was a problem hiding this comment.
Pull request overview
Adds keyboard navigation to the device information window so users can switch between information tabs without using the mouse, aligning behavior with common tabbed UIs.
Changes:
- Adds
GscInfoWindow::on_key_press_event()override to intercept Ctrl+Tab / Ctrl+Shift+Tab. - Switches
main_notebookpages with wrap-around usingGtk::Notebookpage APIs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/gui/gsc_info_window.h | Declares on_key_press_event() override for keyboard-driven tab navigation. |
| src/gui/gsc_info_window.cpp | Implements Ctrl+Tab / Ctrl+Shift+Tab handling to move between notebook pages. |
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Done in 9427d82. Ctrl+Tab now cycles through Advanced tab sub-tabs when that tab is active and visible, otherwise cycles through main tabs. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@claude[agent] fix build issues |
…code Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
Fixed in dcce1f1. The function had corrupted/duplicate code blocks causing syntax errors. Cleaned up to properly structure the lambda helper and main logic flow. |
src/gui/gsc_info_window.cpp
Outdated
| if (main_notebook) { | ||
| // Check if we're on the Advanced tab with sub-tabs | ||
| auto* advanced_notebook = lookup_widget<Gtk::Notebook*>("advanced_notebook"); | ||
| if (advanced_notebook && advanced_notebook->get_visible()) { |
There was a problem hiding this comment.
advanced_notebook->get_visible() reflects the widget's “visible” property, not whether the Advanced page is currently the active page in main_notebook. If Advanced has 2+ visible sub-tabs, this will consume Ctrl+Tab even when the user is on another main tab (it will change the hidden sub-tab selection and return true), so main tab switching won’t work.
Consider gating sub-tab cycling on the Advanced page being the current main_notebook page (e.g., compare main_notebook->get_nth_page(main_notebook->get_current_page()) against the advanced_tab_vbox widget / use page_num()), or check advanced_notebook->get_mapped()/is_drawable() instead of get_visible() before handling the event.
| if (advanced_notebook && advanced_notebook->get_visible()) { | |
| if (advanced_notebook && advanced_notebook->is_drawable()) { |
There was a problem hiding this comment.
@claude[agent] Fix by checking whether current tab is Advanced
There was a problem hiding this comment.
Fixed in b6df8fd. Now checks if Advanced tab is the current active page using page_num() before handling sub-tab cycling. This prevents Ctrl+Tab from being consumed when the user is on other main tabs.
Co-authored-by: ashaduri <2302268+ashaduri@users.noreply.github.com>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. |
Original prompt