From aab44382c53d3f483d97ac8152fc5823df59296a Mon Sep 17 00:00:00 2001 From: Flynn Date: Fri, 27 Jun 2014 18:35:39 -0700 Subject: [PATCH] Added alerts and modified groupchat status light to better fit with theme --- img/status/dot_groupchat.png | Bin 605 -> 613 bytes img/status/dot_groupchat_newmessages.png | Bin 764 -> 796 bytes img/status/dot_groupchat_notification.png | Bin 784 -> 814 bytes widget/widget.cpp | 9 +++++---- widget/widget.h | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/img/status/dot_groupchat.png b/img/status/dot_groupchat.png index 261fcf8f4a2cb4be0aa2db3831c6d45ce05d634d..e91dfbd2e8b0b64e4e934de9cc009c6c27fa07ab 100644 GIT binary patch delta 540 zcmV+%0^|MN1my&fRDS^(COM#tssI21@<~KNR5;6xRL@TnK@|S>?Q9#NVnZsIHGz05 z3)^zxV4869iuecMNsI?>kOl&&KVqoqLAl}0yNN~<6B5sQ;m~BakQ(GxNTW1DOu=+_ zcGim>r`t;TPV?T&`{up*-Wv@Ojeqq@1u-INdqT*w>Nkk6 znof6TTOQl}* zAOHZCU~FT(Qh#~)XktP--_&Z54X&osC|0Xu02XioVnn6wdi_c^nUp?KRq%zFLw{WT z(rDb8HBG4+MdTa9<#0naC^8RUFT*g%*f%wgJRxKyzk}c{0KX5%p*1wLv!=`pwGVm6 zLD9C40X)8dAZ&8}VAeEw{BNE?1p3@)000tPw zsH)PZnHe-W2LSx?ef(&(P_V2QVHl2hLfrO*xZmVFcOC?z13r zLSTA$7;PB=VC&!j$E{Y+CG6PZ71zapuJ={vr{`gFYO42F008dkDc&C)btM`^IO818 eCMUaMe-!{;Lb+C>)K(1u0000>o delta 532 zcmV+v0_*+d1l#G)zN_8UO$R>PbXFR5;6xl+S7tQ5431=fp{E8kb@VMH`18 zD50c+)oK>v1E?>Moq}ukqMP~(>c&l%)}=l`sx*a0N&;4fG++dkE{f>1F_X-7k@=UT zwmmR#=iGb0^Y8nvFk-VGeI`x|3iu;?3QV{zjZ${V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z2Cxc?!E+5r0NNq?5*PuJ!IK4~0zF_9Nu#ET{~TC_A!P+!Wd)m*nY)2mq^!amWd%Ex z6`W93@Ypmb$_kbMcYvGWFAvV7Z*uIjoy}XHnOk%Im|maHGuFS?_qOrM>dde*GnSyO zss(oA4rR&shJQ9~GJ~(c8=;rwHg|{ON{4H!UBr=@M)Xm;vMWPgR@PxZhz?*t=w(|Z zn!h-ffl)5>3@7!Cs+t7=AnnEarL-6JfHd@5$_iEh_Z<61wgB>h*V3r@bh@`S;Gh>V zhg6)nde#p6G?DcP7z6S}Eb-_ofaj6TdzoKLTizz`)PLoPao|08(gctQoz9e4L3qAu;jl^vr zM$$io&VSkHmB8XDfL{XpWH=z}l$o~{&EF2RNaOx~5$7E-aR-ZmwJwo|uKV5J6_D2t zBs^Q0;zshZoRVc`B>Rx}$(nFL)+y_FDw@9`_H3to+5##ocoe7x`XPEj6Z>i>#|VHu zaX!g)f0h6hfC)x{G-_J^-(qwBb~IlV5CBGF|3Tp27PBdq0gbqQr)2!o-dRrpfMd4^ u$G)92c~8~@NkAVM9WYccjfd?sd;S9JiT$o)F>BNS0000friendId != f2->friendId) || isFriendWidgetActive == 0) { f->hasNewMessages = 1; - playMessageNotification(); + newMessageAlert(); } } else { f->hasNewMessages = 1; - playMessageNotification(); + newMessageAlert(); } updateFriendStatusLights(friendId); @@ -380,8 +380,9 @@ void Widget::updateFriendStatusLights(int friendId) f->widget->statusPic.setPixmap(QPixmap("img/status/dot_away_notification.png")); } -void Widget::playMessageNotification() +void Widget::newMessageAlert() { + QApplication::alert(this, 1000); QSound::play("audio/notification.wav"); } @@ -427,7 +428,7 @@ void Widget::onGroupMessageReceived(int groupnumber, int friendgroupnumber, cons { if (message.contains(Settings::getInstance().getUsername(), Qt::CaseInsensitive)) { - playMessageNotification(); + newMessageAlert(); g->hasNewMessages = 1; g->userWasMentioned = 1; g->widget->statusPic.setPixmap(QPixmap("img/status/dot_groupchat_notification.png")); diff --git a/widget/widget.h b/widget/widget.h index 5951475d8..0829e65f8 100644 --- a/widget/widget.h +++ b/widget/widget.h @@ -84,7 +84,7 @@ private: GroupWidget* activeGroupWidget; void updateFriendStatusLights(int friendId); int isFriendWidgetActive, isGroupWidgetActive; - void playMessageNotification(); + void newMessageAlert(); }; #endif // WIDGET_H