diff options
| author | 2010-05-23 21:25:02 +0000 | |
|---|---|---|
| committer | 2010-05-23 21:25:02 +0000 | |
| commit | 9f90675314dcefe7fd76d6f779a8e59b3555f0b8 (patch) | |
| tree | c2d5a2b09a804abfe692226088caa135b55b99fe /src/modules/options/optw_identity.cpp | |
| parent | Move the tree taskbar to the appropriate area when switching. Increase the de... (diff) | |
| download | KVIrc-9f90675314dcefe7fd76d6f779a8e59b3555f0b8.tar.gz KVIrc-9f90675314dcefe7fd76d6f779a8e59b3555f0b8.tar.bz2 KVIrc-9f90675314dcefe7fd76d6f779a8e59b3555f0b8.zip | |
Tweak avatar selection a bit
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@4370 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/options/optw_identity.cpp')
| -rw-r--r-- | src/modules/options/optw_identity.cpp | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/modules/options/optw_identity.cpp b/src/modules/options/optw_identity.cpp index 365bcab15..380dc571f 100644 --- a/src/modules/options/optw_identity.cpp +++ b/src/modules/options/optw_identity.cpp @@ -51,6 +51,7 @@ #include <QTimer> #include <QValidator> #include <QCloseEvent> +#include <QFileInfo> KviNickAlternativesDialog::KviNickAlternativesDialog(QWidget * par,const QString &n1,const QString &n2,const QString &n3) : QDialog(par) @@ -602,12 +603,34 @@ void KviIdentityAvatarOptionsWidget::chooseAvatar() { if((m_pLocalAvatar->pixmap()->width() > 1024) || (m_pLocalAvatar->pixmap()->height() > 768)) { - QMessageBox::warning(this,__tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"), - __tr2qs_ctx("The avatar you have chosen is bigger than 1024x768 pixels.<br>" \ + QMessageBox::warning( + this, + __tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"), + __tr2qs_ctx( + "The avatar you have chosen is bigger than 1024x768 pixels.<br>" \ "Such a big image will not be seen on all the user monitors<br>" \ "and will probably be scaled by the remote clients with poor quality<br>" \ "algorithms to improve performance. You *should* scale it manually<br>" \ - "to a sane size (like 800x600) or choose a different image.","options")); + "to a sane size (like 800x600) or choose a different image.", + "options" + ) + ); + } else { + QFileInfo inf(m_pLocalAvatar->path()); + if(inf.size() > 524288) + { + QMessageBox::warning( + this, + __tr2qs_ctx("Avatar Might Be Too Big - KVIrc","options"), + __tr2qs_ctx( + "The avatar you have chosen is bigger than 500 KiB<br>" \ + "and most clients will refuse to download it.<br>" \ + "You *should* either scale it, use a different storage<br>" \ + "format or choose a different image.", + "options" + ) + ); + } } } |
