Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
Disable CC calltip when context Menu is opened(Same as ValueTooltip in GDB)
ollydbg:
Hi, all.
In revision 5612, the debuggergdb plugin, OnValueTooltip() will be disabled when a context menu is open.
--- Code: ---
void DebuggerGDB::OnValueTooltip(CodeBlocksEvent& event){
...
if(ed->IsContextMenuOpened())
{
return;
}
...
--- End code ---
I think this can also be applied to code Completion plugin
void CodeCompletion::OnValueTooltip(CodeBlocksEvent& event)
By ollydbg at 2009-06-16
Any comments?
A convinent way is that when a context menu is open, the editor stop sending Tooltip event.
rhf:
ollydbg,
I am not sure of the best solution, but the problem is very annoying. If there are several Code Completion options, they completely cover the Thread Search options on the context menu. Windows XP, SVN 5650.
ollydbg:
--- Quote from: rhf on June 17, 2009, 05:00:01 am ---ollydbg,
I am not sure of the best solution, but the problem is very annoying. If there are several Code Completion options, they completely cover the Thread Search options on the context menu. Windows XP, SVN 5650.
--- End quote ---
Hi, rhf.
Did you mean that the Code Completion tooltip window cover "Thread Search Panel" ?
Where can I find "Thread Search options on the context menu"..Did you mean the "find the occurrence of "XXXXX" in the context menu?
I'm not quite full understand. :D
MortenMacFly:
--- Quote from: ollydbg on June 17, 2009, 04:33:17 am ---Any comments?
--- End quote ---
I've tested this and it works (and makes sense) IMHO. I have put it on my list of changes to CC.
I've done it as follows (shown is just the appropriate code snippet in void CodeCompletion::OnValueTooltip(CodeBlocksEvent& event) as I cannot provide a patch easily):
OLD:
--- Code: --- EditorBase* base = event.GetEditor();
cbEditor* ed = base && base->IsBuiltinEditor() ? static_cast<cbEditor*>(base) : 0;
if (!ed)
return;
if (ed->GetControl()->CallTipActive())
ed->GetControl()->CallTipCancel();
--- End code ---
NEW:
--- Code: --- EditorBase* base = event.GetEditor();
cbEditor* ed = base && base->IsBuiltinEditor() ? static_cast<cbEditor*>(base) : 0;
if (!ed || ed->IsContextMenuOpened())
return;
if (ed->GetControl()->CallTipActive())
ed->GetControl()->CallTipCancel();
--- End code ---
ollydbg:
I'm thinking that we can disable on cbEditor class
--- Code: ---void cbEditor::OnEditorDwellStart(wxScintillaEvent& event)
{
cbStyledTextCtrl* control = GetControl();
int pos = control->PositionFromPoint(wxPoint(event.GetX(), event.GetY()));
int style = control->GetStyleAt(pos);
NotifyPlugins(cbEVT_EDITOR_TOOLTIP, style, wxEmptyString, event.GetX(), event.GetY());
OnScintillaEvent(event);
}
--- End code ---
When Dwell starts, we should first check
IsContextMenuOpened()
Am I right?
Navigation
[0] Message Index
[#] Next page
Go to full version