Author Topic: Configure the CC's toolbar length patch  (Read 24256 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Configure the CC's toolbar length patch
« on: October 05, 2017, 05:37:58 am »
I have updated the patch in Code::Blocks / Tickets / #303 make code completion's toolbar configurable, but it looks like some items are not disabled? Why?

See the patch and the screenshot as attachment, note I'm building against wx3.1 under Windows7 64bit with a 32bit GCC compiler.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #1 on: October 05, 2017, 08:58:22 am »
For me everything is disabled, which is in fact wrong, because the toolbar settings could not be saved.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #2 on: October 06, 2017, 01:24:15 am »
The fix about disabling/enabling the symbol browser controls is in trunks. Thanks for the initial patch and the report.

I've reworked the resizeable toolbars patch a bit:
1. better ui layout
2. fixed crash when m_Scope=nullptr
3. better min/max values
4. disable the scope spinctrl when the checkbox is disabled

See the attached patch. Unfortunately the wx2.8 version doesn't work at all. The wx3.1 version works fine. I've not tried it yet with wx3.0.2...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure the CC's toolbar length patch
« Reply #3 on: October 06, 2017, 08:01:22 am »
The fix about disabling/enabling the symbol browser controls is in trunks. Thanks for the initial patch and the report.

I've reworked the resizeable toolbars patch a bit:
1. better ui layout
2. fixed crash when m_Scope=nullptr
3. better min/max values
4. disable the scope spinctrl when the checkbox is disabled

See the attached patch.

I'm OK with all your changes, so please commit, thanks.

Quote
Unfortunately the wx2.8 version doesn't work at all. The wx3.1 version works fine. I've not tried it yet with wx3.0.2...
What do you mean by "not at all", you mean we can't adjust the length of those two items under wx2.8? For me, I have only wx3.1 at hand. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #4 on: October 06, 2017, 09:14:51 am »
What do you mean by "not at all", you mean we can't adjust the length of those two items under wx2.8? For me, I have only wx3.1 at hand. :)
Yes, it doesn't work at all, even after restart.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure the CC's toolbar length patch
« Reply #5 on: October 06, 2017, 05:04:06 pm »
What do you mean by "not at all", you mean we can't adjust the length of those two items under wx2.8? For me, I have only wx3.1 at hand. :)
Yes, it doesn't work at all, even after restart.
This is indeed bad news. If I remember correctly, the first version of the patch about configure the CC toolbar's length was created by me about 6 years ago, at that time, only wx2.8 exits, and the first version should works under wx2.8, but I'm not sure why it can't work right now. No time to test under wx2.8 because I don't have a wx2.8 on my system. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #6 on: October 06, 2017, 08:39:48 pm »
This new version at least works when cb is restarted for wx28 builds.

Can someone test it on Windows with wx28?

@ollydbg: building wx28 is not that hard, so it is not bad idea to have a version of it built lying around...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Miguel Gimenez

  • Developer
  • Lives here!
  • *****
  • Posts: 1553
Re: Configure the CC's toolbar length patch
« Reply #7 on: October 09, 2017, 05:12:44 pm »
On Windows 7 with wx2.8 it works OK without restarting.

BTW, in the first page of the settings there is a typo; it reads "Add doxgen comment..." when it should read "doxygen".

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #8 on: October 10, 2017, 12:19:13 am »
Thanks for testing. I guess I'll commit it as is, wx2.8 is not that common on linux anyway.
I'll also fix the spelling. Thanks for reporting.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Configure the CC's toolbar length patch
« Reply #9 on: October 10, 2017, 07:24:01 am »
In trunk.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5910
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Configure the CC's toolbar length patch
« Reply #10 on: October 10, 2017, 04:53:19 pm »
Hi, OBF:
I see in https://sourceforge.net/p/codeblocks/code/11194/
Some length is 280, and Some length is 286, the "280" should be "286"?

Sorry, the 280 is from my patch. :)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.