Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: rjl on November 08, 2015, 03:55:59 pm

Title: lost "current method" toolbar
Post by: rjl on November 08, 2015, 03:55:59 pm
Hi all. It used to be the case that as I hopped around a project C::B would tell me what method/procedure I was in in one of the toolbars. I don't recall what the toolbar was (or if it was a toolbar!) but in any case that information is now gone. Any ideas how to get back that very useful piece of information? I'm using Release 13.12 rev 9501, SDK Version 1.19.0 on Ubuntu 15.10.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 08, 2015, 05:18:06 pm
View -> Toolbars -> Code completion
You need to have the code completion installed and enabled.
Title: Re: lost "current method" toolbar
Post by: rjl on November 08, 2015, 08:42:16 pm
All it seems to show is <global>. No method names visible.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 08, 2015, 09:01:45 pm
Then there is nothing parsed by the parser.
Title: Re: lost "current method" toolbar
Post by: rjl on November 09, 2015, 12:29:21 am
Why would that be? What should I be looking for? What might have changed from about a month ago when it always reported where in the code it was?
Title: Re: lost "current method" toolbar
Post by: ollydbg on November 09, 2015, 08:49:01 am
It looks like sample code is need to reproduce this bug, thanks.
Title: Re: lost "current method" toolbar
Post by: rjl on November 09, 2015, 10:01:26 pm
I'm not convinced it's code related. I'm in front of a different machine now and the behavior here is fine -- with the same project. It also shows <global> in a kind of dropdown menu box like I described and next to it is that beautiful box that has the current method. That second box seems to be missing on my other machine. I'll play around and try to find it (actually I have for a while now), but I'd love some ideas.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 10, 2015, 12:02:11 am
There is a setting in the CC options that merge the two drop downs. Probably you've enabled it on one of the machines.
Title: Re: lost "current method" toolbar
Post by: rjl on November 10, 2015, 12:29:00 am
Sorry for being dense, but what is CC?
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 10, 2015, 01:01:42 am
code completion
Title: Re: lost "current method" toolbar
Post by: rjl on November 10, 2015, 07:00:21 pm
I searched everywhere I could possibly think of and found no code completion options. Can you tell me where they can be found?

In any case the problem has been solved. It seems that even though there appears to be plenty of room for the "current method" dropdown box, it would not appear until I dragged the toolbar down to a new line. Now I see both boxes in the toolbar and all is fine.

P.S. One would think that either "optimize toolbars" or "fit toolbars" would have solved this problem, but neither did.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 10, 2015, 08:30:41 pm
Settings -> Editor -> Code completions.

Please post a screen shot of the toolbars after optimize or fit has been executed.
Title: Re: lost "current method" toolbar
Post by: rjl on November 11, 2015, 04:02:08 pm
I suppose I can do that, but I'm not sure of the point. The toolbars look exactly the same before and after optimize or fit, i.e., they seem to do nothing.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 11, 2015, 08:56:05 pm
The point is that I'll be able to how you've ordered the toolbars and I could try to reproduce the issue on my computer.
Title: Re: lost "current method" toolbar
Post by: rjl on November 12, 2015, 04:34:10 pm
Here it is.
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 12, 2015, 09:00:00 pm
So you're telling us that the second combobox is of screen and is not next to the <global> one?
And if you move the toolbar one row down it will show? Can you show a screenshot for this case, too?
Title: Re: lost "current method" toolbar
Post by: rjl on November 12, 2015, 09:14:05 pm
> So you're telling us that the second combobox is of screen and is not next to the <global> one?

No. As the picture shows, there is no 2nd combo box.

> And if you move the toolbar one row down it will show?

Yes. but only if I restart CB.

> Can you show a screenshot for this case, too?

Trust me.  :)
Title: Re: lost "current method" toolbar
Post by: oBFusCATed on November 12, 2015, 09:56:23 pm
Trust me.  :)
Ok, I guess I can trust you to build cb and start debugging this yourself.
For me it works fine when they are on single line.

The option to group the two combos is in Settings -> Editor -> Code completion -> Symbol browser -> Toolbar -> Use scope filtering
Title: Re: lost "current method" toolbar
Post by: Jenna on November 12, 2015, 10:23:12 pm
I can reproduce this (or something similar) with actual trunk of C::B and master of wxWidgets:
No matter which toolbar I move outside the screen, so far that I can not get it back with the mouse, loses it's width and/or content. If I bring them back with "Optimize .." or "Fit toolbars" they only have zero width (only the gripper is visible/existant).
Title: Re: lost "current method" toolbar
Post by: Jenna on November 14, 2015, 03:12:26 pm
The issue with "Fit toolbars" and "Optimize toolbars" should be fixed in trunk (r10566).
To get back the missing dropdown (if it is enabled), it should be enough to call one of these functions.

Elements inside a toolbar, that are not completely inside the mainframe, seem to be hidden with wx3.0 (at least with wxGTK).
The call to GetSize() used in FitToolbars() and OptimizeTooolbars() only returns the visible size, bot the overall size of the overall size of the window, GetBestSize() gives correct results.
And the gripper size has to be taken into account, otherwise parts of the most right toolbar might be hidden and therefore some elements not shown.
Title: Re: lost "current method" toolbar
Post by: rjl on November 14, 2015, 04:37:14 pm
Thank you, Jens!