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_GOOD ":/images/accepted16.png"
#define IMAGE_BAD ":/icons/cancel.svg" #define IMAGE_BAD ":/icons/cancel.svg"
#define IMAGE_TOR ":/icons/Tor-logo-2011.png"
class EntropyCollectorWidget: public QTextBrowser class EntropyCollectorWidget: public QTextBrowser
{ {
@ -201,6 +202,8 @@ GenCertDialog::GenCertDialog(bool onlyGenerateIdentity, QWidget *parent)
// ui.adv_checkbox->setVisible(true); // ui.adv_checkbox->setVisible(true);
//#endif //#endif
ui.pixmaplabel->setVisible(false);
initKeyList(); initKeyList();
setupState(); setupState();
updateCheckLabels(); updateCheckLabels();
@ -586,6 +589,7 @@ void GenCertDialog::genPerson()
//ui.reuse_existing_node_CB->hide(); //ui.reuse_existing_node_CB->hide();
ui.name_label->hide(); ui.name_label->hide();
ui.name_input->hide(); ui.name_input->hide();
ui.profile_name_check_LB->hide();
ui.nickname_label->hide(); ui.nickname_label->hide();
ui.nickname_input->hide(); ui.nickname_input->hide();
ui.password2_label->hide(); ui.password2_label->hide();
@ -605,8 +609,24 @@ void GenCertDialog::genPerson()
ui.keylength_label->hide(); ui.keylength_label->hide();
ui.keylength_comboBox->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) ; 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(); QCoreApplication::processEvents();
QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance(); QAbstractEventDispatcher* ed = QAbstractEventDispatcher::instance();
#ifdef DEBUG_GENCERTDIALOG #ifdef DEBUG_GENCERTDIALOG

View file

@ -184,7 +184,7 @@
<property name="bottomMargin"> <property name="bottomMargin">
<number>24</number> <number>24</number>
</property> </property>
<item row="1" column="0"> <item row="2" column="0">
<layout class="QGridLayout" name="profilGLayout"> <layout class="QGridLayout" name="profilGLayout">
<item row="14" column="2"> <item row="14" column="2">
<widget class="RSComboBox" name="keylength_comboBox"> <widget class="RSComboBox" name="keylength_comboBox">
@ -785,6 +785,16 @@
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</item> </item>
@ -826,8 +836,8 @@
<tabstop>importIdentity_PB</tabstop> <tabstop>importIdentity_PB</tabstop>
</tabstops> </tabstops>
<resources> <resources>
<include location="images.qrc"/>
<include location="icons.qrc"/> <include location="icons.qrc"/>
<include location="images.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View file

@ -146,6 +146,11 @@
#define IMAGE_TWOONLINE ":/icons/logo_2_connected_128.png" #define IMAGE_TWOONLINE ":/icons/logo_2_connected_128.png"
#define IMAGE_OVERLAY ":/icons/star_overlay_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_BWGRAPH ":/icons/png/bandwidth.png"
#define IMAGE_COLOR ":/images/highlight.png" #define IMAGE_COLOR ":/images/highlight.png"
#define IMAGE_NEWRSCOLLECTION ":/images/library.png" #define IMAGE_NEWRSCOLLECTION ":/images/library.png"
@ -221,7 +226,12 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
QDesktopServices::setUrlHandler("https", this, "externalLinkActivated"); QDesktopServices::setUrlHandler("https", this, "externalLinkActivated");
// Setting icons // Setting icons
if(hiddenmode) {
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/retroshare-logo-tor.png")));
}
else {
this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/logo_128.png"))); this->setWindowIcon(QIcon(QString::fromUtf8(":/icons/logo_128.png")));
}
/* Create all the dialogs of which we only want one instance */ /* Create all the dialogs of which we only want one instance */
_bandwidthGraph = NULL ; _bandwidthGraph = NULL ;
@ -669,6 +679,13 @@ void MainWindow::createTrayIcon()
trayIcon->setContextMenu(trayMenu); trayIcon->setContextMenu(trayMenu);
trayIcon->setIcon(QIcon(IMAGE_NOONLINE)); 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) #if defined(Q_OS_DARWIN)
// Note: On macOS, the Dock icon is used to provide the tray's functionality. // Note: On macOS, the Dock icon is used to provide the tray's functionality.
MacDockIconHandler* dockIconHandler = MacDockIconHandler::instance(); MacDockIconHandler* dockIconHandler = MacDockIconHandler::instance();
@ -907,6 +924,17 @@ void MainWindow::updateFriends()
QString trayIconResource; QString trayIconResource;
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 {
if (onlineCount == 0) { if (onlineCount == 0) {
trayIconResource = IMAGE_NOONLINE; trayIconResource = IMAGE_NOONLINE;
} else if (onlineCount < 2) { } else if (onlineCount < 2) {
@ -916,6 +944,7 @@ void MainWindow::updateFriends()
} else { } else {
trayIconResource = IMAGE_RETROSHARE; trayIconResource = IMAGE_RETROSHARE;
} }
}
QIcon icon; QIcon icon;
if (notifyMenu && notifyMenu->menuAction()->isVisible()) { if (notifyMenu && notifyMenu->menuAction()->isVisible()) {

View file

@ -383,5 +383,10 @@
<file>icons/filetype/dll.svg</file> <file>icons/filetype/dll.svg</file>
<file>icons/filetype/collection.svg</file> <file>icons/filetype/collection.svg</file>
<file>icons/filetype/patch.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> </qresource>
</RCC> </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