Review Request: Add KMessageWidget, an alternative to KMessageBox

Aurélien Gâteau agateau at kde.org
Fri Apr 29 14:58:57 BST 2011



> On April 28, 2011, 8:07 p.m., Jarosław Staniek wrote:
> > I admit I reviewed the code extensively since I used it in Kexi already, extending by adding default action feature, callouts, and autodeletion. Good job!
> > 
> > Please look at these supplementary notes too - I'd like to start discussion:
> > There's possible problem with adding new widgets in so matured API as KDElibs 4.7: I do not know how we'll deal with the problem of supporting KDE 4.6 apps that require this new widget (without forking). As I said on kde-core-devel, ideally new widgets would land in extra library and could be backported. Also this widget has almost nothing to do with KDElibs-sepcific features and some peopel would _love_ to use it in non-KDE code too. Again, without forking.
> 
> Jarosław Staniek wrote:
>     BTW, links to my extensions:
>     http://quickgit.kde.org/?p=calligra.git&a=blob&hb=60e7ff67fee20723a4a318339d982c85253307a5&f=kexi/kexiutils/kmessagewidget.h
>     http://quickgit.kde.org/?p=calligra.git&a=blob&h=67d11d15bd8c7df894ea7b048aeb9306efb7a1ab&hb=60e7ff67fee20723a4a318339d982c85253307a5&f=kexi/kexiutils/kmessagewidget.cpp

autodeletion and default action features make sense. Not sure what you mean with callouts though.

Regarding putting this in a separate library: it uses quite a few KDE features: KIconLoader, KColorScheme, KStandardAction... it is not really ready to be used from a Qt-only application.

I thought a lot about your idea of using separate libraries for classes added in future version of kdelibs. One of the drawbacks I foresee is the following:
- Assuming class A is in libkdeui
- A new class, B, is created and added to libkdeui4.7
- If it makes sense to use B in A, then libkdeui needs to depend on libkdeui4.7...

I think it would be simpler to document a clean way for application developers to backport new classes they are interested in. This can be done in a way which automatically avoids building the copied classes if the application is built against the latest version of kdelibs, ensuring the backports "disable themselves" automatically.


- Aurélien


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


On April 29, 2011, 1:44 p.m., Aurélien Gâteau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/101249/
> -----------------------------------------------------------
> 
> (Updated April 29, 2011, 1:44 p.m.)
> 
> 
> Review request for kdelibs.
> 
> 
> Summary
> -------
> 
> KMessageWidget is a new widget which can be considered as a less intrusive alternative for KMessageBox. It was designed during KDE UX sprint 2011 ( http://community.kde.org/Sprints/UX2011/KMessageWidget ).
> 
> The class documentation should make it clear how and when it can be used.
> 
> This widget could be used by:
> - Browsers to implement their "remember password" widgets (Konqueror, Rekonq...)
> - Forms to provide feedback on validation errors
> - Bluedevil KCM to replace its custom "No Bluetooth adapter have been found" message widget
> - Nepomuk/Strigi KCM to indicate status of their services
> - Gwenview to replace its custom save bar
> - ...
> 
> I still have a few additions in mind for the API but it is already usable and since we are freezing I think it can be merged in master in its current state. I assume it will still be possible to extend the API a bit before kdelibs 4.7 freezes for good.
> 
> I also wrote an example program in the kdeexample repository ( https://projects.kde.org/projects/kde/kdeexamples/repository/show?rev=agateau%2Fkmessagewidget ), though I am wondering whether it shouldn't be moved in kdeui/tests as it is more a manual test program than an example.
> 
> 
> Diffs
> -----
> 
>   kdeui/CMakeLists.txt d1873d1 
>   kdeui/widgets/kmessagewidget.h PRE-CREATION 
>   kdeui/widgets/kmessagewidget.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/101249/diff
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> Montage from kmessagewidgetdemo
>   http://git.reviewboard.kde.org/r/101249/s/141/
> 
> 
> Thanks,
> 
> Aurélien
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110429/4b44f1dd/attachment.htm>


More information about the kde-core-devel mailing list