Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

Scripted Plugin: FindBrokenFiles

<< < (4/6) > >>

Jenna:

--- Quote from: MortenMacFly on December 30, 2011, 07:50:15 am ---
--- Quote from: oBFusCATed on December 29, 2011, 09:02:25 pm ---OK, I've committed it to trunk...

--- End quote ---
BTW: Reminds me: I had an issue with this script the past time I used it: When removing files, some were left and you had to call the script several times to really remove all broken files. Is that still the case?

--- End quote ---
Yes it is.

The cause is that you loop forward through the files and remove them.

In general it's better to do this backwards if removing array members, because a removed index does not change the indexes following in the loop.

I fixed it in trunk and now it seems to work as expected.

MortenMacFly:

--- Quote from: oBFusCATed on December 30, 2011, 09:58:23 am ---I've tried it on the codeblocks-unix.cbp and it removed one file successfully :)

--- End quote ---
Note that this might not really be a missing file. some of the files are Windows only and are simple "disabled" in Unix.

MortenMacFly:

--- Quote from: jens on December 30, 2011, 10:22:41 am ---In general it's better to do this backwards if removing array members, because a removed index does not change the indexes following in the loop.

--- End quote ---
I know, but it was really just a demo and I was to lazy to take care.


--- Quote from: jens on December 30, 2011, 10:22:41 am ---I fixed it in trunk and now it seems to work as expected.

--- End quote ---
Thanks! :)

LETARTARE:
Good year for C::B.
@jens
r7650 in 'src/scripts/plugin_find_broken_files.script',
line of code:

--- Quote ---entries.Add(_T("Plugins/0:-Find broken files in project"), 1);
--- End quote ---
creates an entry 'Plugins' in the international versions !
I propose instead

--- Quote ---entries.Add(_("&Plugins") + _T("/0:-") + _("Find broken files in project"), 1) ;
--- End quote ---
which also allows the translation.

Other hand, all the scripts in this directory can be prepared for the translation, I can send
a zip of changed files and 'scripts.pot', that works at home.

oBFusCATed:
As far as I can see you've not tested the change, have you?
I think so, because the correct line is:

--- Code: ---entries.Add(_("P&lugins") + _T("/0:-") + _("Find broken files in project"), 1);
--- End code ---

Please verify my version of the line is correct and I'll commit it.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version