Review Request 110541: Synchronized tag categories and their views for resource choosers, KoResourceFiltering refactored a bit.

Sascha Suelzer s_suelzer at lavabit.com
Mon May 27 20:28:11 BST 2013



> On May 26, 2013, 2:03 p.m., Friedrich W. H. Kossebau wrote:
> > libs/widgets/KoResourceItemChooser.cpp, line 849
> > <http://git.reviewboard.kde.org/r/110541/diff/7/?file=146265#file146265line849>
> >
> >     List the argument in the i18n call, like
> >     i18n("Remove from \"%1\".", curTag).
> >     That way the translators see what %1 is.
> >     
> >     Though in this case this might not help that much, given that curTag is not really descriptive. You might want to add a comment to this string, using i18nc instead, like this
> >     i18nc("remove this item from the group with the tag curTag", "Remove from \"%1\".", curTag) or similar

Changed it to plain i18n("Remove from this tag"); and I think that looks good enough in the menu, imho, and is possibly easier on translators too since some languages would need to have the subject/tag shuffled to other positions.


- Sascha


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110541/#review33151
-----------------------------------------------------------


On May 27, 2013, 7:23 p.m., Sascha Suelzer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110541/
> -----------------------------------------------------------
> 
> (Updated May 27, 2013, 7:23 p.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> With this patch, the tag categories the user can define for various resources will update for any resource chooser of the same type.
> Examples: 
> Defining a new tag in the preset popup combobox will also create the respective tag entry in the preset docker one.
> If both choosers would display the same tag category, and the user adds a resource to the category in one chooser, the view of the other would reflect the change as well.
> 
> Both these things are achieved with a new set of signals and slots regarding tag category creation and modification.
> 
> Other changes:
> Refactored KoResourceFiltering a bit to make intent more clear and functionality a bit more fine grained, also fixed the naming for its private support class members from m_foo to foo since the fields are all public.
> Tag categories are now ordered in an alphabetical manner at all times.
> 
> --------------------------------
> 
> Remarks:
> 
> I am not really sure if KoResourceModel should be the class for the signals:
> signals:
>     void tagBoxEntryModified();
>     void tagBoxEntryAdded(QString tag);
>     void tagBoxEntryRemoved(QString tag);
> 
> It seems to me that perhaps all of this tagging and filtering stuff should go into the adapter directly, perhaps? But The KoResourceItemChoosers would still require the notifications and the model is pretty much the only bridge, so maybe the place is okay after all.
> 
> I also want to refactor some of the new code I introduced to make it look nicer, but I wanted to get this review request out for now so it is know that it is being worked on, since this builds on the former shortcomings of 
> https://git.reviewboard.kde.org/r/110429/
> 
> 
> Diffs
> -----
> 
>   krita/plugins/paintops/libbrush/kis_brush_server.cpp 5e4db8d 
>   krita/ui/kis_palette_manager.cpp 568859a 
>   krita/ui/ko_favorite_resource_manager.h fbfa86f 
>   krita/ui/ko_favorite_resource_manager.cpp 2481ce1 
>   krita/ui/widgets/kis_preset_chooser.h 5df3b56 
>   krita/ui/widgets/kis_preset_chooser.cpp 9f07c8a 
>   libs/widgets/KoResourceFiltering.h 9f8f967 
>   libs/widgets/KoResourceFiltering.cpp a62a873 
>   libs/widgets/KoResourceItemChooser.h d26f5a5 
>   libs/widgets/KoResourceItemChooser.cpp a2750b5 
>   libs/widgets/KoResourceModel.h 3ccb28b 
>   libs/widgets/KoResourceModel.cpp a9cb212 
>   libs/widgets/KoResourceServer.h 1ab4ad6 
>   libs/widgets/KoResourceServerAdapter.h 02ab31e 
>   libs/widgets/KoResourceServerAdapter.cpp f1dc50f 
>   libs/widgets/KoResourceServerObserver.h 52bc7fc 
>   libs/widgets/KoResourceTagging.h 0624096 
>   libs/widgets/KoResourceTagging.cpp b678000 
> 
> Diff: http://git.reviewboard.kde.org/r/110541/diff/
> 
> 
> Testing
> -------
> 
> Only tested for Krita, everything seems to work as it should.
> 
> 
> Thanks,
> 
> Sascha Suelzer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20130527/411674d7/attachment.htm>


More information about the calligra-devel mailing list