mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-06 08:05:18 -04:00
new notify capability of chat lobbies: message counting, nickname occurrence counting and specific text counting. Also sorts out notify tab in Settings (Patch from Phenom, slightly modified: gui layout/text + added a flag to enable/disable user defined text grep)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8082 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9d2b6faf9c
commit
e40460bdcc
18 changed files with 1045 additions and 392 deletions
|
@ -116,6 +116,7 @@ void UserNotify::createIcons(QMenu *notifyMenu)
|
|||
if (mNotifyIcon == NULL) {
|
||||
mNotifyIcon = notifyMenu->addAction(getIcon(), "", this, SLOT(trayIconClicked()));
|
||||
mNotifyIcon->setVisible(false);
|
||||
connect(mNotifyIcon, SIGNAL(hovered()), this, SLOT(trayIconHovered()));
|
||||
}
|
||||
} else {
|
||||
DELETE_OBJECT(mNotifyIcon);
|
||||
|
@ -212,11 +213,16 @@ QString UserNotify::getNotifyMessage(bool plural)
|
|||
|
||||
void UserNotify::trayIconClicked(QSystemTrayIcon::ActivationReason e)
|
||||
{
|
||||
if (e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick) {
|
||||
if (e == QSystemTrayIcon::Trigger || e == QSystemTrayIcon::DoubleClick || e == QSystemTrayIcon::Context) {
|
||||
iconClicked();
|
||||
}
|
||||
}
|
||||
|
||||
void UserNotify::trayIconHovered()
|
||||
{
|
||||
iconHovered();
|
||||
}
|
||||
|
||||
void UserNotify::blink(bool on)
|
||||
{
|
||||
if (mTrayIcon) {
|
||||
|
|
|
@ -40,6 +40,8 @@ public:
|
|||
|
||||
void initialize(QToolBar *mainToolBar, QAction *mainAction, QListWidgetItem *listItem);
|
||||
void createIcons(QMenu *notifyMenu);
|
||||
QSystemTrayIcon* getTrayIcon(){ return mTrayIcon;}
|
||||
QAction* getNotifyIcon(){ return mNotifyIcon;}
|
||||
|
||||
virtual bool hasSetting(QString */*name*/, QString */*group*/) { return false; }
|
||||
bool notifyEnabled();
|
||||
|
@ -55,6 +57,7 @@ public slots:
|
|||
|
||||
private slots:
|
||||
void trayIconClicked(QSystemTrayIcon::ActivationReason e = QSystemTrayIcon::Trigger);
|
||||
void trayIconHovered();
|
||||
void blink(bool on);
|
||||
|
||||
protected:
|
||||
|
@ -70,6 +73,7 @@ private:
|
|||
virtual QString getNotifyMessage(bool plural);
|
||||
|
||||
virtual void iconClicked() {}
|
||||
virtual void iconHovered() {}
|
||||
|
||||
private:
|
||||
QToolButton *mMainToolButton;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue