mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
- Connection status is not a button anymore
This commit is contained in:
parent
dd46e7e093
commit
14cd4de2c2
3 changed files with 14 additions and 14 deletions
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")));
|
actionClearLog->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||||
// actionDocumentation->setIcon(QIcon(QString::fromUtf8(":/Icons/help.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")));
|
actionDelete_All->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_all.png")));
|
||||||
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
|
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
|
||||||
actionCreate_torrent->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/new.png")));
|
actionCreate_torrent->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/new.png")));
|
||||||
|
@ -258,6 +262,7 @@ GUI::~GUI(){
|
||||||
delete SearchDelegate;
|
delete SearchDelegate;
|
||||||
delete previewProcess;
|
delete previewProcess;
|
||||||
delete downloader;
|
delete downloader;
|
||||||
|
delete connecStatusLblIcon;
|
||||||
delete s;
|
delete s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1846,17 +1851,17 @@ void GUI::checkConnectionStatus(){
|
||||||
}
|
}
|
||||||
if(sessionStatus.has_incoming_connections){
|
if(sessionStatus.has_incoming_connections){
|
||||||
// Connection OK
|
// Connection OK
|
||||||
actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/connected.png")));
|
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/connected.png")));
|
||||||
actionConnexion_Status->setText(tr("<b>Connection Status:</b><br>Online"));
|
connecStatusLblIcon->setToolTip(tr("<b>Connection Status:</b><br>Online"));
|
||||||
}else{
|
}else{
|
||||||
if(sessionStatus.num_peers){
|
if(sessionStatus.num_peers){
|
||||||
// Firewalled ?
|
// Firewalled ?
|
||||||
actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/firewalled.png")));
|
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/firewalled.png")));
|
||||||
actionConnexion_Status->setText(tr("<b>Connection Status:</b><br>Firewalled?<br><i>No incoming connections...</i>"));
|
connecStatusLblIcon->setToolTip(tr("<b>Connection Status:</b><br>Firewalled?<br><i>No incoming connections...</i>"));
|
||||||
}else{
|
}else{
|
||||||
// Disconnected
|
// Disconnected
|
||||||
actionConnexion_Status->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/disconnected.png")));
|
connecStatusLblIcon->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/disconnected.png")));
|
||||||
actionConnexion_Status->setText(tr("<b>Connection Status:</b><br>Offline<br><i>No peers found...</i>"));
|
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
|
// 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;
|
SearchListDelegate *SearchDelegate;
|
||||||
QStringList supported_preview_extensions;
|
QStringList supported_preview_extensions;
|
||||||
unsigned int nbTorrents;
|
unsigned int nbTorrents;
|
||||||
|
QLabel *connecStatusLblIcon;
|
||||||
// Preview
|
// Preview
|
||||||
previewSelect *previewSelection;
|
previewSelect *previewSelection;
|
||||||
QProcess *previewProcess;
|
QProcess *previewProcess;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>849</width>
|
<width>849</width>
|
||||||
<height>553</height>
|
<height>576</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="contextMenuPolicy" >
|
<property name="contextMenuPolicy" >
|
||||||
|
@ -797,7 +797,6 @@
|
||||||
<addaction name="actionOptions" />
|
<addaction name="actionOptions" />
|
||||||
<addaction name="actionExit" />
|
<addaction name="actionExit" />
|
||||||
<addaction name="separator" />
|
<addaction name="separator" />
|
||||||
<addaction name="actionConnexion_Status" />
|
|
||||||
</widget>
|
</widget>
|
||||||
<action name="actionOpen" >
|
<action name="actionOpen" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
|
@ -849,11 +848,6 @@
|
||||||
<string>Documentation</string>
|
<string>Documentation</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionConnexion_Status" >
|
|
||||||
<property name="text" >
|
|
||||||
<string>Connection Status</string>
|
|
||||||
</property>
|
|
||||||
</action>
|
|
||||||
<action name="actionDelete_All" >
|
<action name="actionDelete_All" >
|
||||||
<property name="text" >
|
<property name="text" >
|
||||||
<string>Delete All</string>
|
<string>Delete All</string>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue