Merge b1b58c2ef19bfb31fe643989e7cabea796e03e99 into 1d1138d0cb941845632cc4a8f74336818d63bcc4

This commit is contained in:
defnax 2025-04-14 18:59:48 +00:00 committed by GitHub
commit b539fdd185
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 74 additions and 10 deletions

View File

@ -49,6 +49,7 @@
#define IMAGE_GOOD ":/images/accepted16.png"
#define IMAGE_BAD ":/icons/cancel.svg"
#define IMAGE_TOR ":/icons/Tor-logo-2011.png"
class EntropyCollectorWidget: public QTextBrowser
{
@ -201,6 +202,8 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
// ui.adv_checkbox->setVisible(true);
//#endif
ui.pixmaplabel->setVisible(false);
initKeyList();
setupState();
updateCheckLabels();
@ -586,6 +589,7 @@ void GenCertDialog::genPerson()
//ui.reuse_existing_node_CB->hide();
ui.name_label->hide();
ui.name_input->hide();
ui.profile_name_check_LB->hide();
ui.nickname_label->hide();
ui.nickname_input->hide();
ui.password2_label->hide();
@ -605,8 +609,24 @@ void GenCertDialog::genPerson()
ui.keylength_label->hide();
ui.keylength_comboBox->hide();
ui.randomness_label_->hide();
ui.entropy_bar->hide();
ui.randomness_check_LB->hide();
ui.nodeType_LB->hide();
ui.adv_checkbox->hide();
ui.groupBox->hide();
setCursor(Qt::WaitCursor) ;
if(isAutoTor && RsTor::isTorAvailable())
{
ui.info_Label->setVisible(true) ;
ui.pixmaplabel->setVisible(true) ;
ui.info_Label->setAlignment(Qt::AlignCenter);
ui.info_Label->setText("RetroShare is starting with Tor...") ;
ui.pixmaplabel->setPixmap(FilesDefs::getPixmapFromQtResourcePath(IMAGE_TOR)) ;
}
QCoreApplication::processEvents();
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
#ifdef DEBUG_GENCERTDIALOG

View File

@ -184,7 +184,7 @@
<property name="bottomMargin">
<number>24</number>
</property>
<item row="1" column="0">
<item row="2" column="0">
<layout class="QGridLayout" name="profilGLayout">
<item row="14" column="2">
<widget class="RSComboBox" name="keylength_comboBox">
@ -785,6 +785,16 @@
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="pixmaplabel">
<property name="text">
<string>TextLabel</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -826,8 +836,8 @@
<tabstop>importIdentity_PB</tabstop>
</tabstops>
<resources>
<include location="images.qrc"/>
<include location="icons.qrc"/>
<include location="images.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -146,6 +146,11 @@
#define IMAGE_TWOONLINE ":/icons/logo_2_connected_128.png"
#define IMAGE_OVERLAY ":/icons/star_overlay_128.png"
#define IMAGE_RETROSHARETOR ":/icons/retroshare-logo-tor.png"
#define IMAGE_NOONLINETOR ":/icons/tor-0-connected.png"
#define IMAGE_ONEONLINETOR ":/icons/tor-1-connected.png"
#define IMAGE_TWOONLINETOR ":/icons/tor-2-connected.png"
#define IMAGE_BWGRAPH ":/icons/png/bandwidth.png"
#define IMAGE_COLOR ":/images/highlight.png"
#define IMAGE_NEWRSCOLLECTION ":/images/library.png"
@ -221,7 +226,12 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
QDesktopServices::setUrlHandler("https", this, "externalLinkActivated");
// Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/logo_128.png")));
if(hiddenmode) {
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/retroshare-logo-tor.png")));
}
else {
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/logo_128.png")));
}
/* Create all the dialogs of which we only want one instance */
_bandwidthGraph = NULL ;
@ -669,6 +679,13 @@ void MainWindow::createTrayIcon()
trayIcon->setContextMenu(trayMenu);
trayIcon->setIcon(QIcon(IMAGE_NOONLINE));
#if defined(Q_OS_DARWIN)
// On macOS, change the Dock icon when rs running in hidden mode
if(hiddenmode) {
QApplication::setWindowIcon(QPixmap(QString::fromUtf8(":/icons/retroshare-logo-tor.png")));
}
#endif
#if defined(Q_OS_DARWIN)
// Note: On macOS, the Dock icon is used to provide the tray's functionality.
MacDockIconHandler* dockIconHandler = MacDockIconHandler::instance();
@ -907,14 +924,26 @@ void MainWindow::updateFriends()
QString trayIconResource;
if (onlineCount == 0) {
trayIconResource = IMAGE_NOONLINE;
} else if (onlineCount < 2) {
trayIconResource = IMAGE_ONEONLINE;
} else if (onlineCount < 3) {
trayIconResource = IMAGE_TWOONLINE;
if(hiddenmode) {
if (onlineCount == 0) {
trayIconResource = IMAGE_NOONLINETOR;
} else if (onlineCount < 2) {
trayIconResource = IMAGE_ONEONLINETOR;
} else if (onlineCount < 3) {
trayIconResource = IMAGE_TWOONLINETOR;
} else {
trayIconResource = IMAGE_RETROSHARETOR;
}
} else {
trayIconResource = IMAGE_RETROSHARE;
if (onlineCount == 0) {
trayIconResource = IMAGE_NOONLINE;
} else if (onlineCount < 2) {
trayIconResource = IMAGE_ONEONLINE;
} else if (onlineCount < 3) {
trayIconResource = IMAGE_TWOONLINE;
} else {
trayIconResource = IMAGE_RETROSHARE;
}
}
QIcon icon;

View File

@ -383,5 +383,10 @@
<file>icons/filetype/dll.svg</file>
<file>icons/filetype/collection.svg</file>
<file>icons/filetype/patch.svg</file>
<file>icons/Tor-logo-2011.png</file>
<file>icons/tor-2-connected.png</file>
<file>icons/tor-1-connected.png</file>
<file>icons/tor-0-connected.png</file>
<file>icons/retroshare-logo-tor.png</file>
</qresource>
</RCC>

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB