From 14cd4de2c225a2c7529be5a60fdd2a9fb4e67421 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 22 Oct 2006 20:13:35 +0000 Subject: [PATCH] - Connection status is not a button anymore --- src/GUI.cpp | 19 ++++++++++++------- src/GUI.h | 1 + src/MainWindow.ui | 8 +------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index 7ff52209f..6472d3231 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -76,7 +76,11 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){ actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png"))); // actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.png"))); - actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/disconnected.png"))); + connecStatusLblIcon = new QLabel(); + connecStatusLblIcon->setFrameShape(QFrame::NoFrame); + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png"))); + connecStatusLblIcon->setToolTip(tr("Connection Status:
Offline
No peers found...")); + toolBar->addWidget(connecStatusLblIcon); actionDelete_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_all.png"))); actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); actionCreate_torrent->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/new.png"))); @@ -258,6 +262,7 @@ GUI::~GUI(){ delete SearchDelegate; delete previewProcess; delete downloader; + delete connecStatusLblIcon; delete s; } @@ -1846,17 +1851,17 @@ void GUI::checkConnectionStatus(){ } if(sessionStatus.has_incoming_connections){ // Connection OK - actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/connected.png"))); - actionConnexion_Status->setText(tr("Connection Status:
Online")); + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/connected.png"))); + connecStatusLblIcon->setToolTip(tr("Connection Status:
Online")); }else{ if(sessionStatus.num_peers){ // Firewalled ? - actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/firewalled.png"))); - actionConnexion_Status->setText(tr("Connection Status:
Firewalled?
No incoming connections...")); + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png"))); + connecStatusLblIcon->setToolTip(tr("Connection Status:
Firewalled?
No incoming connections...")); }else{ // Disconnected - actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/disconnected.png"))); - actionConnexion_Status->setText(tr("Connection Status:
Offline
No peers found...")); + connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png"))); + connecStatusLblIcon->setToolTip(tr("Connection Status:
Offline
No peers found...")); } } // Check trackerErrors list size and clear it if it is too big diff --git a/src/GUI.h b/src/GUI.h index e35fd864e..573e506bd 100644 --- a/src/GUI.h +++ b/src/GUI.h @@ -85,6 +85,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{ SearchListDelegate *SearchDelegate; QStringList supported_preview_extensions; unsigned int nbTorrents; + QLabel *connecStatusLblIcon; // Preview previewSelect *previewSelection; QProcess *previewProcess; diff --git a/src/MainWindow.ui b/src/MainWindow.ui index b3b4a4345..8271f08b3 100644 --- a/src/MainWindow.ui +++ b/src/MainWindow.ui @@ -6,7 +6,7 @@ 0 0 849 - 553 + 576 @@ -797,7 +797,6 @@ - @@ -849,11 +848,6 @@ Documentation - - - Connection Status - - Delete All