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

window: translate_selection: Only get clipboard when window is active #408

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

rafaelmardojai
Copy link
Member

Fixes #407

Copy link
Member

@mufeedali mufeedali left a comment

Choose a reason for hiding this comment

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

The fix itself works. But wouldn't it make more sense to split the two modes of operation of translate_selection() into two functions? Something like queue_selection_translation and translate_selection maybe?

@zefr0x
Copy link

zefr0x commented Nov 2, 2024

I'm not sure about the UX, should we also have a visual indicator?

Maybe an AdwStatusPage with an arrow icon that covers every thing asking for focus or some thing like that.

zefr0x added a commit to zefr0x/dotfiles that referenced this pull request Nov 2, 2024
@rafaelmardojai
Copy link
Member Author

rafaelmardojai commented Nov 3, 2024

The fix itself works. But wouldn't it make more sense to split the two modes of operation of translate_selection() into two functions? Something like queue_selection_translation and translate_selection maybe?

Done, code should be cleaner.

I also made selection_translation_queued a GObject property so it can be binded to UI if we implement what @zefr0x suggests. (Maybe not needed depending on how we do that implementation, but just in case 😅)

@mufeedali mufeedali merged commit 28decaf into main Nov 3, 2024
2 checks passed
@mufeedali mufeedali deleted the fix-cb-selection branch November 3, 2024 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Translate from primary selection not work
3 participants