[Github-comments] [geany/geany] FIX: filebrowser plugin: the first rightclick not working with some items on popup: (#2161)

elextr notifications at xxxxx
Thu May 23 10:32:28 UTC 2019


Ok, with the key missing information that the problem only ever occurs on the very first time the plugin is right clicked per session I can reproduce.

As @codebrainz observed, the table row is not being selected on the first right click, its not focus, I can left click on a row first and still the first right click will not select a different row.

As @GFdevelop seems to have identified, but didn't explain, changing the value of the "hidden files" item in the popup seems to steal the selection from the file list.

This leads to a second reproducer.  I can reproduce the problem by changing the "hidden files" option in the plugins preferences dialog in plugin manager, and the problem happens every time on the first right click after its changed.

This seems rather like a GTK strangeness, `gtk_check_menu_item_set_active()` only actually selecting the item when the value changes @b4n?

Unfortunately the solution here (moving the call to `gtk_check_menu_item_set_active()` to the popup creation) is wrong because the setting in the menu no longer follows the value set by the plugins preferences dialog.

The variable `popup_menu` needs to be moved from being a static in the `on_button_press()` function to a file wide static that is created in the plugin init, (as @codebrainz said) properly freed in plugin free and then it can be updated by the plugin preferences when thats changed and by the menu function when its changed in the menu and not on each time the menu is displayed.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2161#issuecomment-495163987
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190523/45a3e70d/attachment.html>


More information about the Github-comments mailing list