koIcon - what to keep in mind
Inge Wallin
inge at lysator.liu.se
Tue Aug 7 08:24:25 BST 2012
On Tuesday, August 07, 2012 03:18:38 Friedrich W. H. Kossebau wrote:
> Hi,
>
> finally koIcon made it into master, yippie (IMHO). From now on it should be
> quite easy for anyone to check what icons are missing, now that all icon
> names are tagged with macros which can be extracted with gettext and
> compared against the existing icons.
>
> But: this is not free lunch, as discussed. It needs everyone who adds new
> icon usages to also use the macros from KoIcon.h (besides in QML files,
> these are not covered, no proper idea yet how to tag without a footprint).
>
> Basically you just need to remember this:
>
> KIcon("pretty_icon") -> koIcon("pretty_icon")
Hmm, is the classname really koIcon? Should be KoIcon, shouldn't it? Or is
this a function? But in that case it's not just a simple text substitution...
> Should be doable by you, right? :P
You mean we should change the existing KIcon's to KoIcon? Can do, but please
give confirmation that this is what you mean.
> In cases where just an icon name is to be set, use
>
> koIconName("pretty_icon") to get a QString
> koIconNameCStr("pretty_icon") to get a const char*
>
> If you know the icon is missing, you can use the *Needed* variants of the
> macros, where you set a comment and can provide a temporary substitute.
>
>
> There is a simple script in tools/iconcheck which ATM is to be used from
> the toplevel dir to get a list of missing/needed icons, like this:
>
> $ tools/iconcheck/iconcheck.py
>
> The iconnames tagged with the koIconWanted macro are currently included in
> the script's output, seems a separate gettext run will be needed in the
> script to separate the needed from the just-wanted icons.
> Everyone is invited to improve the script, it's just a simple start :)
>
> And hurray for Tim and Yuri making the output of the script shorter
> already!
>
> Cheers
> Friedrich
> _______________________________________________
> calligra-devel mailing list
> calligra-devel at kde.org
> https://mail.kde.org/mailman/listinfo/calligra-devel
More information about the calligra-devel
mailing list