Author Topic: Plugin Enable/Disable?  (Read 7043 times)

d13f001

  • Guest
Plugin Enable/Disable?
« on: May 03, 2005, 12:26:33 am »
How do I enable/disable plugins in the CVS version of code::blocks?  There's no compiler nor code-completion plugin enabled listed, I'd like to turn them on.

I also plan on debugging some of this stuff.  There's little reason for the windows version to be stable and the linux version to be not.  I got everything built with debugging symbols, etc.

Is there a config file I have to edit?

d13f001

  • Guest
Plugin Enable/Disable?
« Reply #1 on: May 03, 2005, 01:06:00 am »
Enabled plugin switching in main.cpp, it crashes naturally.  I'll start attempting to debug here. :P

d13f001

  • Guest
Plugin Enable/Disable?
« Reply #2 on: May 03, 2005, 01:28:28 am »
line ~1143ish in main.cpp, WX's GetMenuBar() is returning NULL.  This happens in other parts of the program..I wonder why.

null->Enable = crashes 4 lyfe

d13f001

  • Guest
Plugin Enable/Disable?
« Reply #3 on: May 03, 2005, 01:54:15 am »
~line 520, in main.cpp
We're building menus for plugins after changing them, heh, but the menu is currently not set
SetMenuBar(mbar) before that fixes the problem

edit: part of it...grrr

Ok, if we set before that section of code, the app wont crash but the menu wont get updated.  If we set again after, it updates.  Is there a menu bar update function?  According to the wx docs for wxFrame, SetMenuBar, "Note that it is not possible to call this function twice for the same frame object."

It's working, but I'm sure setting it twice is improper..we're rebuidling the whole menu every time something has to get changed as well, and the update functions rely on the window already having a menu, but we remove it.

I suppose we can getmenu, set the menu bar to NULL, and then set the menu bar to what we get'ted prior to  setting it to NULL...?



edit:  Nevermind, we can just set the menu  multiple times I guess, unless someone else is rewriting that code?

#1  0xa7775767 in CompilerGCC::OnRelease (this=0x824cf00, appShutDown=false)
    at compilergcc.cpp:262
The next problem is here, I can enable plugins, but removal of the gcc one crashes. m_Menu is probably NULL and not allocated for deletion.

Offline rickg22

  • Lives here!
  • ****
  • Posts: 2283
Plugin Enable/Disable?
« Reply #4 on: May 03, 2005, 07:28:20 am »
That's weird. I see the "compiler" and "code completion" plugins listed under the "Manage Plugins" menu. To enable them: Just click manage plugins, enable the respective plugins, and then close C::B. Open it again. (If they're not present, then the plugins got deleted!!! O.O )

Yes, for the moment the compilergcc plugin needs to be present (I guess we never bothered fixing it). However, you should check this and other plugins to see how they modify the menus.

And please, don't bother trying to disable or enable the plugins on-the-fly. We decided to take off that feature for a reason (MANY MANY crashes).