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

Fix search entry after editing the toolbar #3838

Merged
merged 1 commit into from Apr 18, 2024

Conversation

b4n
Copy link
Member

@b4n b4n commented Apr 14, 2024

According to b0b0ebb we guard against proxying the widget more than once for some Windows reasons, but this breaks the case where the same GeanyEntryAction has to re-create a fresh proxy, like when moving the item around.

So, move the guard value to the proxied widget, not the action.

Fixes #3831.

As this is Windows-related (see b0b0ebb), it could be nice if somebody could actually check that this patch doesn't break anything there. I likely won't, at least in a yearly manner.

According to b0b0ebb we guard against
proxying the widget more than once for some Windows reasons, but this
breaks the case where the same GeanyEntryAction has to re-create a
fresh proxy, like when moving the item around.

So, move the guard value to the proxied widget, not the action.

Fixes geany#3831.
@b4n b4n requested a review from ntrel April 14, 2024 00:00
Copy link
Member

@ntrel ntrel left a comment

Choose a reason for hiding this comment

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

Looks good, thanks. Tested on Linux, works.

@eht16
Copy link
Member

eht16 commented Apr 14, 2024

Tested on Linux and Windows, works perfectly.

I don't remember the initial problems from 12 years ago, maybe it was GTK2 releated or a bug in early GTK3 versions or so.

@b4n
Copy link
Member Author

b4n commented Apr 14, 2024

I don't remember the initial problems from 12 years ago, maybe it was GTK2 releated or a bug in early GTK3 versions or so.

Any chance you could try removing the guard and see if anything weird happens? Not that I remember any details about that though, only Git does remember anything :)

@b4n b4n merged commit 0acee69 into geany:master Apr 18, 2024
7 checks passed
@b4n
Copy link
Member Author

b4n commented Apr 18, 2024

@eht16 I merged this anyway, but feel free to still check whether the shenanigans are still useful 😉

@b4n b4n self-assigned this Apr 18, 2024
@b4n b4n added this to the 2.1 milestone Apr 18, 2024
@b4n b4n added the bug label Apr 18, 2024
@eht16
Copy link
Member

eht16 commented Apr 21, 2024

It seems to work without the guard as well.
The connect_proxy function is called four times here, but it's the same on Linux and Windows and in either way, the search toolbar item still works after re-ordering.

Since we cannot reproduce this anymore and the "fix" is so long ago, maybe it was really related to some Windows-GTK2 bugginess.

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

Successfully merging this pull request may close these issues.

Search bar does nothing after moving it
3 participants