Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

BrowseTracker dialog is not closing

(1/4) > >>

I have problem with BrowseTracker plugin:
when I Alt+Left, BrowseTracker dialog is shown. However it remains shown when I release Alt key. I have to double-click on the file name to close the dialog.

I use my custom build of C::B: Ubuntu, latest wxWidgets (I tried with v3.1.4 and latest Git), GTK 3.

Do somebody have had such problem?

I searched for the source of the problem. I found, that events wxEVT_KEY_DOWN and wxEVT_KEY_UP are not captured somehow. Therefore in BrowseSelector.cpp I connected 'm_panel' instead of 'm_listBox':

    - m_listBox->Connect(wxID_ANY, wxEVT_KEY_UP, wxKeyEventHandler(BrowseSelector::OnKeyUp), NULL, this);
    - m_listBox->Connect(wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(BrowseSelector::OnKeyDown), NULL, this);
    + m_panel->Connect(wxID_ANY, wxEVT_KEY_UP, wxKeyEventHandler(BrowseSelector::OnKeyUp), NULL, this);
    + m_panel->Connect(wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(BrowseSelector::OnKeyDown), NULL, this);

Now plugin works as is expected. However, I am unsure, if this solution will work on all platforms.

I'll have a look at it. Thanks for the suggestions.

Fixed svn 12254
Missing GetEventHandler()'s

Thank you!

I tried to understand why the GetEventHandler() call in the patch is required. And I couldn't. Could you @Pecan explain it?


[0] Message Index

[#] Next page

Go to full version