mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Added a combined notify icon in systray. You can enable/disable this in the NotifyPage.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3871 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
546fa15364
commit
162c54aae4
@ -158,6 +158,18 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
m_bStatusLoadDone = false;
|
||||
isIdle = false;
|
||||
|
||||
trayIconCombined = NULL;
|
||||
trayIconMessages = NULL;
|
||||
trayIconForums = NULL;
|
||||
trayIconChannels = NULL;
|
||||
trayIconChat = NULL;
|
||||
trayIconTransfers = NULL;
|
||||
trayActionMessages = NULL;
|
||||
trayActionForums = NULL;
|
||||
trayActionChannels = NULL;
|
||||
trayActionChat = NULL;
|
||||
trayActionTransfers = NULL;
|
||||
|
||||
setWindowTitle(tr("RetroShare %1 a secure decentralised communication platform").arg(retroshareVersion()));
|
||||
|
||||
/* add url handler for RetroShare links */
|
||||
@ -298,12 +310,6 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
/* Set focus to the current page */
|
||||
ui.stackPages->currentWidget()->setFocus();
|
||||
|
||||
/* call once */
|
||||
updateMessages();
|
||||
updateForums();
|
||||
updateChannels(NOTIFY_TYPE_ADD);
|
||||
privateChatChanged(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
|
||||
|
||||
idle = new Idle();
|
||||
idle->start();
|
||||
connect(idle, SIGNAL(secondsIdle(int)), this, SLOT(checkAndSetIdle(int)));
|
||||
@ -357,7 +363,7 @@ void MainWindow::displayDiskSpaceWarning(int loc,int size_limit_mb)
|
||||
void MainWindow::createTrayIcon()
|
||||
{
|
||||
/** Tray icon Menu **/
|
||||
trayMenu = new QMenu(this);
|
||||
QMenu *trayMenu = new QMenu(this);
|
||||
QObject::connect(trayMenu, SIGNAL(aboutToShow()), this, SLOT(updateMenu()));
|
||||
toggleVisibilityAction = trayMenu->addAction(QIcon(IMAGE_RETROSHARE), tr("Show/Hide"), this, SLOT(toggleVisibilitycontextmenu()));
|
||||
|
||||
@ -390,30 +396,135 @@ void MainWindow::createTrayIcon()
|
||||
connect(trayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(toggleVisibility(QSystemTrayIcon::ActivationReason)));
|
||||
trayIcon->show();
|
||||
|
||||
createNotifyIcons();
|
||||
}
|
||||
|
||||
void MainWindow::createNotifyIcons()
|
||||
{
|
||||
#define DELETE_ICON(x) if (x) { delete(x); x = NULL; }
|
||||
|
||||
int notifyFlag = Settings->getTrayNotifyFlags();
|
||||
|
||||
QMenu *trayMenu = NULL;
|
||||
|
||||
/* Delete combined systray icon and rebuild it */
|
||||
trayActionMessages = NULL;
|
||||
trayActionForums = NULL;
|
||||
trayActionChannels = NULL;
|
||||
trayActionChat = NULL;
|
||||
trayActionTransfers = NULL;
|
||||
DELETE_ICON(trayIconCombined);
|
||||
|
||||
if (notifyFlag & TRAYNOTIFY_COMBINEDICON) {
|
||||
/* Delete single systray icons */
|
||||
DELETE_ICON(trayIconMessages);
|
||||
DELETE_ICON(trayIconForums);
|
||||
DELETE_ICON(trayIconChannels);
|
||||
DELETE_ICON(trayIconChat);
|
||||
DELETE_ICON(trayIconTransfers);
|
||||
|
||||
/* Create combined systray icon */
|
||||
trayIconCombined = new QSystemTrayIcon(this);
|
||||
trayIconCombined->setIcon(QIcon(":/images/rstray_new.png"));
|
||||
|
||||
trayMenu = new QMenu(this);
|
||||
trayIconCombined->setContextMenu(trayMenu);
|
||||
}
|
||||
|
||||
/* Create systray icons or actions */
|
||||
if (notifyFlag & TRAYNOTIFY_MESSAGES) {
|
||||
if (trayMenu) {
|
||||
DELETE_ICON(trayIconMessages);
|
||||
|
||||
trayActionMessages = trayMenu->addAction(QIcon(":/images/newmsg.png"), "", this, SLOT(trayIconMessagesClicked()));
|
||||
trayActionMessages->setVisible(false);
|
||||
trayActionMessages->setData(tr("Messages"));
|
||||
} else if (trayIconMessages == NULL) {
|
||||
// Create the tray icon for messages
|
||||
trayIconMessages = new QSystemTrayIcon(this);
|
||||
trayIconMessages->setIcon(QIcon(":/images/newmsg.png"));
|
||||
connect(trayIconMessages, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconMessagesClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
} else {
|
||||
DELETE_ICON(trayIconMessages);
|
||||
}
|
||||
|
||||
if (notifyFlag & TRAYNOTIFY_FORUMS) {
|
||||
if (trayMenu) {
|
||||
DELETE_ICON(trayIconForums);
|
||||
|
||||
trayActionForums = trayMenu->addAction(QIcon(":/images/konversation16.png"), "", this, SLOT(trayIconForumsClicked()));
|
||||
trayActionForums->setVisible(false);
|
||||
trayActionForums->setData(tr("Forums"));
|
||||
} else if (trayIconForums == NULL) {
|
||||
// Create the tray icon for forums
|
||||
trayIconForums = new QSystemTrayIcon(this);
|
||||
trayIconForums->setIcon(QIcon(":/images/konversation16.png"));
|
||||
connect(trayIconForums, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconForumsClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
} else {
|
||||
DELETE_ICON(trayIconForums);
|
||||
}
|
||||
|
||||
if (notifyFlag & TRAYNOTIFY_CHANNELS) {
|
||||
if (trayMenu) {
|
||||
DELETE_ICON(trayIconChannels);
|
||||
|
||||
trayActionChannels = trayMenu->addAction(QIcon(":/images/channels16.png"), "", this, SLOT(trayIconChannelsClicked()));
|
||||
trayActionChannels->setVisible(false);
|
||||
trayActionChannels->setData(tr("Channels"));
|
||||
} else if (trayIconChannels == NULL) {
|
||||
// Create the tray icon for channels
|
||||
trayIconChannels = new QSystemTrayIcon(this);
|
||||
trayIconChannels->setIcon(QIcon(":/images/channels16.png"));
|
||||
connect(trayIconChannels, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconChannelsClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
} else {
|
||||
DELETE_ICON(trayIconChannels);
|
||||
}
|
||||
|
||||
if (notifyFlag & TRAYNOTIFY_PRIVATECHAT) {
|
||||
if (trayMenu) {
|
||||
DELETE_ICON(trayIconChat);
|
||||
|
||||
trayActionChat = trayMenu->addAction(QIcon(":/images/chat.png"), "", this, SLOT(trayIconChatClicked()));
|
||||
trayActionChat->setVisible(false);
|
||||
trayActionChat->setData(tr("Chat"));
|
||||
} else if (trayIconChat == NULL) {
|
||||
// Create the tray icon for chat
|
||||
trayIconChat = new QSystemTrayIcon(this);
|
||||
trayIconChat->setIcon(QIcon(":/images/chat.png"));
|
||||
connect(trayIconChat, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconChatClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
} else {
|
||||
DELETE_ICON(trayIconChat);
|
||||
}
|
||||
|
||||
if (notifyFlag & TRAYNOTIFY_TRANSFERS) {
|
||||
if (trayMenu) {
|
||||
DELETE_ICON(trayIconTransfers);
|
||||
|
||||
trayActionTransfers = trayMenu->addAction(QIcon(":/images/ktorrent32.png"), "", this, SLOT(trayIconTransfersClicked()));
|
||||
trayActionTransfers->setVisible(false);
|
||||
trayActionTransfers->setData(tr("Transfers"));
|
||||
} else if (trayIconTransfers == NULL) {
|
||||
// Create the tray icon for transfers
|
||||
trayIconTransfers = new QSystemTrayIcon(this);
|
||||
trayIconTransfers->setIcon(QIcon(":/images/ktorrent32.png"));
|
||||
connect(trayIconTransfers, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(trayIconTransfersClicked(QSystemTrayIcon::ActivationReason)));
|
||||
}
|
||||
} else {
|
||||
DELETE_ICON(trayIconTransfers);
|
||||
}
|
||||
|
||||
/* call once */
|
||||
updateMessages();
|
||||
updateForums();
|
||||
updateChannels(NOTIFY_TYPE_ADD);
|
||||
privateChatChanged(NOTIFY_LIST_PRIVATE_INCOMING_CHAT, NOTIFY_TYPE_ADD);
|
||||
// transfer
|
||||
|
||||
#undef DELETE_ICON
|
||||
}
|
||||
|
||||
/*static*/ void MainWindow::installGroupChatNotifier()
|
||||
@ -430,6 +541,16 @@ void MainWindow::createTrayIcon()
|
||||
}
|
||||
}
|
||||
|
||||
/*static*/ void MainWindow::installNotifyIcons()
|
||||
{
|
||||
if (_instance == NULL) {
|
||||
// nothing to do
|
||||
return;
|
||||
}
|
||||
|
||||
_instance->createNotifyIcons();
|
||||
}
|
||||
|
||||
void MainWindow::displaySystrayMsg(const QString& title,const QString& msg)
|
||||
{
|
||||
trayIcon->showMessage(title, msg, QSystemTrayIcon::Information, 3000);
|
||||
@ -446,16 +567,33 @@ void MainWindow::updateMessages()
|
||||
messageAction->setIcon(QIcon(QPixmap(":/images/evolution.png"))) ;
|
||||
}
|
||||
|
||||
if (newInboxCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_MESSAGES)) {
|
||||
if (trayIconMessages) {
|
||||
if (newInboxCount) {
|
||||
if (newInboxCount > 1) {
|
||||
trayIconMessages->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newInboxCount));
|
||||
trayIconMessages->setToolTip("RetroShare\n" + tr("You have %1 new messages").arg(newInboxCount));
|
||||
} else {
|
||||
trayIconMessages->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new message").arg(newInboxCount));
|
||||
trayIconMessages->setToolTip("RetroShare\n" + tr("You have %1 new message").arg(newInboxCount));
|
||||
}
|
||||
trayIconMessages->show();
|
||||
} else {
|
||||
trayIconMessages->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (trayActionMessages) {
|
||||
if (newInboxCount) {
|
||||
if (newInboxCount > 1) {
|
||||
trayActionMessages->setText(tr("%1 new messages").arg(newInboxCount));
|
||||
} else {
|
||||
trayActionMessages->setText(tr("%1 new message").arg(newInboxCount));
|
||||
}
|
||||
trayActionMessages->setVisible(true);
|
||||
} else {
|
||||
trayActionMessages->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
updateTrayCombine();
|
||||
}
|
||||
|
||||
void MainWindow::updateForums()
|
||||
@ -470,16 +608,33 @@ void MainWindow::updateForums()
|
||||
forumAction->setIcon(QIcon(IMAGE_FORUMS)) ;
|
||||
}
|
||||
|
||||
if (newMessageCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_FORUMS)) {
|
||||
if (trayIconForums) {
|
||||
if (newMessageCount) {
|
||||
if (newMessageCount > 1) {
|
||||
trayIconForums->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newMessageCount));
|
||||
trayIconForums->setToolTip("RetroShare\n" + tr("You have %1 new messages").arg(newMessageCount));
|
||||
} else {
|
||||
trayIconForums->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new message").arg(newMessageCount));
|
||||
trayIconForums->setToolTip("RetroShare\n" + tr("You have %1 new message").arg(newMessageCount));
|
||||
}
|
||||
trayIconForums->show();
|
||||
} else {
|
||||
trayIconForums->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (trayActionForums) {
|
||||
if (newMessageCount) {
|
||||
if (newMessageCount > 1) {
|
||||
trayActionForums->setText(tr("%1 new messages").arg(newMessageCount));
|
||||
} else {
|
||||
trayActionForums->setText(tr("%1 new message").arg(newMessageCount));
|
||||
}
|
||||
trayActionForums->setVisible(true);
|
||||
} else {
|
||||
trayActionForums->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
updateTrayCombine();
|
||||
}
|
||||
|
||||
void MainWindow::updateChannels(int type)
|
||||
@ -494,16 +649,33 @@ void MainWindow::updateChannels(int type)
|
||||
channelAction->setIcon(QIcon(IMAGE_CHANNELS)) ;
|
||||
}
|
||||
|
||||
if (newMessageCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_CHANNELS)) {
|
||||
if (trayIconChannels) {
|
||||
if (newMessageCount) {
|
||||
if (newMessageCount > 1) {
|
||||
trayIconChannels->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newMessageCount));
|
||||
trayIconChannels->setToolTip("RetroShare\n" + tr("You have %1 new messages").arg(newMessageCount));
|
||||
} else {
|
||||
trayIconChannels->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new message").arg(newMessageCount));
|
||||
trayIconChannels->setToolTip("RetroShare\n" + tr("You have %1 new message").arg(newMessageCount));
|
||||
}
|
||||
trayIconChannels->show();
|
||||
} else {
|
||||
trayIconChannels->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (trayActionChannels) {
|
||||
if (newMessageCount) {
|
||||
if (newMessageCount > 1) {
|
||||
trayActionChannels->setText(tr("%1 new messages").arg(newMessageCount));
|
||||
} else {
|
||||
trayActionChannels->setText(tr("%1 new message").arg(newMessageCount));
|
||||
}
|
||||
trayActionChannels->setVisible(true);
|
||||
} else {
|
||||
trayActionChannels->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
updateTrayCombine();
|
||||
}
|
||||
|
||||
void MainWindow::updateTransfers(int count)
|
||||
@ -514,16 +686,58 @@ void MainWindow::updateTransfers(int count)
|
||||
transferAction->setIcon(QIcon(IMAGE_TRANSFERS)) ;
|
||||
}
|
||||
|
||||
if (count && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_TRANSFERS)) {
|
||||
if (trayIconTransfers) {
|
||||
if (count) {
|
||||
if (count > 1) {
|
||||
trayIconTransfers->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 completed downloads").arg(count));
|
||||
trayIconTransfers->setToolTip("RetroShare\n" + tr("You have %1 completed downloads").arg(count));
|
||||
} else {
|
||||
trayIconTransfers->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 completed download").arg(count));
|
||||
trayIconTransfers->setToolTip("RetroShare\n" + tr("You have %1 completed download").arg(count));
|
||||
}
|
||||
trayIconTransfers->show();
|
||||
} else {
|
||||
trayIconTransfers->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (trayActionTransfers) {
|
||||
if (count) {
|
||||
if (count > 1) {
|
||||
trayActionTransfers->setText(tr("%1 completed downloads").arg(count));
|
||||
} else {
|
||||
trayActionTransfers->setText(tr("%1 completed download").arg(count));
|
||||
}
|
||||
trayActionTransfers->setVisible(true);
|
||||
} else {
|
||||
trayActionTransfers->setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
updateTrayCombine();
|
||||
}
|
||||
|
||||
void MainWindow::updateTrayCombine()
|
||||
{
|
||||
if (trayIconCombined) {
|
||||
QMenu *trayMenu = trayIconCombined->contextMenu();
|
||||
QList<QAction*> actions = trayMenu->actions();
|
||||
|
||||
bool visible = false;
|
||||
QString toolTip;
|
||||
|
||||
QList<QAction*>::iterator actionIt;
|
||||
for (actionIt = actions.begin(); actionIt != actions.end(); actionIt++) {
|
||||
if ((*actionIt)->isVisible()) {
|
||||
visible = true;
|
||||
if (toolTip.isEmpty() == false) {
|
||||
toolTip += "\r";
|
||||
}
|
||||
toolTip += (*actionIt)->data().toString() + ":" + (*actionIt)->text();
|
||||
}
|
||||
}
|
||||
|
||||
trayIconCombined->setToolTip(toolTip);
|
||||
trayIconCombined->setVisible(visible);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::updateStatus()
|
||||
@ -569,7 +783,7 @@ void MainWindow::updateStatus()
|
||||
trayIcon->setIcon(QIcon(IMAGE_RETROSHARE));
|
||||
}
|
||||
|
||||
QString tray = tr("RetroShare") + "\n" + tr("Down: %1 (kB/s)").arg(downKb, 0, 'f', 2) + " | " + tr("Up: %1 (kB/s)").arg(upKb, 0, 'f', 2) + "\n";
|
||||
QString tray = "RetroShare\n" + tr("Down: %1 (kB/s)").arg(downKb, 0, 'f', 2) + " | " + tr("Up: %1 (kB/s)").arg(upKb, 0, 'f', 2) + "\n";
|
||||
|
||||
if (nOnlineCount == 1) {
|
||||
tray += tr("%1 friend connected").arg(nOnlineCount);
|
||||
@ -589,12 +803,34 @@ void MainWindow::privateChatChanged(int list, int type)
|
||||
/* than count the chat messages */
|
||||
int chatCount = rsMsgs->getPrivateChatQueueCount(true);
|
||||
|
||||
if (chatCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_PRIVATECHAT)) {
|
||||
if (trayIconChat) {
|
||||
if (chatCount) {
|
||||
if (chatCount > 1) {
|
||||
trayIconChat->setToolTip("RetroShare\n" + tr("You have %1 new messages").arg(chatCount));
|
||||
} else {
|
||||
trayIconChat->setToolTip("RetroShare\n" + tr("You have %1 new message").arg(chatCount));
|
||||
}
|
||||
trayIconChat->show();
|
||||
} else {
|
||||
trayIconChat->hide();
|
||||
}
|
||||
}
|
||||
|
||||
if (trayActionChat) {
|
||||
if (chatCount) {
|
||||
if (chatCount > 1) {
|
||||
trayActionChat->setText(tr("%1 new messages").arg(chatCount));
|
||||
} else {
|
||||
trayActionChat->setText(tr("%1 new message").arg(chatCount));
|
||||
}
|
||||
trayActionChat->setVisible(true);
|
||||
} else {
|
||||
trayActionChat->setVisible(false);;
|
||||
}
|
||||
}
|
||||
|
||||
updateTrayCombine();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::postModDirectories(bool update_local)
|
||||
|
@ -131,6 +131,7 @@ public:
|
||||
PluginsPage* pluginsPage ;
|
||||
|
||||
static void installGroupChatNotifier();
|
||||
static void installNotifyIcons();
|
||||
|
||||
/* initialize widget with status informations, status constant stored in data or in Qt::UserRole */
|
||||
void initializeStatusObject(QObject *pObject, bool bConnect);
|
||||
@ -164,11 +165,13 @@ private slots:
|
||||
|
||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||
void toggleVisibilitycontextmenu();
|
||||
void trayIconMessagesClicked(QSystemTrayIcon::ActivationReason e);
|
||||
void trayIconForumsClicked(QSystemTrayIcon::ActivationReason e);
|
||||
void trayIconChannelsClicked(QSystemTrayIcon::ActivationReason e);
|
||||
void trayIconChatClicked(QSystemTrayIcon::ActivationReason e);
|
||||
void trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e);
|
||||
|
||||
/* default parameter for connect with the actions of the combined systray icon */
|
||||
void trayIconMessagesClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
void trayIconForumsClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
void trayIconChannelsClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
void trayIconChatClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
void trayIconTransfersClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
|
||||
/** Toolbar fns. */
|
||||
void addFriend();
|
||||
@ -206,6 +209,8 @@ private:
|
||||
void createActions();
|
||||
|
||||
void createTrayIcon();
|
||||
void createNotifyIcons();
|
||||
void updateTrayCombine();
|
||||
|
||||
static MainWindow *_instance;
|
||||
|
||||
@ -231,13 +236,18 @@ private:
|
||||
void loadStyleSheet(const QString &sheetName);
|
||||
|
||||
QSystemTrayIcon *trayIcon;
|
||||
QSystemTrayIcon *trayIconCombined;
|
||||
QSystemTrayIcon *trayIconMessages;
|
||||
QSystemTrayIcon *trayIconForums;
|
||||
QSystemTrayIcon *trayIconChannels;
|
||||
QSystemTrayIcon *trayIconChat;
|
||||
QSystemTrayIcon *trayIconTransfers;
|
||||
QAction *trayActionMessages;
|
||||
QAction *trayActionForums;
|
||||
QAction *trayActionChannels;
|
||||
QAction *trayActionChat;
|
||||
QAction *trayActionTransfers;
|
||||
QAction *toggleVisibilityAction, *toolAct;
|
||||
QMenu *trayMenu;
|
||||
|
||||
PeerStatus *peerstatus;
|
||||
NATStatus *natstatus;
|
||||
|
@ -354,6 +354,7 @@
|
||||
<file>images/rstray0.png</file>
|
||||
<file>images/rstray1.png</file>
|
||||
<file>images/rstray2.png</file>
|
||||
<file>images/rstray_new.png</file>
|
||||
<file>images/security-high-16.png</file>
|
||||
<file>images/security-high-48.png</file>
|
||||
<file>images/security-low-48.png</file>
|
||||
|
BIN
retroshare-gui/src/gui/images/rstray_new.png
Normal file
BIN
retroshare-gui/src/gui/images/rstray_new.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
@ -114,6 +114,8 @@ NotifyPage::save(QString &errmsg)
|
||||
traynotifyflags |= TRAYNOTIFY_FORUMS;
|
||||
if (ui.trayNotify_Transfer->isChecked())
|
||||
traynotifyflags |= TRAYNOTIFY_TRANSFERS;
|
||||
if (ui.trayNotify_CombinedIcon->isChecked())
|
||||
traynotifyflags |= TRAYNOTIFY_COMBINEDICON;
|
||||
|
||||
Settings->setNotifyFlags(notifyflags);
|
||||
Settings->setTrayNotifyFlags(traynotifyflags);
|
||||
@ -122,6 +124,7 @@ NotifyPage::save(QString &errmsg)
|
||||
|
||||
Settings->setDisplayTrayGroupChat(ui.systray_GroupChat->isChecked());
|
||||
MainWindow::installGroupChatNotifier();
|
||||
MainWindow::installNotifyIcons();
|
||||
|
||||
Settings->setAddFeedsAtEnd(ui.addFeedsAtEnd->isChecked());
|
||||
|
||||
@ -164,6 +167,7 @@ void NotifyPage::load()
|
||||
ui.trayNotify_Channels->setChecked(traynotifyflags & TRAYNOTIFY_CHANNELS);
|
||||
ui.trayNotify_Forums->setChecked(traynotifyflags & TRAYNOTIFY_FORUMS);
|
||||
ui.trayNotify_Transfer->setChecked(traynotifyflags & TRAYNOTIFY_TRANSFERS);
|
||||
ui.trayNotify_CombinedIcon->setChecked(traynotifyflags & TRAYNOTIFY_COMBINEDICON);
|
||||
|
||||
ui.addFeedsAtEnd->setChecked(Settings->getAddFeedsAtEnd());
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>396</width>
|
||||
<width>408</width>
|
||||
<height>425</height>
|
||||
</rect>
|
||||
</property>
|
||||
@ -616,6 +616,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="trayNotify_CombinedIcon">
|
||||
<property name="text">
|
||||
<string>Combined icon</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
@ -32,12 +32,14 @@
|
||||
#include "rsettings.h"
|
||||
|
||||
/* Defines for get/setTrayNotifyFlags */
|
||||
#define TRAYNOTIFY_PRIVATECHAT 0x01
|
||||
#define TRAYNOTIFY_MESSAGES 0x02
|
||||
#define TRAYNOTIFY_CHANNELS 0x04
|
||||
#define TRAYNOTIFY_FORUMS 0x08
|
||||
#define TRAYNOTIFY_TRANSFERS 0x10
|
||||
#define TRAYNOTIFY_ALL 0x1F
|
||||
#define TRAYNOTIFY_PRIVATECHAT 0x00000001
|
||||
#define TRAYNOTIFY_MESSAGES 0x00000002
|
||||
#define TRAYNOTIFY_CHANNELS 0x00000004
|
||||
#define TRAYNOTIFY_FORUMS 0x00000008
|
||||
#define TRAYNOTIFY_TRANSFERS 0x00000010
|
||||
#define TRAYNOTIFY_ALL 0x0000001F
|
||||
|
||||
#define TRAYNOTIFY_COMBINEDICON 0x80000000
|
||||
|
||||
//Forward declaration.
|
||||
class QWidget;
|
||||
|
Binary file not shown.
@ -5100,7 +5100,7 @@ p, li { white-space: pre-wrap; }
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="+202"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="+214"/>
|
||||
<source>Network</source>
|
||||
<translation>Netzwerk</translation>
|
||||
</message>
|
||||
@ -5111,26 +5111,50 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<location line="+283"/>
|
||||
<source>Transfers</source>
|
||||
<translation>Übertragungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+8"/>
|
||||
<location line="-275"/>
|
||||
<location line="+207"/>
|
||||
<source>Messages</source>
|
||||
<translation>Nachrichten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+3"/>
|
||||
<location line="-204"/>
|
||||
<location line="+238"/>
|
||||
<source>Channels</source>
|
||||
<translation>Kanäle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+4"/>
|
||||
<location line="-234"/>
|
||||
<source>Blogs</source>
|
||||
<translation type="unfinished">Blogs</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+290"/>
|
||||
<location line="+251"/>
|
||||
<source>Chat</source>
|
||||
<translation>Chat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+94"/>
|
||||
<location line="+41"/>
|
||||
<location line="+41"/>
|
||||
<location line="+154"/>
|
||||
<source>%1 new messages</source>
|
||||
<translation>%1 neue Nachrichten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-234"/>
|
||||
<location line="+41"/>
|
||||
<location line="+41"/>
|
||||
<location line="+154"/>
|
||||
<source>%1 new message</source>
|
||||
<translation>%1 neue Nachricht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-132"/>
|
||||
<source>You have %1 completed downloads</source>
|
||||
<translation>Du hast %1 fertige Downloads</translation>
|
||||
</message>
|
||||
@ -5140,7 +5164,17 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Du hast %1 fertigen Download</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+51"/>
|
||||
<location line="+11"/>
|
||||
<source>%1 completed downloads</source>
|
||||
<translation>%1 fertige Downloads</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+2"/>
|
||||
<source>%1 completed download</source>
|
||||
<translation>%1 fertigen Download</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+79"/>
|
||||
<source>Down: %1 (kB/s)</source>
|
||||
<translation>Runter: %1 (kB/s)</translation>
|
||||
</message>
|
||||
@ -5155,7 +5189,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>%1 Freunde verbunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+655"/>
|
||||
<location line="+677"/>
|
||||
<source>It seems to be an old RetroShare link. Please use copy instead.</source>
|
||||
<translation>Es scheint ein alter RetroShare Link zu sein. Bitte kopiere den Link stattdessen.</translation>
|
||||
</message>
|
||||
@ -5165,12 +5199,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Link ist fehlerhaft.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-663"/>
|
||||
<location line="-685"/>
|
||||
<source>%1 friend connected</source>
|
||||
<translation>%1 Freund verbunden</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+296"/>
|
||||
<location line="+318"/>
|
||||
<source>Internal Error</source>
|
||||
<translation>Interener Fehler</translation>
|
||||
</message>
|
||||
@ -5191,16 +5225,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Zeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-518"/>
|
||||
<location line="+65"/>
|
||||
<location line="+2"/>
|
||||
<location line="+22"/>
|
||||
<location line="+2"/>
|
||||
<location line="+22"/>
|
||||
<location line="+2"/>
|
||||
<location line="+18"/>
|
||||
<location line="+2"/>
|
||||
<location line="+51"/>
|
||||
<location line="-748"/>
|
||||
<source>RetroShare</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -5231,7 +5256,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Schnellstart Assistent</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="-362"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="-170"/>
|
||||
<source>Search</source>
|
||||
<translation>Suchen</translation>
|
||||
</message>
|
||||
@ -5246,7 +5271,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Messenger</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="+144"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="+138"/>
|
||||
<source>Show/Hide</source>
|
||||
<translation>Anzeigen/Verbergen</translation>
|
||||
</message>
|
||||
@ -5256,21 +5281,23 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>&Schliessen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+70"/>
|
||||
<location line="+24"/>
|
||||
<location line="+24"/>
|
||||
<location line="+186"/>
|
||||
<location line="+41"/>
|
||||
<location line="+41"/>
|
||||
<location line="+154"/>
|
||||
<source>You have %1 new messages</source>
|
||||
<translation>Du hast %1 neue Nachrichten</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-46"/>
|
||||
<location line="+24"/>
|
||||
<location line="+24"/>
|
||||
<location line="-234"/>
|
||||
<location line="+41"/>
|
||||
<location line="+41"/>
|
||||
<location line="+154"/>
|
||||
<source>You have %1 new message</source>
|
||||
<translation>Du hast %1 neue Nachricht</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+330"/>
|
||||
<location line="+256"/>
|
||||
<source>Bandwidth Graph</source>
|
||||
<translation>Bandbreiten-Graph</translation>
|
||||
</message>
|
||||
@ -5285,7 +5312,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Schliessen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="-456"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="-686"/>
|
||||
<source>Minimize</source>
|
||||
<translation>Minimieren</translation>
|
||||
</message>
|
||||
@ -5295,7 +5322,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Maximieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-142"/>
|
||||
<location line="-136"/>
|
||||
<source>Links Cloud</source>
|
||||
<translation>Verknüpfungs-Wolke</translation>
|
||||
</message>
|
||||
@ -5310,7 +5337,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="+589"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="+813"/>
|
||||
<source>Help</source>
|
||||
<translation>Hilfe</translation>
|
||||
</message>
|
||||
@ -5320,17 +5347,18 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Über</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../gui/MainWindow.cpp" line="-610"/>
|
||||
<location filename="../gui/MainWindow.cpp" line="-834"/>
|
||||
<location line="+213"/>
|
||||
<source>Forums</source>
|
||||
<translation>Foren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-72"/>
|
||||
<location line="-285"/>
|
||||
<source>RetroShare %1 a secure decentralised communication platform</source>
|
||||
<translation>RetroShare %1 eine sichere und dezentralisierte Kommunikationsplattform</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+676"/>
|
||||
<location line="+900"/>
|
||||
<source>Open Messages</source>
|
||||
<translation>Öffne Nachrichten</translation>
|
||||
</message>
|
||||
@ -5340,12 +5368,12 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Anwendungen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-597"/>
|
||||
<location line="-821"/>
|
||||
<source>Plugins</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+613"/>
|
||||
<location line="+837"/>
|
||||
<source>Do you really want to exit RetroShare ?</source>
|
||||
<translation>Willst Du RetroShare wirklich beenden?</translation>
|
||||
</message>
|
||||
@ -5355,7 +5383,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Wirklich beenden?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-507"/>
|
||||
<location line="-737"/>
|
||||
<source>Low disk space warning</source>
|
||||
<translation>Wenig Festplatenspeicher</translation>
|
||||
</message>
|
||||
@ -7017,12 +7045,17 @@ p, li { white-space: pre-wrap; }
|
||||
</message>
|
||||
<message>
|
||||
<location line="+7"/>
|
||||
<location line="+53"/>
|
||||
<location line="+67"/>
|
||||
<source>Download completed</source>
|
||||
<translation>Download fertig</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-26"/>
|
||||
<location line="-53"/>
|
||||
<source>Combined icon</source>
|
||||
<translation>Kombiniertes Icon</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="+27"/>
|
||||
<source>Toasters</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
@ -7067,7 +7100,7 @@ p, li { white-space: pre-wrap; }
|
||||
<translation>Zeige Systemabschnitts-Nachricht an</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location line="-143"/>
|
||||
<location line="-157"/>
|
||||
<source>Add feeds at end</source>
|
||||
<translation>Feeds am Ende anfügen</translation>
|
||||
</message>
|
||||
|
Loading…
Reference in New Issue
Block a user