mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-18 20:34:26 -05:00
added change trayicon when get a new message, added change trust icons when trust is changed
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1fd4bfd342
commit
508782f673
@ -213,12 +213,12 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
createPageAction(QIcon(IMAGE_NEWSFEED), tr("News Feed"), grp));
|
||||
#endif
|
||||
|
||||
#ifndef RS_RELEASE_VERSION
|
||||
#ifndef RS_RELEASE_VERSION
|
||||
#ifdef PLUGINMGR
|
||||
ui.stackPages->add(pluginsPage = new PluginsPage(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_PLUGINS), tr("Plugins"), grp));
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Create the toolbar */
|
||||
ui.toolBar->addActions(grp->actions());
|
||||
@ -343,8 +343,21 @@ void MainWindow::updateStatus()
|
||||
std::list<std::string> ids;
|
||||
rsPeers->getOnlineList(ids);
|
||||
int online = ids.size();
|
||||
|
||||
std::list<MsgInfoSummary> msgList;
|
||||
std::list<MsgInfoSummary>::const_iterator it;
|
||||
|
||||
if (online == 0)
|
||||
rsMsgs -> getMessageSummaries(msgList);
|
||||
|
||||
for(it = msgList.begin(); it != msgList.end(); it++)
|
||||
{
|
||||
|
||||
if (it -> msgflags & RS_MSG_NEW)
|
||||
{
|
||||
trayIcon->setIcon(QIcon(":/images/newmsg.png"));
|
||||
trayIcon->setToolTip(tr("RetroShare") + "\n" + tr("You has a new message"));
|
||||
}
|
||||
else if (online == 0)
|
||||
{
|
||||
trayIcon->setIcon(QIcon(IMAGE_NOONLINE));
|
||||
}
|
||||
@ -361,6 +374,12 @@ void MainWindow::updateStatus()
|
||||
trayIcon->setIcon(QIcon(IMAGE_RETROSHARE));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::updateHashingInfo(const QString& s)
|
||||
@ -658,9 +677,9 @@ void MainWindow::updateToolBaricons()
|
||||
for(it = msgList.begin(); it != msgList.end(); it++)
|
||||
{
|
||||
|
||||
if ((it -> msgflags & RS_MSG_NEW) == RS_MSG_NEW)
|
||||
if (it -> msgflags & RS_MSG_NEW)
|
||||
{
|
||||
MessageIcon.addPixmap(QPixmap(":/images/messages_new.png"), QIcon::Normal, QIcon::On );
|
||||
MessageIcon.addPixmap(QPixmap(":/images/messages_new.png"), QIcon::Normal, QIcon::On );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -239,12 +239,21 @@ void ConfCertDialog::loadDialog()
|
||||
if (detail.trustLvl == 4) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is full."));
|
||||
ui.radioButton_trust_fully->setChecked(true);
|
||||
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-48.png"));
|
||||
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-off-48.png"));
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-off-48.png"));
|
||||
} else if (detail.trustLvl == 3) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is marginal."));
|
||||
ui.radioButton_trust_marginnaly->setChecked(true);
|
||||
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-48.png"));
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-off-48.png"));
|
||||
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-off-48.png"));
|
||||
} else if (detail.trustLvl == 2) {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is none."));
|
||||
ui.radioButton_trust_never->setChecked(true);
|
||||
ui.radioButton_trust_never->setIcon(QIcon(":/images/security-low-48.png"));
|
||||
ui.radioButton_trust_fully->setIcon(QIcon(":/images/security-high-off-48.png"));
|
||||
ui.radioButton_trust_marginnaly->setIcon(QIcon(":/images/security-medium-off-48.png"));
|
||||
} else {
|
||||
ui.web_of_trust_label->setText(tr("Your trust in this peer is not set."));
|
||||
ui.radioButton_trust_fully->setChecked(false);
|
||||
|
@ -48,6 +48,7 @@
|
||||
<file>images/contacts24.png</file>
|
||||
<file>images/connection.png</file>
|
||||
<file>images/contact_new.png</file>
|
||||
<file>images/contact.png</file>
|
||||
<file>images/Client0.png</file>
|
||||
<file>images/Client1.png</file>
|
||||
<file>images/Client2.png</file>
|
||||
@ -267,6 +268,7 @@
|
||||
<file>images/network32.png</file>
|
||||
<file>images/new-mail-alert.png</file>
|
||||
<file>images/new_forum16.png</file>
|
||||
<file>images/newmsg.png</file>
|
||||
<file>images/no_avatar.png</file>
|
||||
<file>images/no_avatar_70.png</file>
|
||||
<file>images/pasterslink.png</file>
|
||||
@ -312,6 +314,9 @@
|
||||
<file>images/security-high-48.png</file>
|
||||
<file>images/security-low-48.png</file>
|
||||
<file>images/security-medium-48.png</file>
|
||||
<file>images/security-high-off-48.png</file>
|
||||
<file>images/security-low-off-48.png</file>
|
||||
<file>images/security-medium-off-48.png</file>
|
||||
<file>images/save24.png</file>
|
||||
<file>images/send24.png</file>
|
||||
<file>images/settings.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/inbox_22.png
Normal file
BIN
retroshare-gui/src/gui/images/inbox_22.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
BIN
retroshare-gui/src/gui/images/newmsg.png
Normal file
BIN
retroshare-gui/src/gui/images/newmsg.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
BIN
retroshare-gui/src/gui/images/security-high-off-48.png
Normal file
BIN
retroshare-gui/src/gui/images/security-high-off-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
retroshare-gui/src/gui/images/security-low-off-48.png
Normal file
BIN
retroshare-gui/src/gui/images/security-low-off-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
retroshare-gui/src/gui/images/security-medium-off-48.png
Normal file
BIN
retroshare-gui/src/gui/images/security-medium-off-48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.5 KiB |
Loading…
Reference in New Issue
Block a user