diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 6783cdbe3..e81f88dc9 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -446,7 +446,7 @@ void MainWindow::updateMessages() messageAction->setIcon(QIcon(QPixmap(":/images/evolution.png"))) ; } - if (newInboxCount) { + if (newInboxCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_MESSAGES)) { if (newInboxCount > 1) { trayIconMessages->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newInboxCount)); } else { @@ -470,7 +470,7 @@ void MainWindow::updateForums() forumAction->setIcon(QIcon(IMAGE_FORUMS)) ; } - if (newMessageCount) { + if (newMessageCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_FORUMS)) { if (newMessageCount > 1) { trayIconForums->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newMessageCount)); } else { @@ -494,7 +494,7 @@ void MainWindow::updateChannels(int type) channelAction->setIcon(QIcon(IMAGE_CHANNELS)) ; } - if (newMessageCount) { + if (newMessageCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_CHANNELS)) { if (newMessageCount > 1) { trayIconChannels->setToolTip(tr("RetroShare") + "\n" + tr("You have %1 new messages").arg(newMessageCount)); } else { @@ -552,7 +552,7 @@ void MainWindow::privateChatChanged(int list, int type) /* than count the chat messages */ int chatCount = rsMsgs->getPrivateChatQueueCount(true); - if (chatCount) { + if (chatCount && (Settings->getTrayNotifyFlags() & TRAYNOTIFY_PRIVATECHAT)) { trayIconChat->show(); } else { trayIconChat->hide(); diff --git a/retroshare-gui/src/gui/settings/NotifyPage.cpp b/retroshare-gui/src/gui/settings/NotifyPage.cpp index 07b31d470..eca10859b 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.cpp +++ b/retroshare-gui/src/gui/settings/NotifyPage.cpp @@ -42,9 +42,6 @@ NotifyPage::NotifyPage(QWidget * parent, Qt::WFlags flags) setAttribute(Qt::WA_QuitOnClose, false); setWindowTitle(windowTitle() + QLatin1String(" - Notify")); - - - /* Hide platform specific features */ #ifdef Q_WS_WIN @@ -68,6 +65,7 @@ NotifyPage::save(QString &errmsg) /* extract from rsNotify the flags */ uint notifyflags = 0; + uint traynotifyflags = 0; uint newsflags = 0; uint chatflags = 0; @@ -106,7 +104,17 @@ NotifyPage::save(QString &errmsg) if (ui.chat_Focus->isChecked()) chatflags |= RS_CHAT_FOCUS; + if (ui.trayNotify_PrivateChat->isChecked()) + traynotifyflags |= TRAYNOTIFY_PRIVATECHAT; + if (ui.trayNotify_Messages->isChecked()) + traynotifyflags |= TRAYNOTIFY_MESSAGES; + if (ui.trayNotify_Channels->isChecked()) + traynotifyflags |= TRAYNOTIFY_CHANNELS; + if (ui.trayNotify_Forums->isChecked()) + traynotifyflags |= TRAYNOTIFY_FORUMS; + Settings->setNotifyFlags(notifyflags); + Settings->setTrayNotifyFlags(traynotifyflags); Settings->setNewsFeedFlags(newsflags); Settings->setChatFlags(chatflags); @@ -125,6 +133,7 @@ void NotifyPage::load() { /* extract from rsNotify the flags */ uint notifyflags = Settings->getNotifyFlags(); + uint traynotifyflags = Settings->getTrayNotifyFlags(); uint newsflags = Settings->getNewsFeedFlags(); uint chatflags = Settings->getChatFlags(); @@ -147,6 +156,11 @@ void NotifyPage::load() ui.systray_GroupChat->setChecked(Settings->getDisplayTrayGroupChat()); + ui.trayNotify_PrivateChat->setChecked(traynotifyflags & TRAYNOTIFY_PRIVATECHAT); + ui.trayNotify_Messages->setChecked(traynotifyflags & TRAYNOTIFY_MESSAGES); + ui.trayNotify_Channels->setChecked(traynotifyflags & TRAYNOTIFY_CHANNELS); + ui.trayNotify_Forums->setChecked(traynotifyflags & TRAYNOTIFY_FORUMS); + ui.addFeedsAtEnd->setChecked(Settings->getAddFeedsAtEnd()); } diff --git a/retroshare-gui/src/gui/settings/NotifyPage.ui b/retroshare-gui/src/gui/settings/NotifyPage.ui index 54455c3a7..a69ba7d26 100755 --- a/retroshare-gui/src/gui/settings/NotifyPage.ui +++ b/retroshare-gui/src/gui/settings/NotifyPage.ui @@ -1,693 +1,728 @@ - - - NotifyPage - - - - 0 - 0 - 388 - 425 - - - - - 0 - 0 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 0 - 0 - 0 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 0 - - - - - - - 255 - 255 - 255 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 192 - 192 - 192 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - 104 - 104 - 104 - - - - - - - 208 - 208 - 208 - - - - - - - 255 - 255 - 255 - - - - - - - 247 - 247 - 247 - - - - - - - 104 - 104 - 104 - - - - - - - 139 - 139 - 139 - - - - - - - 104 - 104 - 104 - - - - - - - 255 - 255 - 255 - - - - - - - 104 - 104 - 104 - - - - - - - 240 - 240 - 240 - - - - - - - 240 - 240 - 240 - - - - - - - 0 - 0 - 0 - - - - - - - 0 - 0 - 128 - - - - - - - 255 - 255 - 255 - - - - - - - 0 - 0 - 255 - - - - - - - 255 - 0 - 255 - - - - - - - 231 - 231 - 231 - - - - - - - - - Arial - 10 - 50 - false - false - false - false - - - - Qt::NoContextMenu - - - - - - - - - - News Feed - - - - 0 - - - 6 - - - - - Peers - - - - - - - Channels - - - - - - - Forums - - - - - - - Blogs - - - - - - - Messages - - - - - - - Chat - - - - - - - Qt::Horizontal - - - - - - - Add feeds at end - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - - - Toasters - - - - 9 - - - 9 - - - - - Peer Connect - - - - - - - New Message - - - - - - - - - - Private Chat - - - - - - Open Window for new Peer Chat - - - - - - - Reopen if closed by user: - - - - - - - Grab Focus when chat arrives - - - - - - - - - - Group chat - - - - - - Display systray message - - - - - - - - - - - - - - Qt::Vertical - - - - 20 - 130 - - - - - - - - - - - + + + NotifyPage + + + + 0 + 0 + 396 + 425 + + + + + 0 + 0 + + + + + + + + + 0 + 0 + 0 + + + + + + + 208 + 208 + 208 + + + + + + + 255 + 255 + 255 + + + + + + + 247 + 247 + 247 + + + + + + + 104 + 104 + 104 + + + + + + + 139 + 139 + 139 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 240 + 240 + 240 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + + + + + + + 0 + 0 + 0 + + + + + + + 208 + 208 + 208 + + + + + + + 255 + 255 + 255 + + + + + + + 247 + 247 + 247 + + + + + + + 104 + 104 + 104 + + + + + + + 139 + 139 + 139 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 0 + + + + + + + 255 + 255 + 255 + + + + + + + 240 + 240 + 240 + + + + + + + 0 + 0 + 0 + + + + + + + 192 + 192 + 192 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + + + + + + + 104 + 104 + 104 + + + + + + + 208 + 208 + 208 + + + + + + + 255 + 255 + 255 + + + + + + + 247 + 247 + 247 + + + + + + + 104 + 104 + 104 + + + + + + + 139 + 139 + 139 + + + + + + + 104 + 104 + 104 + + + + + + + 255 + 255 + 255 + + + + + + + 104 + 104 + 104 + + + + + + + 240 + 240 + 240 + + + + + + + 240 + 240 + 240 + + + + + + + 0 + 0 + 0 + + + + + + + 0 + 0 + 128 + + + + + + + 255 + 255 + 255 + + + + + + + 0 + 0 + 255 + + + + + + + 255 + 0 + 255 + + + + + + + 231 + 231 + 231 + + + + + + + + + Arial + 10 + 50 + false + false + false + false + + + + Qt::NoContextMenu + + + + + + + + + + News Feed + + + + 0 + + + 6 + + + + + Peers + + + + + + + Channels + + + + + + + Forums + + + + + + + Blogs + + + + + + + Messages + + + + + + + Chat + + + + + + + Qt::Horizontal + + + + + + + Add feeds at end + + + + + + + + + + Systray Icon + + + + + + Private Message + + + + + + + Message + + + + + + + Channel Post + + + + + + + Forum Post + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + + + Toasters + + + + 9 + + + 9 + + + + + Peer Connect + + + + + + + New Message + + + + + + + + + + Private Chat + + + + + + Open Window for new Peer Chat + + + + + + + Reopen if closed by user: + + + + + + + Grab Focus when chat arrives + + + + + + + + + + Group chat + + + + + + Display systray message + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 130 + + + + + + + + + diff --git a/retroshare-gui/src/gui/settings/rsharesettings.cpp b/retroshare-gui/src/gui/settings/rsharesettings.cpp index c3257eea1..887929b8e 100644 --- a/retroshare-gui/src/gui/settings/rsharesettings.cpp +++ b/retroshare-gui/src/gui/settings/rsharesettings.cpp @@ -54,6 +54,7 @@ #define SETTING_NEWSFEED_FLAGS "NewsFeedFlags" #define SETTING_CHAT_FLAGS "ChatFlags" #define SETTING_NOTIFY_FLAGS "NotifyFlags" +#define SETTING_TRAYNOTIFY_FLAGS "TrayNotifyFlags" #define SETTING_CHAT_AVATAR "ChatAvatar" /* Default Retroshare Settings */ @@ -269,6 +270,16 @@ void RshareSettings::setNotifyFlags(uint flags) setValue(SETTING_NOTIFY_FLAGS, flags); } +uint RshareSettings::getTrayNotifyFlags() +{ + return value(SETTING_TRAYNOTIFY_FLAGS, TRAYNOTIFY_ALL).toUInt(); +} + +void RshareSettings::setTrayNotifyFlags(uint flags) +{ + setValue(SETTING_TRAYNOTIFY_FLAGS, flags); +} + bool RshareSettings::getDisplayTrayGroupChat() { return value("DisplayTrayGroupChat").toBool(); diff --git a/retroshare-gui/src/gui/settings/rsharesettings.h b/retroshare-gui/src/gui/settings/rsharesettings.h index b6183b233..ef728475a 100644 --- a/retroshare-gui/src/gui/settings/rsharesettings.h +++ b/retroshare-gui/src/gui/settings/rsharesettings.h @@ -31,6 +31,12 @@ #include #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_ALL 0x0F //Forward declaration. class QWidget; @@ -113,6 +119,9 @@ public: uint getNotifyFlags(); void setNotifyFlags(uint flags); + uint getTrayNotifyFlags(); + void setTrayNotifyFlags(uint flags); + bool getDisplayTrayGroupChat(); void setDisplayTrayGroupChat(bool bValue); diff --git a/retroshare-gui/src/lang/retroshare_de.qm b/retroshare-gui/src/lang/retroshare_de.qm index 38dd93e36..dd1e95302 100644 Binary files a/retroshare-gui/src/lang/retroshare_de.qm and b/retroshare-gui/src/lang/retroshare_de.qm differ diff --git a/retroshare-gui/src/lang/retroshare_de.ts b/retroshare-gui/src/lang/retroshare_de.ts index f4a13810d..b76bec24d 100644 --- a/retroshare-gui/src/lang/retroshare_de.ts +++ b/retroshare-gui/src/lang/retroshare_de.ts @@ -856,13 +856,13 @@ p, li { white-space: pre-wrap; } ChanMsgItem - + Remove Item Eintrag entfernen - + Expand Erweitern @@ -877,7 +877,12 @@ p, li { white-space: pre-wrap; } Abspielen - + + New + Neu + + + Unsubscribe From Channel Kanal abbestellen @@ -1000,12 +1005,17 @@ p, li { white-space: pre-wrap; } Hinzufügen - + + Set all to read + + + + Create Channel Kanal erstellen - + Unsubscribe Abbestellen @@ -1025,7 +1035,7 @@ p, li { white-space: pre-wrap; } Kanal abbestellen - + Name Name @@ -1035,12 +1045,7 @@ p, li { white-space: pre-wrap; } Beliebtheit - - ID - - - - + Own Channels Meine Kanäle @@ -1061,7 +1066,7 @@ p, li { white-space: pre-wrap; } - + Post to Channel Kanalbeitrag erstellen @@ -1086,10 +1091,7 @@ p, li { white-space: pre-wrap; } Verteile Kanal - - - - + Popularity: %1 Fetches: %2 Available: %3 @@ -1098,30 +1100,12 @@ Abgeholt: %2 Verfügbar: %3 - - - - - Unknown Channel - Unbekannter Kanal - - - - - - - Unknown Channel -No Description - Unbekannter Kanal -Keine Beschreibung - - - + No Channel Selected Keinen Kanal gewählt - + Restore Publish Rights for Channel Stelle Veröffentlichungsrechte für Kanal wieder her @@ -2230,7 +2214,7 @@ p, li { white-space: pre-wrap; } Drag'n'Drop Dateien aus den Suchergebnissen - + Add Extra File Zusätzlich eine Datei hinzufügen @@ -3550,7 +3534,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Forum:</p></body></html> - + Last Post Letzter Beitrag @@ -3566,24 +3550,24 @@ p, li { white-space: pre-wrap; } - + Date Datum - - + + Title Titel - - + + Author Autor - + Signed Unterzeichnet @@ -3601,7 +3585,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">Thema:</span></p></body></html> - + Previous Thread Vorheriger Beitrag @@ -4933,7 +4917,7 @@ p, li { white-space: pre-wrap; } MainWindow - + Network Netzwerk @@ -4963,7 +4947,7 @@ p, li { white-space: pre-wrap; } Blogs - + Internal Error Interener Fehler @@ -4984,10 +4968,12 @@ p, li { white-space: pre-wrap; } Zeigen - - + + - + + + RetroShare @@ -5019,7 +5005,7 @@ p, li { white-space: pre-wrap; } Schnellstart Assistent - + Search Suchen @@ -5034,7 +5020,7 @@ p, li { white-space: pre-wrap; } Messenger - + Show/Hide Anzeigen/Verbergen @@ -5044,19 +5030,21 @@ p, li { white-space: pre-wrap; } &Schliessen - - + + + You have %1 new messages Du hast %1 neue Beiträge - - + + + You have %1 new message Du hast %1 neuen Beitrag - + Bandwidth Graph Bandbreiten-Graph @@ -5071,7 +5059,7 @@ p, li { white-space: pre-wrap; } Schliessen - + Minimize Minimieren @@ -5081,7 +5069,7 @@ p, li { white-space: pre-wrap; } Maximieren - + Links Cloud Verknüpfungs-Wolke @@ -5096,7 +5084,7 @@ p, li { white-space: pre-wrap; } - + Help Hilfe @@ -5106,7 +5094,7 @@ p, li { white-space: pre-wrap; } Über - + Forums Foren @@ -5116,7 +5104,7 @@ p, li { white-space: pre-wrap; } RetroShare %1 eine sichere und dezentralisierte Kommunikationsplattform - + Open Messages Öffne Nachrichten @@ -5126,12 +5114,12 @@ p, li { white-space: pre-wrap; } Anwendungen - + Plugins - + Do you really want to exit RetroShare ? Wollen Sie RetroShare wirklich beenden? @@ -5141,7 +5129,7 @@ p, li { white-space: pre-wrap; } Wirklich beenden? - + Low disk space warning Wenig Festplatenspeicher @@ -6180,12 +6168,7 @@ p, li { white-space: pre-wrap; } Klick zum Ändern deines Avatars - - Change your Personal Status here... - Ändere deinen persönlichen Status... - - - + Add a Friend Einen Freund hinzufügen @@ -6247,7 +6230,7 @@ p, li { white-space: pre-wrap; } RetroShare Link einfügen - + RetroShare Messenger @@ -6842,7 +6825,32 @@ p, li { white-space: pre-wrap; } Nachrichten - + + Systray Icon + Systray Icon + + + + Private Message + Private Nachricht + + + + Message + Nachricht + + + + Channel Post + Kanalbeitrag + + + + Forum Post + Forumbeitrag + + + Toasters @@ -6887,7 +6895,7 @@ p, li { white-space: pre-wrap; } Zeige Systemabschnitts-Nachricht an - + Add feeds at end Feeds am Ende anfügen @@ -7063,8 +7071,8 @@ p, li { white-space: pre-wrap; } - <span style="color:#000000"><strong>Friends:</strong></span> - <span style="color:#000000"><strong>Freunde:</strong></span> + <strong>Friends:</strong> + @@ -10379,7 +10387,7 @@ p, li { white-space: pre-wrap; } - + Play File Datei abspielen @@ -10630,7 +10638,7 @@ p, li { white-space: pre-wrap; } Fertiggestellt - + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } @@ -10648,7 +10656,7 @@ p, li { white-space: pre-wrap; } Zeige Cache Übertragungen - + Uploads