News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Scripted Plugin: FindBrokenFiles

Started by MortenMacFly, June 13, 2007, 11:17:47 PM

Previous topic - Next topic

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...
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?
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 :)
Note that this might not really be a missing file. some of the files are Windows only and are simple "disabled" in Unix.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

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.
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.
Thanks! :)
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

LETARTARE

Good year for C::B.
@jens
r7650 in 'src/scripts/plugin_find_broken_files.script',
line of code:
Quoteentries.Add(_T("Plugins/0:-Find broken files in project"), 1);
creates an entry 'Plugins' in the international versions !
I propose instead
Quoteentries.Add(_("&Plugins") + _T("/0:-") + _("Find broken files in project"), 1) ;
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.

CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

As far as I can see you've not tested the change, have you?
I think so, because the correct line is:
entries.Add(_("P&lugins") + _T("/0:-") + _("Find broken files in project"), 1);

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

(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!]

LETARTARE

I tested and it works with my setup !
In r7650 (English) with '&Plugins', 'P&lugins', 'Plugins' it works !!
and French works as.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

So what is the correct line? Your last post is quite confusing.
(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!]

LETARTARE

The '&' is not taken into account.
Take 'Plugins' as 'Jens'.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

LETARTARE

r7650 : In the source 'src\main.cpp:926'  found  _('P&lugins').
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'

oBFusCATed

Yes, I know, that's why I've said that you've not tested your change, but if it doesn't matter I'll commit a version without the '&' character.
(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!]

LETARTARE

@ofuscated
I am sorry but I tested all the possibilities on r7650, before posting:
Quote'Plugins'
Quote'&Plugins'
Quote'P&lugins'

all work on my computer!

In addition, the menus, letters preceded by '&' are no different from others letters.
CB-13834, plugins-sdk-2.25.0 : Collector-2.6.5, AddOnForQt-5.1.2
1- Win7 Business Pack1 64bits : wx-3.2.8, gcc-15.2.0,
2- OpenSuse::Leap-15.6-64bits : wx-3.2.8;gtk3-u, gcc-15.2.0,
=> !! The messages are translated by 'Deepl'