diff options
| author | 2008-04-23 01:43:52 +0000 | |
|---|---|---|
| committer | 2008-04-23 01:43:52 +0000 | |
| commit | eba2ecb65ee75388a9c5d143d7f72041bd269603 (patch) | |
| tree | 1dc69c8a1501493038846ed257fcb07a85261a56 | |
| parent | more work on update (diff) | |
| download | KVIrc-eba2ecb65ee75388a9c5d143d7f72041bd269603.tar.gz KVIrc-eba2ecb65ee75388a9c5d143d7f72041bd269603.tar.bz2 KVIrc-eba2ecb65ee75388a9c5d143d7f72041bd269603.zip | |
added icon
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@1565 17fca916-40b9-46aa-a4ea-0a15b648b75c
| -rw-r--r-- | data/pics/coresmall/kcs_failupdate.png | bin | 0 -> 3616 bytes | |||
| -rw-r--r-- | src/kvirc/kernel/kvi_iconmanager.cpp | 3 | ||||
| -rw-r--r-- | src/kvirc/kernel/kvi_iconmanager.h | 3 | ||||
| -rw-r--r-- | src/kvirc/ui/kvi_statusbarapplet.cpp | 24 |
4 files changed, 17 insertions, 13 deletions
diff --git a/data/pics/coresmall/kcs_failupdate.png b/data/pics/coresmall/kcs_failupdate.png Binary files differnew file mode 100644 index 000000000..07455e046 --- /dev/null +++ b/data/pics/coresmall/kcs_failupdate.png diff --git a/src/kvirc/kernel/kvi_iconmanager.cpp b/src/kvirc/kernel/kvi_iconmanager.cpp index 2330b050f..2bd943eac 100644 --- a/src/kvirc/kernel/kvi_iconmanager.cpp +++ b/src/kvirc/kernel/kvi_iconmanager.cpp @@ -341,7 +341,8 @@ static const char * g_szIconNames[KVI_NUM_SMALL_ICONS]= "theme", // 290 "screenshot", // 291 "update", // 292 - "notupdate" // 293 + "notupdate", // 293 + "failupdate" // 294 }; KviIconWidget::KviIconWidget() diff --git a/src/kvirc/kernel/kvi_iconmanager.h b/src/kvirc/kernel/kvi_iconmanager.h index ede7d23e5..95feb8cdd 100644 --- a/src/kvirc/kernel/kvi_iconmanager.h +++ b/src/kvirc/kernel/kvi_iconmanager.h @@ -330,8 +330,9 @@ #define KVI_SMALLICON_SCREENSHOT 291 #define KVI_SMALLICON_UPDATE 292 #define KVI_SMALLICON_NOTUPDATE 293 +#define KVI_SMALLICON_FAILUPDATE 294 -#define KVI_NUM_SMALL_ICONS 294 +#define KVI_NUM_SMALL_ICONS 295 #define KVI_BIGICON_DISCONNECTED "kvi_bigicon_disconnected.png" diff --git a/src/kvirc/ui/kvi_statusbarapplet.cpp b/src/kvirc/ui/kvi_statusbarapplet.cpp index 3e6d76030..42e11ed8e 100644 --- a/src/kvirc/ui/kvi_statusbarapplet.cpp +++ b/src/kvirc/ui/kvi_statusbarapplet.cpp @@ -45,6 +45,7 @@ #include "kvi_http.h" #include "kvi_url.h" #include "kvi_tal_popupmenu.h" +#include "kvi_tal_tooltip.h" #include <QPainter> #include <QStyle> @@ -53,7 +54,6 @@ #include <QCursor> #include <QPixmap> #include <QFont> -#include <QMessageBox> #include <QEvent> #include <QMouseEvent> @@ -561,13 +561,6 @@ KviStatusBarUpdateIndicator::KviStatusBarUpdateIndicator(KviStatusBar * pParent, if(!pixmap()) setPixmap(*(g_pIconManager->getSmallIcon(KVI_SMALLICON_NOTUPDATE))); - - connect(m_pHttpRequest,SIGNAL(resolvingHost(const QString &)),this,SLOT(hostResolved(const QString &))); - connect(m_pHttpRequest,SIGNAL(connectionEstabilished()),this,SLOT(connectionEstabilished())); - connect(m_pHttpRequest,SIGNAL(receivedResponse(const QString &)),this,SLOT(responseReceived(const QString &))); - connect(m_pHttpRequest,SIGNAL(binaryData(const KviDataBuffer &)),this,SLOT(binaryDataReceived(const KviDataBuffer &))); - connect(m_pHttpRequest,SIGNAL(terminated(bool)),this,SLOT(requestCompleted(bool))); - qDebug("Connected signals"); } KviStatusBarUpdateIndicator::~KviStatusBarUpdateIndicator() @@ -625,6 +618,13 @@ void KviStatusBarUpdateIndicator::mouseDoubleClickEvent(QMouseEvent * e) qDebug("Created http object"); m_pHttpRequest = new KviHttpRequest(); + connect(m_pHttpRequest,SIGNAL(resolvingHost(const QString &)),this,SLOT(hostResolved(const QString &))); + connect(m_pHttpRequest,SIGNAL(connectionEstabilished()),this,SLOT(connectionEstabilished())); + connect(m_pHttpRequest,SIGNAL(receivedResponse(const QString &)),this,SLOT(responseReceived(const QString &))); + connect(m_pHttpRequest,SIGNAL(binaryData(const KviDataBuffer &)),this,SLOT(binaryDataReceived(const KviDataBuffer &))); + connect(m_pHttpRequest,SIGNAL(terminated(bool)),this,SLOT(requestCompleted(bool))); + qDebug("Connected signals"); + qDebug("Making http request"); m_pHttpRequest->get(url,KviHttpRequest::WholeFile,szFileName); } @@ -644,7 +644,10 @@ void KviStatusBarUpdateIndicator::responseReceived(const QString &response) qDebug("Remote response: %s",response.toUtf8().data()); if(response != "HTTP/1.1 200 OK") - QMessageBox::warning(this,"Update Indicator",response,QMessageBox::Ok); + // FIXME: this segfault kvirc due to the eventloop + // in QMessageBox. Use KviTalToolTip and change the icon + // to KVI_SMALLICON_FAILUPDATE + //QMessageBox::warning(this,"Update Indicator",response,QMessageBox::Ok); } void KviStatusBarUpdateIndicator::binaryDataReceived(const KviDataBuffer &buffer) @@ -689,8 +692,7 @@ void KviStatusBarUpdateIndicator::binaryDataReceived(const KviDataBuffer &buffer void KviStatusBarUpdateIndicator::requestCompleted(bool status) { qDebug("Data transfer terminated"); - // this make kvirc segfault - if(status) delete m_pHttpRequest; + delete m_pHttpRequest; qDebug("Deleted http object"); } |
