mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 23:07:59 +00:00
- Connection status is not a button anymore
This commit is contained in:
parent
dd46e7e093
commit
14cd4de2c2
19
src/GUI.cpp
19
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("<b>Connection Status:</b><br>Offline<br><i>No peers found...</i>"));
|
||||
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("<b>Connection Status:</b><br>Online"));
|
||||
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/connected.png")));
|
||||
connecStatusLblIcon->setToolTip(tr("<b>Connection Status:</b><br>Online"));
|
||||
}else{
|
||||
if(sessionStatus.num_peers){
|
||||
// Firewalled ?
|
||||
actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/firewalled.png")));
|
||||
actionConnexion_Status->setText(tr("<b>Connection Status:</b><br>Firewalled?<br><i>No incoming connections...</i>"));
|
||||
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png")));
|
||||
connecStatusLblIcon->setToolTip(tr("<b>Connection Status:</b><br>Firewalled?<br><i>No incoming connections...</i>"));
|
||||
}else{
|
||||
// Disconnected
|
||||
actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/disconnected.png")));
|
||||
actionConnexion_Status->setText(tr("<b>Connection Status:</b><br>Offline<br><i>No peers found...</i>"));
|
||||
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png")));
|
||||
connecStatusLblIcon->setToolTip(tr("<b>Connection Status:</b><br>Offline<br><i>No peers found...</i>"));
|
||||
}
|
||||
}
|
||||
// Check trackerErrors list size and clear it if it is too big
|
||||
|
@ -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;
|
||||
|
@ -6,7 +6,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>849</width>
|
||||
<height>553</height>
|
||||
<height>576</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="contextMenuPolicy" >
|
||||
@ -797,7 +797,6 @@
|
||||
<addaction name="actionOptions" />
|
||||
<addaction name="actionExit" />
|
||||
<addaction name="separator" />
|
||||
<addaction name="actionConnexion_Status" />
|
||||
</widget>
|
||||
<action name="actionOpen" >
|
||||
<property name="text" >
|
||||
@ -849,11 +848,6 @@
|
||||
<string>Documentation</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionConnexion_Status" >
|
||||
<property name="text" >
|
||||
<string>Connection Status</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDelete_All" >
|
||||
<property name="text" >
|
||||
<string>Delete All</string>
|
||||
|
Loading…
Reference in New Issue
Block a user