Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

patch on Disable the Tooltip when debugging

(1/2) > >>

ollydbg:
In this topics, people are discussing the     Usability issues.

http://forums.codeblocks.org/index.php/topic,10154.0.html

Today, When I'm reading and studying CB's source code, I found the Issue 3(I also think this is a quite annoying issue :() can easily be solved like Visual Studio's method. I have tested my patch and it works fine. :D

--- Quote ---Issue 3: Code completion tooltip messing with debugger tooltip

If both tooltips are enabled, trying to see the value of a variable by hovering the pointer on it will display two tooltips, one on top of the other. In all my tests, the code completion tooltip was always on top of the debugger tooltip. Visual Studio solves this issue by completely disabling code completion's tooltip during a debugging session.

--- End quote ---

See the patch below.

--- Code: ---Index: debuggergdb.cpp
===================================================================
--- debuggergdb.cpp (revision 5611)
+++ debuggergdb.cpp (working copy)
@@ -2495,6 +2495,11 @@
     if (!ed)
         return;
 
+//    if (!wxGetKeyState(WXK_CONTROL))
+//        return;
+    if (ed->GetControl()->CallTipActive())
+        ed->GetControl()->CallTipCancel();
+
     int style = event.GetInt();
     if (style != wxSCI_C_DEFAULT && style != wxSCI_C_OPERATOR && style != wxSCI_C_IDENTIFIER)
         return;

--- End code ---

By the way, I want to use "CTRL" key while mouse hovering some text to get the ValueTooltip shown.

So, I try to add the code:

--- Code: ---+//    if (!wxGetKeyState(WXK_CONTROL))
+//        return;

--- End code ---

But it didn't works as I expect. Can you give me some suggestions?

Thanks


rhf:

--- Quote from: ollydbg on May 29, 2009, 04:38:18 pm ---(I also think this is a quite annoying issue :() can easily be solved like Visual Studio's method. I have tested my patch and it works fine. :D

--- End quote ---
ollydbg,

This problem really annoys me also, and I hope that your patch gets incorporated!

A possible alternative, which may be difficult to implement, is to use the idea in Bug ID 014686. That is, to always display the Debug tooltip below the cursor and the CC display tooltip above it - or vice versa. This way, you would not have to disable code completion's tooltip during a debugging session; but, to be honest, I'm not sure how important the CC tooltip is while debugging.

ollydbg:
To achieve that, we should calculate the "area" of that tooltips.

Currently, it was a rectangle whose top left point was the mouse pointer.

I found another issue, if the calltooltip string is too long, then it can't be wrapped, and will be truncated by screen. :(

killerbot:
@other devs : what do you think. It would be best both tooltips are visible, but that is going to take some more work at this time.
I prefer during a debugging session that the debug tooltip should win and the code completion one should loose.

Any objections of implementing this change ?

MortenMacFly:

--- Quote from: killerbot on May 30, 2009, 09:22:46 am ---Any objections of implementing this change ?

--- End quote ---
Not the control key part, but disabling the tooltip. I've already tested it (under Windows) - no objections.

Navigation

[0] Message Index

[#] Next page

Go to full version