Author Topic: Disabled plugin names  (Read 4656 times)

Offline duncanka

  • Multiple posting newcomer
  • *
  • Posts: 53
Disabled plugin names
« on: February 12, 2006, 05:36:57 am »
Currently, if a plugin is disabled, it shows up in the Plugins manager not as the true name of the plugin, but as the filename.  Whether this is a bug, an oversight, or (for some strange reason) deliberate, I think it would be more intuitive if the display were consistent.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Disabled plugin names
« Reply #1 on: February 12, 2006, 08:57:31 am »
This is not an oversight, nor a bug.
The plugin's name is provided by the plugin on request. This means that C::B should load (and create a temp instance of) even disabled plugins.
So, disabled plugins just don't get loaded and their filename is displayed in the management window (so you know they 're there).
Be patient!
This bug will be fixed soon...

Offline duncanka

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Disabled plugin names
« Reply #2 on: February 13, 2006, 03:12:11 am »
This is not an oversight, nor a bug.
The plugin's name is provided by the plugin on request. This means that C::B should load (and create a temp instance of) even disabled plugins.
So, disabled plugins just don't get loaded and their filename is displayed in the management window (so you know they 're there).
Ah, gotcha.  I see the problem.
But that raises another issue: is there a way to make the plugin information static by DLL?  Maybe have two separate functions for getting the plugin info, one dynamic one (the current getInfo()) and one static one (callable without a plugin instance, and which getInfo() would also call)?  Is there any reason the info has to be initialized in the plugin constructor, and not declared as a static struct?
Sorry if this is a ridiculous suggestion; I don't really know much about DLL linkage.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Disabled plugin names
« Reply #3 on: February 13, 2006, 08:39:08 am »
Well, this whole info struct could be moved to a separate function, outside the plugin's class. Just like the SDK version functions etc.
Be patient!
This bug will be fixed soon...

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Disabled plugin names
« Reply #4 on: February 13, 2006, 09:08:20 am »
That still requires the dll to be loaded though, otherwise you still can't access the name, so it is not much of a gain.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Disabled plugin names
« Reply #5 on: February 13, 2006, 09:13:58 am »
The DLL must be loaded either way. The point is to not create an instance of the plugin.
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: Disabled plugin names
« Reply #6 on: February 13, 2006, 01:50:21 pm »
Maybe just a "name" setting in default.conf, caching all the plugin names (loaded once upon a time) could do it.

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Disabled plugin names
« Reply #7 on: February 13, 2006, 02:22:53 pm »
It's fixed already.
Be patient!
This bug will be fixed soon...

takeshimiya

  • Guest
Re: Disabled plugin names
« Reply #8 on: February 13, 2006, 02:41:56 pm »
:D