Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reliably open documents from sidebar #1465

Merged
merged 3 commits into from
Nov 3, 2024

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Sep 19, 2024

Fixes #1403
Fixes #972

Using the item-selected signal from the SourceList to open documents causes problems when documents are removed for any reason because this causes unwanted documents to selected and opened. In master this is fixed by a hack involving some select signals being ignored but this is not reliable. Quite often clicking on an item in the sidebar fails to open it because the signal is falsely ignored.

Instead, this PR uses item activation to trigger document opening/tab selection. To maintain the same single click behaviour the SourceList is modified so activate_on_single_click is accessible.

@jeremypw jeremypw marked this pull request as ready for review October 29, 2024 13:38
@jeremypw jeremypw requested a review from a team October 29, 2024 13:39
Copy link
Member

@colinkiama colinkiama left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great!

@colinkiama colinkiama enabled auto-merge (squash) October 30, 2024 19:14
@colinkiama colinkiama disabled auto-merge October 31, 2024 07:50
@colinkiama colinkiama enabled auto-merge (squash) October 31, 2024 07:50
@colinkiama
Copy link
Member

@elementary/maintainers seems like something is wrong with the CI checks in this pull request.

All the checks have already passed but GitHub insists that there's one more required lint check remaining.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Nov 1, 2024

Seems the linting check has stalled for some reason.

@jeremypw jeremypw disabled auto-merge November 1, 2024 10:34
@jeremypw
Copy link
Collaborator Author

jeremypw commented Nov 1, 2024

Hmm, after removing automerge and re-running CI it is now failing on Flatpak build. It seems to be looking for Gtk.SourceView. Still not reporting the lint result although it passed.

Edit: I confused SourceView and SourceList we still need Gtk.SourceView.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Nov 1, 2024

Looks like the gitlab server is not available atm so SourceView source code not available for building the Flatpak.

@jeremypw
Copy link
Collaborator Author

jeremypw commented Nov 3, 2024

@danirabbit Any idea what is blocking this from merging? CI seems to be passing. Is it OK to bypass the requirements?

@danirabbit danirabbit merged commit 83af1aa into master Nov 3, 2024
6 checks passed
@danirabbit danirabbit deleted the jeremypw/fix-open-afterbranchchange branch November 3, 2024 17:49
@danirabbit
Copy link
Member

Sorry about that. Made a mistake migrating to the new branch protection rulesets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants