From f2b14ccf5ec240fed3e4132c29b011efb214be87 Mon Sep 17 00:00:00 2001 From: JoGitqTox Date: Sat, 29 Nov 2014 15:53:02 +0100 Subject: [PATCH 01/20] Update de.ts Two chnages --- translations/de.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/translations/de.ts b/translations/de.ts index 373221256..25ca913e6 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -616,7 +616,7 @@ Wollen Sie ein anderes probieren? Show contacts' status changes - Zeige Statusänderungen der Kontakte + Zeigt Statusänderungen der Kontakte @@ -626,7 +626,7 @@ Wollen Sie ein anderes probieren? Focus qTox when a message is received - Bringe qTox in den Vordergrund, wenn eine Nachricht eintrifft + Bringt qTox in den Vordergrund, wenn eine Nachricht eintrifft From 545cde519c48a2b147fe202151bbdaaa5e1ff9b2 Mon Sep 17 00:00:00 2001 From: "A. L'mao" Date: Sun, 30 Nov 2014 11:04:55 -0800 Subject: [PATCH 02/20] Destroy AL context before closing old device I refuse to compile this code, so it's not tested. This should fix the segfault in alcDestroyContext. --- src/audio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audio.cpp b/src/audio.cpp index 6ade89edd..a394e72d4 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -87,8 +87,6 @@ void Audio::openOutput(const QString& outDevDescr) { auto* tmp = alOutDev; alOutDev = nullptr; - if (tmp) - alcCloseDevice(tmp); if (outDevDescr.isEmpty()) alOutDev = alcOpenDevice(nullptr); else @@ -104,6 +102,8 @@ void Audio::openOutput(const QString& outDevDescr) alcMakeContextCurrent(nullptr); alcDestroyContext(alContext); } + if (tmp) + alcCloseDevice(tmp); alContext=alcCreateContext(alOutDev,nullptr); if (!alcMakeContextCurrent(alContext)) { From 794d73a6ce8a5b2da0a38d88469069091d3a57cb Mon Sep 17 00:00:00 2001 From: Gethyn ThomasQuail Date: Fri, 5 Dec 2014 07:16:04 -0700 Subject: [PATCH 03/20] Update INSTALL.md Added dependency resolution for Slackware 14.1 users. --- INSTALL.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/INSTALL.md b/INSTALL.md index e94510b1a..14a647f47 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -134,6 +134,16 @@ yum groupinstall "Development Tools" yum install qt-devel qt-doc qt-creator opencv-devel openal-soft-devel libXScrnSaver-devel ``` +Slackware: + +You can grab slackbuilds of the needed dependencies here: + +http://slackbuilds.org/repository/14.1/libraries/OpenAL/ + +http://slackbuilds.org/repository/14.1/libraries/qt5/ + +http://slackbuilds.org/repository/14.1/libraries/opencv/ + ###Tox Core First of all install the dependencies of Tox Core. From 961d5830c3095520af91b24ed0efda5b2d2d2591 Mon Sep 17 00:00:00 2001 From: Dubslow Date: Fri, 5 Dec 2014 16:42:15 -0600 Subject: [PATCH 04/20] add fancier tray icons with status, remove relevant option --- img/taskbar/taskbar_busy.png | Bin 0 -> 420 bytes img/taskbar/taskbar_busy_2x.png | Bin 0 -> 716 bytes img/taskbar/taskbar_idle.png | Bin 0 -> 410 bytes img/taskbar/taskbar_idle_2x.png | Bin 0 -> 719 bytes img/taskbar/taskbar_invisible.png | Bin 0 -> 478 bytes img/taskbar/taskbar_invisible_2x.png | Bin 0 -> 704 bytes img/taskbar/taskbar_offline.png | Bin 0 -> 395 bytes img/taskbar/taskbar_offline_2x.png | Bin 0 -> 711 bytes img/taskbar/taskbar_online.png | Bin 0 -> 374 bytes img/taskbar/taskbar_online_2x.png | Bin 0 -> 637 bytes res.qrc | 4 +++ src/misc/settings.cpp | 12 -------- src/misc/settings.h | 4 --- src/widget/form/settings/generalform.cpp | 9 ------ src/widget/form/settings/generalform.h | 1 - src/widget/form/settings/generalsettings.ui | 32 -------------------- src/widget/widget.cpp | 25 ++++++--------- 17 files changed, 14 insertions(+), 73 deletions(-) create mode 100644 img/taskbar/taskbar_busy.png create mode 100644 img/taskbar/taskbar_busy_2x.png create mode 100644 img/taskbar/taskbar_idle.png create mode 100644 img/taskbar/taskbar_idle_2x.png create mode 100644 img/taskbar/taskbar_invisible.png create mode 100644 img/taskbar/taskbar_invisible_2x.png create mode 100644 img/taskbar/taskbar_offline.png create mode 100644 img/taskbar/taskbar_offline_2x.png create mode 100644 img/taskbar/taskbar_online.png create mode 100644 img/taskbar/taskbar_online_2x.png diff --git a/img/taskbar/taskbar_busy.png b/img/taskbar/taskbar_busy.png new file mode 100644 index 0000000000000000000000000000000000000000..451b4b4efb3361a3e18907dfc998a120322a2265 GIT binary patch literal 420 zcmV;V0bBlwP)dfQ_RGG8(cu+KZMc-$b$F`s0Z4rfW)`Qric;A@AIKf z#0EfN(T~Lc0F9MGMx-d)&p{@W&5^wXa?=ocZ(#U6}wA zF3q08!VHJrzh`K$ z|N507Lq>+dPC$TR#?z-@R}k%jZ-4)Soea|q@`^kM2g6sOI8g>{fBP1!0pyA|zkY!Y zGvVW7*Z~wL$_pUBgIwVuBEnFks0j8yC@`-94aAy|&@vFQ0GzP^0t^5JFKz~D({U^S O0000wt!aBH${ z#KFl*oYA8b{ROzW`M5bax#Q@jegS@g##y2+5<#kon}ZE0LYjD=F|)>+ZD+RAH+eJr zF|*Gz&ph+)Zptx?@v-q`YL+PHBDX4(N0g=8``bYGc_{;6pPEBTzeU#v$|8}dSR+8- zE;Ut3SCcOkDCm$#Yd-K;0basP0YtgaK}EQHO#2FO=`UN&j;nMQS)vu{S87**#mKpG zeYx?9k;@A;dhb% zVvk6y$LyFnQv#`&hae~Ue)eMuP{7MCVuSnROhKS5mFm-|iBpO?e`u%(h)nUqqceNF zD^~syAn+V7w@v~AuHl%1P$F&Ua8#Sz8td(Pea>jL?+Q)};@c77D>jVJ0ozFY{nG8EW4+7`u^OGHq_Vh3UqR&pX zs!c+hz^3OhaMdgUJUuwb?jxbn*4>@GLNqfx9Im$tTqyI_X#5f)k60ss*$LU3fkS%q z5k|E}V1Tdtb-msc9OP>6??1laidlUZ$P%l-lZ2KD>l_%e!uid>y}rJ%HdrHY@%s8x ze8>yJ?MiS`2HP>ZTx~DG`SUZIk=SN&;Mjf$T*nxzbzrwv`%{SKM@GWZ3w6ZIK@MBh zdL_iHFl!VfI2?ciR0LE4(WIrgqC;Zs=7tp}ctLDWm=r$Il|7EYgYF;zB>_`mrKNBB yiuC!^$q3|shv+US@_)WgMVWsMh5wP?0t^7pR3Wd`%vx#Al?YX`B2w@3{gaO2@4hnB)~KS z6&6C-2Y?2zhZ^Dl#Bf(IG2jLV(fAjkv;ndpJ_G83whAEe^|2{pMDlwBkg^A21t^Ar z13%7cfFKgZ#ChfpnnAf=kBUnw!Diikm?}mX+b!&7TZwHhpAx@c1{n zG6k$*;N`;0keMjN@bK|3hUxR)fyFxNCBTNE1FQyw`0+6;TJeElArPNF|DB;{>KleL zKsv;aA44rxFK}@&F^GyVqi6t$VFOqV`1b7|gD21%=m6vjqP%eM*jKE!ZQJviI2VBY z{`K2`U|{lqo&NgmA8?p}VgqYJ0;U5{@;pyYIsgbT0Jzj)qaALdPyhe`07*qoM6N<$ Eg6KV}-2eap literal 0 HcmV?d00001 diff --git a/img/taskbar/taskbar_idle_2x.png b/img/taskbar/taskbar_idle_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..118826fcc724554975237a6a329fb8fc0e7c5a50 GIT binary patch literal 719 zcmV;=0xUqYezQrvC_t&>w_(C!)0P zOVI-BmHLgqbKn2K{EEWM`)<$aNI}+HU~H(|Ns*tS0Ka%{nYwDgTj62&;rX4`O&~3y zlTz7GnSdBX-Cz!q0IC@y_Xx1@v>3P40|7&EP0oo#RI$Q?VDzxYeUrw5Zg#_HJWA73 zBa|^mC?3D#e|~;LRqKK(U(b}8#FTn4`GDTPPSC{o{beBa;@KE|T5nSQ*Oh((Fut_- z(DoW0SH7Lm&%;aCI3faK&?&C`lO`ce0G`A632*#yqe+cs+kI9&xS-ucj6S?dP)bDU zP2sn`L6n^twY`Jqe&Y^sZ*%L^{taEM(MAB_wLRrR3o`D$sW>`F4e;dgu)Y*H)!t}c zOK%)hsC{<taniNf+9%JAq#JEoFDBIN(=koQt6F~t+FJ9=ev9Co^n zdd~Eg=lC>8w7lOA{u;=OZ@xjHEKWo2cjT=A0|3N^?sPFxJB0uM002ovPDHLkV1lxT BQw;zB literal 0 HcmV?d00001 diff --git a/img/taskbar/taskbar_invisible.png b/img/taskbar/taskbar_invisible.png new file mode 100644 index 0000000000000000000000000000000000000000..81b07550b2c6931387533a7b06fc9a12a6737f07 GIT binary patch literal 478 zcmV<40U`d0P)xAyD%L5Cceqya02)10e%&fsaVu!5#)c=YdSOhq}T6=;xPE ze?I`y^MPWZzy+}%0>xf{^e`fY`gwHIk-!E}Afky~0D8@k5y|HL=(?n3q#0zSWf-ns zzs~UK(TXHm^OVHgPFM*Tx{Wjg$%7Ntr%*t24YoB6$39HFT>;^o2 z`jjCdAps>!TwGlko;-bmp%!Z_fE0rQ5oD0Gv^1FJ<>h7Y_w#3X`s67}EHFbej{-FF zfWf_c_Zar<-oqdwDgq9NQzuU`WM^hGym|cw-2n?>E>M6bBmokV_5)x-QUnMv03C;Y U4QsG54FCWD07*qoM6N<$f~?8E2><{9 literal 0 HcmV?d00001 diff --git a/img/taskbar/taskbar_invisible_2x.png b/img/taskbar/taskbar_invisible_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..f02f7e04730aedcd39399ab7fd93c9b3719b79de GIT binary patch literal 704 zcmV;x0zdtUP)70iSixy* zaIZSKu`j;Qcjqs5ju^_!^voJGe?b=$LtW5Q&{qGsKh&KsXW-a}<^VU{=PI#$s-olllBhUlpl#9dO`FR9b=6fDRE297#uhA@T&cqMiDwrW7G@GN44)skDH&u@b_65qsB zO{HLB?0Fv9-P@(DEEV{LVMuzt9@*L6p{@08h)&PW&xG^4|94_6iXx?rRRGO@O;Rit z>FR1rHF9)#B*t*n*f$!Ds0~KRDu8e$B(CcUXQ~im-|C-L5ecjjYXE{E5TPEIUmWA< zunGXfn#_ADh{q3re1};57GRETOWwq>PFTHJPjG`Z0C60PT5wD5*sY3upqnmj0MSK6 z27>{uh30Wn34)W9D8`G(E)zC38iHin*KP9DdlF;ln6DhugJeDVZy zj$>$JLdAu|-7XVEb)ia$3G0DxPh2(DiEh}H2NJ~vWRfB-EP3fn-<6I}la!%+cSzPi mo!$8+B^`De68Fe=0R{lshwwpNE1o0(00002xMX4_B^f-0g~9A^fB!Npdhvqc(EIo3$^=+&X|@*-VCZ}Fh~e7TuV8~R zq@}?Io%!^MfnXqlG|YJV6s#DeY3-|542M2^fV+sOSa|s32MYi7uU}ZzVKo3`tDS%V zikKERH^b}SzcJKe4Fgbsf&47W#s;<-q*5#oA?XV$x-5LA}%Hd43fA>!Ucj535oC3_R^epT#Mx; zFTLxveP6$R@7-O9C|Wj?-GOEse8csq0)7Qvs=ifi+4VvSfh}k*!L5Ly@8Ed=QPBnf zf*a7(!3{~g$Usg8L|AgcYmeY1+$jbEKW9O?8Enq~8DP{u1?`TpbniN%0*ovDmw_$U zz32Hd;pJW3n>vnQT@)AuD*FwDXDGlMq07>x0a4*W_AFedbOT69j4@RfR0hBb(I~Sf z2>|U3K|nK8y3=S>>%>I|~g`FZM#)6?|+b1)!}?KX8) zi>M4XqfxS(NYGZaCGa)FAdP;XTzq`cRyzO;dX!F+*{Lad|6tqX^ZT1#FV4(R0DR1G zy)F$x8bHxBX>h+?-Zh&JKxFB#R?}CA))p3=^Y)_{`*7!+E!2oM0ITu1L;EOd@fnWc zLe&Ofj-C5Uw;MRN(d+%{f-$D`UGOy=65S>RpvwZw&}znFPHoTz;IY$jw16o$DpfHZ zWsgf5z(cD=cZ4ZcOeQ@+@FL}i5$0&E1E-A!&2tQNlF3k3cq7Swf)Wmg0&Gh`rZWT9{A|JUvmQ$cQZMegNKOCt;v*f_cRX3*Yn=;qz&d tW{dw0?kvc&f4)gsnSBj8|B*ie3;+fJ_t}5ITdx2B002ovPDHLkV1gV(Knnl> literal 0 HcmV?d00001 diff --git a/img/taskbar/taskbar_online.png b/img/taskbar/taskbar_online.png new file mode 100644 index 0000000000000000000000000000000000000000..24b9a8d4bba31277b1bb6077478ab5528477c90c GIT binary patch literal 374 zcmV-+0g3*JP)9dI2Fv~a_J`rY?xzgzZhk~p zrhqLL7^JPm8T69WFbq7|bqT`|tbwQ*p@h}FP!|z4fRziY!@#Z}$^cy8`?z(*Y=b@5dGvyt3R3pC5l^07WIXbN~=w0F($* Ux26+IH2?qr07*qoM6N<$g3v^WVgLXD literal 0 HcmV?d00001 diff --git a/img/taskbar/taskbar_online_2x.png b/img/taskbar/taskbar_online_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..44e6013b7c46926426da481713d49ebccaf455f5 GIT binary patch literal 637 zcmV-@0)qXCP){sdylEK$E%v z#0!CV!R@=ZKM-pkBMBB80IB&vY(PNi10W6rI^qJ=900Uj07%^jVgVxE3km^8VjRIl zq=D62aA1r{FUL|jSmbD_B>F~~xr94)XTkO7}8HyDE) zc74S?hNnkgQr`g}%gxL52!@Vck{XyztRt9+4R)Bp!~l?5P7x03IY0~;-^3aSPth(? z)N=qR!I27tGz6#{1*8H{qNG(_Kvh7L1Ac$|L$bl3vVm$2czOOU$qsl$q#mLi0Ls&( zlyIOBd$9W{b<@DPDc6XO3Q%cCtXd{g;`CJ4CA=X4vJ~V{a*N^%#5m$W`Du7%gq%G= z=>%jksR@>a#1=0+O_1VCe64FHq&EEpq~;SX!3X5N19}<=g!cJp1r9)4L-2kiK!5=N XH;}yv)F_({00000NkvXXu0mjfp&RpV literal 0 HcmV?d00001 diff --git a/res.qrc b/res.qrc index d58cef6c7..40b6d28f2 100644 --- a/res.qrc +++ b/res.qrc @@ -37,6 +37,10 @@ img/status/dot_online.png img/status/dot_online_2x.png img/status/dot_online_notification.png + img/taskbar/taskbar_online_2x.png + img/taskbar/taskbar_idle_2x.png + img/taskbar/taskbar_busy_2x.png + img/taskbar/taskbar_offline_2x.png img/transfer.png smileys/cylgom/angel.png smileys/cylgom/angry.png diff --git a/src/misc/settings.cpp b/src/misc/settings.cpp index c5e13b1e7..e04dc7f49 100644 --- a/src/misc/settings.cpp +++ b/src/misc/settings.cpp @@ -129,7 +129,6 @@ void Settings::load() makeToxPortable = s.value("makeToxPortable", false).toBool(); autostartInTray = s.value("autostartInTray", false).toBool(); closeToTray = s.value("closeToTray", false).toBool(); - trayShowsUserStatus = s.value("trayShowsUserStatus", false).toBool(); forceTCP = s.value("forceTCP", false).toBool(); useProxy = s.value("useProxy", false).toBool(); proxyAddr = s.value("proxyAddr", "").toString(); @@ -281,7 +280,6 @@ void Settings::save(QString path, bool writeFriends) s.setValue("showSystemTray", showSystemTray); s.setValue("autostartInTray",autostartInTray); s.setValue("closeToTray", closeToTray); - s.setValue("trayShowsUserStatus", trayShowsUserStatus); s.setValue("useProxy", useProxy); s.setValue("forceTCP", forceTCP); s.setValue("proxyAddr", proxyAddr); @@ -521,16 +519,6 @@ void Settings::setCloseToTray(bool newValue) closeToTray = newValue; } -bool Settings::getTrayShowsUserStatus() const -{ - return trayShowsUserStatus; -} - -void Settings::setTrayShowsUserStatus(bool newValue) -{ - trayShowsUserStatus = newValue; -} - bool Settings::getMinimizeToTray() const { return minimizeToTray; diff --git a/src/misc/settings.h b/src/misc/settings.h index 5622be204..7ebe39f66 100644 --- a/src/misc/settings.h +++ b/src/misc/settings.h @@ -58,9 +58,6 @@ public: bool getCloseToTray() const; void setCloseToTray(bool newValue); - - bool getTrayShowsUserStatus() const; - void setTrayShowsUserStatus(bool newValue); bool getMinimizeToTray() const; void setMinimizeToTray(bool newValue); @@ -247,7 +244,6 @@ private: bool autostartInTray; bool closeToTray; bool minimizeToTray; - bool trayShowsUserStatus; bool useEmoticons; bool checkUpdates; bool showInFront; diff --git a/src/widget/form/settings/generalform.cpp b/src/widget/form/settings/generalform.cpp index a28fafa9f..c7f35a2ae 100644 --- a/src/widget/form/settings/generalform.cpp +++ b/src/widget/form/settings/generalform.cpp @@ -62,8 +62,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : bodyUI->closeToTray->setEnabled(showSystemTray); bodyUI->minimizeToTray->setChecked(Settings::getInstance().getMinimizeToTray()); bodyUI->minimizeToTray->setEnabled(showSystemTray); - bodyUI->trayShowsUserStatus->setChecked(Settings::getInstance().getTrayShowsUserStatus()); - bodyUI->trayShowsUserStatus->setEnabled(showSystemTray); bodyUI->statusChanges->setChecked(Settings::getInstance().getStatusChangeNotificationEnabled()); bodyUI->useEmoticons->setChecked(Settings::getInstance().getUseEmoticons()); bodyUI->autoacceptFiles->setChecked(Settings::getInstance().getAutoSaveEnabled()); @@ -122,7 +120,6 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray); connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray); connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray); - connect(bodyUI->trayShowsUserStatus, &QCheckBox::stateChanged, this, &GeneralForm::onSettrayShowsUserStatus); connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange); connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged())); connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront); @@ -193,12 +190,6 @@ void GeneralForm::onSetMinimizeToTray() Settings::getInstance().setMinimizeToTray(bodyUI->minimizeToTray->isChecked()); } -void GeneralForm::onSettrayShowsUserStatus() -{ - Settings::getInstance().setTrayShowsUserStatus(bodyUI->trayShowsUserStatus->isChecked()); - Widget::getInstance()->updateTrayIcon(); -} - void GeneralForm::onStyleSelected(QString style) { if(bodyUI->styleBrowser->currentIndex() == 0) diff --git a/src/widget/form/settings/generalform.h b/src/widget/form/settings/generalform.h index dba72d404..ec41fb0ad 100644 --- a/src/widget/form/settings/generalform.h +++ b/src/widget/form/settings/generalform.h @@ -49,7 +49,6 @@ private slots: void onAutoAwayChanged(); void onUseEmoticonsChange(); void onSetMinimizeToTray(); - void onSettrayShowsUserStatus(); void onReconnectClicked(); void onAutoAcceptFileChange(); void onAutoSaveDirChange(); diff --git a/src/widget/form/settings/generalsettings.ui b/src/widget/form/settings/generalsettings.ui index c4d07dfd8..4df38f286 100644 --- a/src/widget/form/settings/generalsettings.ui +++ b/src/widget/form/settings/generalsettings.ui @@ -152,22 +152,6 @@ - - - - - 0 - 0 - - - - Tray icon displays user status - - - This is a temporary work around until proper systray status icons are available. - - - @@ -607,21 +591,5 @@ - - showSystemTray - toggled(bool) - trayShowsUserStatus - setEnabled(bool) - - - 148 - 143 - - - 158 - 205 - - - diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 4736f3642..f30e86544 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -295,22 +295,17 @@ void Widget::setTranslation() void Widget::updateTrayIcon() { - if(Settings::getInstance().getTrayShowsUserStatus()) - { - QString status = ui->statusButton->property("status").toString(); - QString icon; - if(status == "online") - icon = ":img/status/dot_online_2x.png"; - else if(status == "away") - icon = ":img/status/dot_idle_2x.png"; - else if(status == "busy") - icon = ":img/status/dot_busy_2x.png"; - else - icon = ":img/status/dot_away_2x.png"; - this->icon->setIcon(QIcon(icon)); - } + QString status = ui->statusButton->property("status").toString(); + QString icon; + if(status == "online") + icon = ":img/taskbar/taskbar_online_2x.png"; + else if(status == "away") + icon = ":img/taskbar/taskbar_idle_2x.png"; + else if(status == "busy") + icon = ":img/taskbar/taskbar_busy_2x.png"; else - icon->setIcon(windowIcon()); + icon = ":img/taskbar/taskbar_offline_2x.png"; + this->icon->setIcon(QIcon(icon)); } Widget::~Widget() From a5c5618b97a84275f6cb79504d29855b6d5ba6e2 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 6 Dec 2014 12:44:38 +0100 Subject: [PATCH 05/20] Fix include 'Windows.h' -> 'windows.h' MinGW is case sensitive --- src/platform/timer_win.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/timer_win.cpp b/src/platform/timer_win.cpp index 07650a0e1..e860a5ac6 100644 --- a/src/platform/timer_win.cpp +++ b/src/platform/timer_win.cpp @@ -17,7 +17,7 @@ #include #ifdef Q_OS_WIN32 #include "src/platform/timer.h" -#include +#include uint32_t Platform::getIdleTime() From 324d075cfe2960ff75b8a312c66de37143bdd949 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 6 Dec 2014 13:49:04 +0100 Subject: [PATCH 06/20] Change push to talk shortcut to CTRL+P --- src/widget/form/groupchatform.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index cbb41df6b..b14db2fb5 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -212,8 +212,8 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev) if (msgEdit->hasFocus()) return; - // Push to talk - if (ev->key() == Qt::Key_P && inCall) + // Push to talk (CTRL+P) + if (ev->key() == Qt::Key_P && (ev->modifiers() & Qt::ControlModifier) && inCall) { Core* core = Core::getInstance(); if (!core->isGroupCallMicEnabled(group->getGroupId())) @@ -231,7 +231,7 @@ void GroupChatForm::keyReleaseEvent(QKeyEvent* ev) if (msgEdit->hasFocus()) return; - // Push to talk + // Push to talk (CTRL+P (only need to release P)) if (ev->key() == Qt::Key_P && inCall) { Core* core = Core::getInstance(); From 424af0505e6370ca0a1d438751ae8986e119ba4f Mon Sep 17 00:00:00 2001 From: Simon Vermeersch Date: Tue, 25 Nov 2014 22:20:39 +0100 Subject: [PATCH 07/20] Focus the text input area when clicking on the text area --- src/widget/chatareawidget.cpp | 1 + src/widget/chatareawidget.h | 1 + src/widget/form/genericchatform.cpp | 6 ++++++ src/widget/form/genericchatform.h | 1 + 4 files changed, 9 insertions(+) diff --git a/src/widget/chatareawidget.cpp b/src/widget/chatareawidget.cpp index 393a01c0e..22886ba8c 100644 --- a/src/widget/chatareawidget.cpp +++ b/src/widget/chatareawidget.cpp @@ -87,6 +87,7 @@ void ChatAreaWidget::mouseReleaseEvent(QMouseEvent * event) } } } + emit onClick(); } void ChatAreaWidget::onAnchorClicked(const QUrl &url) diff --git a/src/widget/chatareawidget.h b/src/widget/chatareawidget.h index 2eda1aad4..72a17823c 100644 --- a/src/widget/chatareawidget.h +++ b/src/widget/chatareawidget.h @@ -41,6 +41,7 @@ public slots: signals: void onFileTranfertInterract(QString widgetName, QString buttonName); + void onClick(); protected: void mouseReleaseEvent(QMouseEvent * event); diff --git a/src/widget/form/genericchatform.cpp b/src/widget/form/genericchatform.cpp index d9912a091..176e3c876 100644 --- a/src/widget/form/genericchatform.cpp +++ b/src/widget/form/genericchatform.cpp @@ -152,6 +152,7 @@ GenericChatForm::GenericChatForm(QWidget *parent) : connect(emoteButton, SIGNAL(clicked()), this, SLOT(onEmoteButtonClicked())); connect(chatWidget, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onChatContextMenuRequested(QPoint))); + connect(chatWidget, SIGNAL(onClick()), this, SLOT(onChatWidgetClicked())); chatWidget->document()->setDefaultStyleSheet(Style::getStylesheet(":ui/chatArea/innerStyle.css")); chatWidget->setStyleSheet(Style::getStylesheet(":/ui/chatArea/chatArea.css")); @@ -252,6 +253,11 @@ void GenericChatForm::onEmoteButtonClicked() } } +void GenericChatForm::onChatWidgetClicked() +{ + msgEdit->setFocus(); +} + void GenericChatForm::onEmoteInsertRequested(QString str) { // insert the emoticon diff --git a/src/widget/form/genericchatform.h b/src/widget/form/genericchatform.h index d838fd31e..fe6de80fb 100644 --- a/src/widget/form/genericchatform.h +++ b/src/widget/form/genericchatform.h @@ -69,6 +69,7 @@ protected slots: void onEmoteButtonClicked(); void onEmoteInsertRequested(QString str); void clearChatArea(bool); + void onChatWidgetClicked(); protected: QString getElidedName(const QString& name); From 53d7bc9dc1237e2389331941f75e404ef5818221 Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sat, 6 Dec 2014 13:59:19 +0100 Subject: [PATCH 08/20] Push to talk with input msgedit focused --- src/widget/form/groupchatform.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/widget/form/groupchatform.cpp b/src/widget/form/groupchatform.cpp index b14db2fb5..d1fb70518 100644 --- a/src/widget/form/groupchatform.cpp +++ b/src/widget/form/groupchatform.cpp @@ -209,9 +209,6 @@ void GroupChatForm::onCallClicked() void GroupChatForm::keyPressEvent(QKeyEvent* ev) { - if (msgEdit->hasFocus()) - return; - // Push to talk (CTRL+P) if (ev->key() == Qt::Key_P && (ev->modifiers() & Qt::ControlModifier) && inCall) { @@ -224,13 +221,13 @@ void GroupChatForm::keyPressEvent(QKeyEvent* ev) Style::repolish(micButton); } } + + if (msgEdit->hasFocus()) + return; } void GroupChatForm::keyReleaseEvent(QKeyEvent* ev) { - if (msgEdit->hasFocus()) - return; - // Push to talk (CTRL+P (only need to release P)) if (ev->key() == Qt::Key_P && inCall) { @@ -243,4 +240,7 @@ void GroupChatForm::keyReleaseEvent(QKeyEvent* ev) Style::repolish(micButton); } } + + if (msgEdit->hasFocus()) + return; } From cfae6104d43109c7e2036e44ac5908e2f6861111 Mon Sep 17 00:00:00 2001 From: Lednerb Date: Mon, 8 Dec 2014 14:39:39 +0100 Subject: [PATCH 09/20] Fixed language error. --- translations/de.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/translations/de.ts b/translations/de.ts index 25ca913e6..f3dbcf2ea 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -594,22 +594,27 @@ Wollen Sie ein anderes probieren? Mache Tox portabel - - Show system tray + + System tray integration + Systemtray Integration + + + + Show system tray icon Im Systemtray zeigen - + Start in tray Ins Tray starten - + Close to tray Ins Tray schließen - + Minimize to tray Ins Tray minimieren @@ -1629,4 +1634,4 @@ Es wird beim Neustart von qTox installiert. Senden der Nachricht fehlgeschlagen - + \ No newline at end of file From cd82ee9f115fd9d94103d7ae518a8a9409ba1a68 Mon Sep 17 00:00:00 2001 From: Lednerb Date: Mon, 8 Dec 2014 14:55:57 +0100 Subject: [PATCH 10/20] Added translation. --- translations/de.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/translations/de.ts b/translations/de.ts index f3dbcf2ea..cf02bf206 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -36,6 +36,11 @@ Capture device Aufnahmegerät + + + Rescan audio devices + Erneut nach Audiogeräten suchen + Video Settings From dfb51d7d2911e388dc625bbea366308eb76eb728 Mon Sep 17 00:00:00 2001 From: Lednerb Date: Mon, 8 Dec 2014 19:07:51 +0100 Subject: [PATCH 11/20] Added Translation for error message on sending a file. Also included the German Version. --- src/widget/form/chatform.cpp | 2 +- translations/de.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index a97faf93c..b9a7d6776 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -673,7 +673,7 @@ void ChatForm::onFileSendFailed(int FriendId, const QString &fname) if (FriendId != f->getFriendID()) return; - addSystemInfoMessage("File: \"" + fname + "\" failed to send.", "red", QDateTime::currentDateTime()); + addSystemInfoMessage(tr("Failed to send file") + ": \"" + fname + "\"", "red", QDateTime::currentDateTime()); } void ChatForm::onAvatarChange(int FriendId, const QPixmap &pic) diff --git a/translations/de.ts b/translations/de.ts index cf02bf206..6636bf5de 100644 --- a/translations/de.ts +++ b/translations/de.ts @@ -257,6 +257,11 @@ Soll der Proxy ignoriert und eine direkte Internetverbindung genutzt werden?Call rejected Anruf abgewiesen + + + Failed to send file + Fehler beim Senden der Datei + Call with %1 ended. %2 From 17bcd969b23fac89f938f7c5c638db4391420d2b Mon Sep 17 00:00:00 2001 From: Sascha Brendel Date: Mon, 8 Dec 2014 20:28:34 +0100 Subject: [PATCH 12/20] Update chatform.cpp Improved that line of code. Thanks to @dubslow --- src/widget/form/chatform.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index b9a7d6776..50b455289 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -673,7 +673,7 @@ void ChatForm::onFileSendFailed(int FriendId, const QString &fname) if (FriendId != f->getFriendID()) return; - addSystemInfoMessage(tr("Failed to send file") + ": \"" + fname + "\"", "red", QDateTime::currentDateTime()); + addSystemInfoMessage(tr("Failed to send file \"%1\"").arg(fname), "red", QDateTime::currentDateTime()); } void ChatForm::onAvatarChange(int FriendId, const QPixmap &pic) From fd6608b15432c0a7dd2900aa528346b67d00f779 Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Mon, 8 Dec 2014 23:15:53 +0000 Subject: [PATCH 13/20] Update INSTALL.md --- INSTALL.md | 368 ++++++++++++++++++++++++++++------------------------- 1 file changed, 192 insertions(+), 176 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 14a647f47..63cefe8a1 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,8 +1,8 @@ #Install Instructions - [Dependencies](#dependencies) -- [Windows](#windows) - [Linux](#linux) - [OS X](#osx) +- [Windows](#windows) ##Dependencies @@ -15,6 +15,196 @@ | OpenCV | >= 2.4.9 | core, highgui, imgproc | | OpenAL Soft | >= 1.16.0 | | + + +##Linux +###Simple install +Easy qTox install is provided for variety of distributions: +https://wiki.tox.im/Binaries#Apt.2FAptitude_.28Debian.2C_Ubuntu.2C_Mint.2C_etc..29 + +If your distribution is not listed, or you want/need to compile qTox, there are provided instructions. + +**Please note that installing toxcore/qTox from AUR is not supported**, although installing other dependencies, provided that they met requirements, should be fine, unless you are installing cryptography library from AUR, which should rise red flags by itself… + +---- + +Most of the dependencies should be available through your package manger. You may either follow the directions below, or simply run `./simple_make.sh` after cloning, which will attempt to automatically download dependencies followed by compilation. + + +###Cloning the Repository +In order to clone the qTox repository you need Git. + +Arch Linux: +```bash +sudo pacman -S --needed git +``` + +Debian: +```bash +sudo apt-get install git +``` + +Fedora: +```bash +yum install git +``` + +Ubuntu: +```bash +sudo apt-get install git +``` + +Afterwards open a new Terminal, change to a directory of your choice and clone the repository: +```bash +cd /home/user/qTox +git clone https://github.com/tux3/qTox.git qTox +``` + +The following steps assumes that you cloned the repository at "/home/user/qTox". If you decided to choose another location, replace corresponding parts. + +###GCC, Qt, OpenCV and OpanAL Soft + +Arch Linux: +```bash +sudo pacman -S --needed base-devel qt5 opencv openal libxss +``` + +Debian: +```bash +sudo apt-get install build-essential qt5-qmake qt5-default libopenal-dev libopencv-dev libxss-dev +``` + +Fedora: +```bash +yum groupinstall "Development Tools" +yum install qt-devel qt-doc qt-creator opencv-devel openal-soft-devel libXScrnSaver-devel +``` + +Slackware: + +You can grab slackbuilds of the needed dependencies here: + +http://slackbuilds.org/repository/14.1/libraries/OpenAL/ + +http://slackbuilds.org/repository/14.1/libraries/qt5/ + +http://slackbuilds.org/repository/14.1/libraries/opencv/ + +Ubuntu: +```bash +sudo apt-get install build-essential qt5-qmake qt5-default qttools5-dev-tools libopenal-dev libopencv-dev libxss-dev +``` + +###Tox Core + +First of all install the dependencies of Tox Core. + +Arch Linux: +```bash +sudo pacman -S --needed opus vpx +``` + +``` +Debian: +```bash +sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev +``` + +Fedora: +```bash +yum install libtool autoconf automake check check-devel +``` + +Ubuntu: +```bash +sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev +``` + +Now you can either follow the instructions at https://github.com/irungentoo/toxcore/blob/master/INSTALL.md#unix or use the "bootstrap.sh" script located at "/home/user/qTox". +The script will automatically download and install Tox Core and libsodium to "/home/user/qTox/libs": +```bash +cd /home/user/qTox +./bootstrap.sh # use -h or --help for more information +``` + +After all the dependencies are thus reeady to go, compiling should be as simple as +```bash +qmake +make +``` + +###Building packages + +Alternately, qTox now has the experimental and probably-dodgy ability to package itself (in .deb +form natively, and .rpm form with alien). + +After installing the required dependencies, run `bootstrap.sh` and then run the +`buildPackages.sh` script, found in the tools folder. It will automatically get the +packages necessary for building .debs, so be prepared to type your password for sudo. + + + +##OS X + +###OSX Easy Install + +Since https://github.com/ReDetection/homebrew-qtox you can easily install qtox with homebrew +```bash +brew install --HEAD ReDetection/qtox/qtox +``` + + +###OSX Full Install Guide + +This guide is intended for people who wish to use an existing or new ProjectTox-Core installation separate to the bundled installation with qTox, if you do not wish to use a separate installation you can skip to the section titled 'Final Steps'. + +Installation on OSX, isn't quite straight forward, here is a quick guide on how to install; + +Note that qTox now requires OpenCV and OpenAL for video and audio. + +The first thing you need to do is install ProjectTox-Core with a/v support. Refer to the INSTALL guide in the PrjectTox-Core github repo. + +Next you need to download QtTools (http://qt-project.org/downloads), at the time of writing this is at version .3.0. +Make sure you deselect all the unnecessary components from the 5.3 checkbox (iOS/Android libs) otherwise you will end up with a very large download. + +Once that is installed you will most likely need to set the path for qmake. To do this, open up terminal and paste in the following; + +```bash +export PATH=/location/to/qmake/binary:$PATH +``` + +For myself, the qmake binary was located in /Users/mouseym/Qt/5.3/clang_64/bin/. + +This is not a permanent change, it will revert when you close the terminal window, to add it permanently you will need to add echo the above line to your .profile/.bash_profile. + +Once this is installed, do the following; + +```bash +git clone https://github.com/tux3/qTox +cd toxgui +qmake +``` + +Now, we need to create a symlink to /usr/local/lib/ and /usr/local/include/ +``` +mkdir -p $HOME/qTox/libs +sudo ln -s /usr/local/lib $HOME/qTox/libs/lib +sudo ln -s /usr/local/include $HOME/qTox/libs/include +``` +####Final Steps + +The final step is to run +```bash +make +``` +in the qTox directory, or if you are using the bundled tox core installation, you can use +```bash +./bootstrap.sh +make +``` +Assuming all went well you should now have a qTox.app file within the directory. Double click and it should open! + + ##Windows @@ -74,178 +264,4 @@ As for OpenCV there are no prebuild packages of OpenAL Softe compiled with MinGW make make install ``` -Copy the dll "OpenAL32.dll" located at "C:\qTox\libs\openal-build\install\bin" to "C:\qTox\libs\lib". Finally, copy the directory "AL" located at "C:\qTox\libs\openal-build\install\include" to "C:\qTox\libs\include". Unlike OpenCV you don't need to patch any files. Feel free to delete the directories "openal-soft-x.y.z" and "openal-build", but you don't need to. - - -##Linux -Most of the dependencies should be available through your package manger. You may either follow the directions below, or simply run `./simple_make.sh` after cloning, which will attempt to automatically download dependencies followed by compilation. - -###Cloning the Repository -In order to clone the qTox repository you need Git. - -Debian: -```bash -sudo apt-get install git -``` - -Ubuntu: -```bash -sudo apt-get install git -``` - -Arch Linux: -```bash -sudo pacman -S --needed git -``` - -Fedora: -```bash -yum install git -``` - -Afterwards open a new Terminal, change to a directory of your choice and clone the repository: -```bash -cd /home/user/qTox -git clone https://github.com/tux3/qTox.git qTox -``` - -The following steps assumes that you cloned the repository at "/home/user/qTox". If you decided to choose another location, replace corresponding parts. - -###GCC, Qt, OpenCV and OpanAL Soft - -Debian: -```bash -sudo apt-get install build-essential qt5-qmake qt5-default libopenal-dev libopencv-dev libxss-dev -``` - -Ubuntu: -```bash -sudo apt-get install build-essential qt5-qmake qt5-default qttools5-dev-tools libopenal-dev libopencv-dev libxss-dev -``` - -Arch Linux: -```bash -sudo pacman -S --needed base-devel qt5 opencv openal libxss -``` - -Fedora: -```bash -yum groupinstall "Development Tools" -yum install qt-devel qt-doc qt-creator opencv-devel openal-soft-devel libXScrnSaver-devel -``` - -Slackware: - -You can grab slackbuilds of the needed dependencies here: - -http://slackbuilds.org/repository/14.1/libraries/OpenAL/ - -http://slackbuilds.org/repository/14.1/libraries/qt5/ - -http://slackbuilds.org/repository/14.1/libraries/opencv/ - -###Tox Core - -First of all install the dependencies of Tox Core. - -Debian: -```bash -sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev -``` - -Ubuntu: -```bash -sudo apt-get install libtool autotools-dev automake checkinstall check libopus-dev libvpx-dev -``` - -Arch Linux: (Arch Linux provides the package "tox-git" in AUR) -```bash -sudo pacman -S --needed opus vpx -``` - -Fedora: -```bash -yum install libtool autoconf automake check check-devel -``` - -Now you can either follow the instructions at https://github.com/irungentoo/toxcore/blob/master/INSTALL.md#unix or use the "bootstrap.sh" script located at "/home/user/qTox". -The script will automatically download and install Tox Core and libsodium to "/home/user/qTox/libs": -```bash -cd /home/user/qTox -./bootstrap.sh # use -h or --help for more information -``` - -After all the dependencies are thus reeady to go, compiling should be as simple as -```bash -qmake -make -``` - -###Building packages - -Alternately, qTox now has the experimental and probably-dodgy ability to package itself (in .deb -form natively, and .rpm form with alien). - -After installing the required dependencies, run `bootstrap.sh` and then run the -`buildPackages.sh` script, found in the tools folder. It will automatically get the -packages necessary for building .debs, so be prepared to type your password for sudo. - - -##OS X - -###OSX Easy Install - -Since https://github.com/ReDetection/homebrew-qtox you can easily install qtox with homebrew -```bash -brew install --HEAD ReDetection/qtox/qtox -``` - -###OSX Full Install Guide - -This guide is intended for people who wish to use an existing or new ProjectTox-Core installation separate to the bundled installation with qTox, if you do not wish to use a separate installation you can skip to the section titled 'Final Steps'. - -Installation on OSX, isn't quite straight forward, here is a quick guide on how to install; - -Note that qTox now requires OpenCV and OpenAL for video and audio. - -The first thing you need to do is install ProjectTox-Core with a/v support. Refer to the INSTALL guide in the PrjectTox-Core github repo. - -Next you need to download QtTools (http://qt-project.org/downloads), at the time of writing this is at version .3.0. -Make sure you deselect all the unnecessary components from the 5.3 checkbox (iOS/Android libs) otherwise you will end up with a very large download. - -Once that is installed you will most likely need to set the path for qmake. To do this, open up terminal and paste in the following; - -```bash -export PATH=/location/to/qmake/binary:$PATH -``` - -For myself, the qmake binary was located in /Users/mouseym/Qt/5.3/clang_64/bin/. - -This is not a permanent change, it will revert when you close the terminal window, to add it permanently you will need to add echo the above line to your .profile/.bash_profile. - -Once this is installed, do the following; - -```bash -git clone https://github.com/tux3/qTox -cd toxgui -qmake -``` - -Now, we need to create a symlink to /usr/local/lib/ and /usr/local/include/ -``` -mkdir -p $HOME/qTox/libs -sudo ln -s /usr/local/lib $HOME/qTox/libs/lib -sudo ln -s /usr/local/include $HOME/qTox/libs/include -``` -####Final Steps - -The final step is to run -```bash -make -``` -in the qTox directory, or if you are using the bundled tox core installation, you can use -```bash -./bootstrap.sh -make -``` -Assuming all went well you should now have a qTox.app file within the directory. Double click and it should open! +Copy the dll "OpenAL32.dll" located at "C:\qTox\libs\openal-build\install\bin" to "C:\qTox\libs\lib". Finally, copy the directory "AL" located at "C:\qTox\libs\openal-build\install\include" to "C:\qTox\libs\include". Unlike OpenCV you don't need to patch any files. Feel free to delete the directories "openal-soft-x.y.z" and "openal-build", but you don't need to. \ No newline at end of file From 5cb1b6fe8e2180bab003bc0a95231c82d074d582 Mon Sep 17 00:00:00 2001 From: Dubslow Date: Tue, 9 Dec 2014 14:18:12 -0600 Subject: [PATCH 14/20] check for no systray, fixes #908 cant believe it took this long to figure out ;_; --- src/widget/widget.cpp | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index f30e86544..dcf6c67a4 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -125,7 +125,8 @@ void Widget::init() } else { - qWarning() << "No system tray detected!"; + qWarning() << "Widget: No system tray detected!"; + icon = nullptr; this->show(); } @@ -295,17 +296,19 @@ void Widget::setTranslation() void Widget::updateTrayIcon() { + if (!icon) + return; QString status = ui->statusButton->property("status").toString(); - QString icon; - if(status == "online") - icon = ":img/taskbar/taskbar_online_2x.png"; - else if(status == "away") - icon = ":img/taskbar/taskbar_idle_2x.png"; - else if(status == "busy") - icon = ":img/taskbar/taskbar_busy_2x.png"; + QString pic; + if (status == "online") + pic = ":img/taskbar/taskbar_online_2x.png"; + else if (status == "away") + pic = ":img/taskbar/taskbar_idle_2x.png"; + else if (status == "busy") + pic = ":img/taskbar/taskbar_busy_2x.png"; else - icon = ":img/taskbar/taskbar_offline_2x.png"; - this->icon->setIcon(QIcon(icon)); + pic = ":img/taskbar/taskbar_offline_2x.png"; + icon->setIcon(QIcon(pic)); } Widget::~Widget() From 13306031e238258a3faf2909a01987cf093765dc Mon Sep 17 00:00:00 2001 From: apprb Date: Thu, 11 Dec 2014 21:33:38 +0600 Subject: [PATCH 15/20] fix #902 --- src/widget/tool/chatactions/chataction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/tool/chatactions/chataction.cpp b/src/widget/tool/chatactions/chataction.cpp index a2aa3e140..00f872106 100644 --- a/src/widget/tool/chatactions/chataction.cpp +++ b/src/widget/tool/chatactions/chataction.cpp @@ -25,7 +25,7 @@ QTextBlockFormat ChatAction::nameFormat, ChatAction::dateFormat; QString ChatAction::toHtmlChars(const QString &str) { - static QList> replaceList = {{"&","&"}, {">",">"}, {"<","<"}}; + static QList> replaceList = {{"&","&"}, {">",">"}, {"<","<"}, {" ", " "}}; // {"&","&"} should be always first QString res = str; for (auto &it : replaceList) From e0993a72f6bf4a748bf35e24da86425e038beb69 Mon Sep 17 00:00:00 2001 From: Zetok Zalbavar Date: Thu, 11 Dec 2014 18:05:52 +0000 Subject: [PATCH 16/20] Style corrections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 'if()' → 'if ()' 'for()' → 'for ()' --- src/audio.cpp | 6 ++-- src/core.cpp | 8 +++--- src/coreav.cpp | 28 +++++++++---------- src/main.cpp | 4 +-- src/misc/smileypack.cpp | 10 +++---- src/platform/timer_win.cpp | 2 +- src/platform/timer_x11.cpp | 6 ++-- src/video/cameraworker.cpp | 4 +-- src/widget/form/chatform.cpp | 8 +++--- src/widget/form/settings/generalform.cpp | 12 ++++---- src/widget/form/tabcompleter.cpp | 2 +- src/widget/maskablepixmapwidget.cpp | 2 +- src/widget/tool/chatactions/messageaction.cpp | 2 +- src/widget/widget.cpp | 18 ++++++------ 14 files changed, 56 insertions(+), 56 deletions(-) diff --git a/src/audio.cpp b/src/audio.cpp index a394e72d4..d90d5d48e 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -184,14 +184,14 @@ void Audio::playAudioBuffer(ALuint alSource, const int16_t *data, int samples, u alGetSourcei(alSource, AL_BUFFERS_QUEUED, &queued); alSourcei(alSource, AL_LOOPING, AL_FALSE); - if(processed) + if (processed) { ALuint bufids[processed]; alSourceUnqueueBuffers(alSource, processed, bufids); alDeleteBuffers(processed - 1, bufids + 1); bufid = bufids[0]; } - else if(queued < 16) + else if (queued < 16) { alGenBuffers(1, &bufid); } @@ -207,6 +207,6 @@ void Audio::playAudioBuffer(ALuint alSource, const int16_t *data, int samples, u ALint state; alGetSourcei(alSource, AL_SOURCE_STATE, &state); - if(state != AL_PLAYING) + if (state != AL_PLAYING) alSourcePlay(alSource); } diff --git a/src/core.cpp b/src/core.cpp index 05ce62261..637436fb2 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -728,7 +728,7 @@ void Core::requestFriendship(const QString& friendAddress, const QString& messag { const QString userId = friendAddress.mid(0, TOX_CLIENT_ID_SIZE * 2); - if(hasFriendWithAddress(friendAddress)) + if (hasFriendWithAddress(friendAddress)) { emit failedToAddFriend(userId, QString(tr("Friend is already added"))); } @@ -1677,7 +1677,7 @@ void Core::createGroup(uint8_t type) bool Core::hasFriendWithAddress(const QString &addr) const { // Valid length check - if(addr.length() != (TOX_FRIEND_ADDRESS_SIZE * 2)) + if (addr.length() != (TOX_FRIEND_ADDRESS_SIZE * 2)) { return false; } @@ -1689,7 +1689,7 @@ bool Core::hasFriendWithAddress(const QString &addr) const bool Core::hasFriendWithPublicKey(const QString &pubkey) const { // Valid length check - if(pubkey.length() != (TOX_CLIENT_ID_SIZE * 2)) + if (pubkey.length() != (TOX_CLIENT_ID_SIZE * 2)) { return false; } @@ -1706,7 +1706,7 @@ bool Core::hasFriendWithPublicKey(const QString &pubkey) const QString addrOrId = getFriendAddress(ids[i]); // Set true if found - if(addrOrId.toUpper().startsWith(pubkey.toUpper())) + if (addrOrId.toUpper().startsWith(pubkey.toUpper())) { found = true; break; diff --git a/src/coreav.cpp b/src/coreav.cpp index a00d54ae6..13f6dd8c0 100644 --- a/src/coreav.cpp +++ b/src/coreav.cpp @@ -207,7 +207,7 @@ void Core::playCallAudio(void* toxav, int32_t callId, const int16_t *data, uint1 alGenSources(1, &calls[callId].alSource); ToxAvCSettings dest; - if(toxav_get_peer_csettings((ToxAv*)toxav, callId, 0, &dest) == 0) + if (toxav_get_peer_csettings((ToxAv*)toxav, callId, 0, &dest) == 0) playAudioBuffer(calls[callId].alSource, data, samples, dest.audio_channels, dest.audio_sample_rate); } @@ -229,24 +229,24 @@ void Core::sendCallAudio(int callId, ToxAv* toxav) bool frame = false; ALint samples; alcGetIntegerv(Audio::alInDev, ALC_CAPTURE_SAMPLES, sizeof(samples), &samples); - if(samples >= framesize) + if (samples >= framesize) { memset(buf, 0, bufsize); // Avoid uninitialized values (Valgrind) alcCaptureSamples(Audio::alInDev, buf, framesize); frame = 1; } - if(frame) + if (frame) { int r; - if((r = toxav_prepare_audio_frame(toxav, callId, dest, framesize*2, (int16_t*)buf, framesize)) < 0) + if ((r = toxav_prepare_audio_frame(toxav, callId, dest, framesize*2, (int16_t*)buf, framesize)) < 0) { qDebug() << "Core: toxav_prepare_audio_frame error"; calls[callId].sendAudioTimer->start(); return; } - if((r = toxav_send_audio(toxav, callId, dest, r)) < 0) + if ((r = toxav_send_audio(toxav, callId, dest, r)) < 0) qDebug() << "Core: toxav_send_audio error"; } calls[callId].sendAudioTimer->start(); @@ -271,7 +271,7 @@ void Core::sendCallVideo(int callId) if (frame.w && frame.h) { int result; - if((result = toxav_prepare_video_frame(toxav, callId, videobuf, videobufsize, &frame)) < 0) + if ((result = toxav_prepare_video_frame(toxav, callId, videobuf, videobufsize, &frame)) < 0) { qDebug() << QString("Core: toxav_prepare_video_frame: error %1").arg(result); vpx_img_free(&frame); @@ -279,7 +279,7 @@ void Core::sendCallVideo(int callId) return; } - if((result = toxav_send_video(toxav, callId, (uint8_t*)videobuf, result)) < 0) + if ((result = toxav_send_video(toxav, callId, (uint8_t*)videobuf, result)) < 0) qDebug() << QString("Core: toxav_send_video error: %1").arg(result); vpx_img_free(&frame); @@ -540,7 +540,7 @@ void Core::onAvStart(void* _toxav, int32_t call_index, void* core) // This function's logic was shamelessly stolen from uTox void Core::playAudioBuffer(ALuint alSource, const int16_t *data, int samples, unsigned channels, int sampleRate) { - if(!channels || channels > 2) + if (!channels || channels > 2) { qWarning() << "Core::playAudioBuffer: trying to play on "<= framesize) + if (samples >= framesize) { memset(buf, 0, bufsize); // Avoid uninitialized values (Valgrind) alcCaptureSamples(Audio::alInDev, buf, framesize); frame = 1; } - if(frame) + if (frame) { int r; - if((r = toxav_group_send_audio(toxav_get_tox(toxav), groupId, (int16_t*)buf, + if ((r = toxav_group_send_audio(toxav_get_tox(toxav), groupId, (int16_t*)buf, framesize, av_DefaultSettings.audio_channels, av_DefaultSettings.audio_sample_rate)) < 0) { qDebug() << "Core: toxav_group_send_audio error"; diff --git a/src/main.cpp b/src/main.cpp index 3ecb63d1c..ef378bfbc 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) parser.process(a); Settings::getInstance(); // Build our Settings singleton as soon as QApplication is ready, not before - if(parser.isSet("P")) + if (parser.isSet("P")) Settings::getInstance().setCurrentProfile(parser.value("P")); sodium_init(); // For the auto-updater @@ -156,7 +156,7 @@ int main(int argc, char *argv[]) return EXIT_FAILURE; } } - else if(!ipc.isCurrentOwner() && !parser.isSet("P")) + else if (!ipc.isCurrentOwner() && !parser.isSet("P")) { time_t event = ipc.postEvent("$activate"); ipc.waitUntilProcessed(event); diff --git a/src/misc/smileypack.cpp b/src/misc/smileypack.cpp index 1ec70f954..c640fffb4 100644 --- a/src/misc/smileypack.cpp +++ b/src/misc/smileypack.cpp @@ -69,9 +69,9 @@ QList > SmileyPack::listSmileyPacks(const QStringList &p if (relPath.leftRef(2) == "..") { - if(!smileyPacks.contains(QPair(packageName, absPath))) + if (!smileyPacks.contains(QPair(packageName, absPath))) smileyPacks << QPair(packageName, absPath); - else if(!smileyPacks.contains(QPair(packageName, relPath))) + else if (!smileyPacks.contains(QPair(packageName, relPath))) smileyPacks << QPair(packageName, relPath); // use relative path for subdirectories } } @@ -97,7 +97,7 @@ bool SmileyPack::load(const QString& filename) // open emoticons.xml QFile xmlFile(filename); - if(!xmlFile.open(QIODevice::ReadOnly)) + if (!xmlFile.open(QIODevice::ReadOnly)) return false; // cannot open file /* parse the cfg file @@ -138,14 +138,14 @@ bool SmileyPack::load(const QString& filename) QPixmap pm; pm.loadFromData(getCachedSmiley(emoticon), "PNG"); - if(pm.size().width() > 0) + if (pm.size().width() > 0) emoticonSet.push_back(emoticon); stringElement = stringElement.nextSibling().toElement(); } - if(emoticonSet.size() > 0) + if (emoticonSet.size() > 0) emoticons.push_back(emoticonSet); } diff --git a/src/platform/timer_win.cpp b/src/platform/timer_win.cpp index e860a5ac6..31542f76f 100644 --- a/src/platform/timer_win.cpp +++ b/src/platform/timer_win.cpp @@ -24,7 +24,7 @@ uint32_t Platform::getIdleTime() { LASTINPUTINFO info = { 0 }; info.cbSize = sizeof(info); - if(GetLastInputInfo(&info)) + if (GetLastInputInfo(&info)) return GetTickCount() - info.dwTime; return 0; } diff --git a/src/platform/timer_x11.cpp b/src/platform/timer_x11.cpp index 5c9ac1b20..263a3b9b6 100644 --- a/src/platform/timer_x11.cpp +++ b/src/platform/timer_x11.cpp @@ -25,7 +25,7 @@ uint32_t Platform::getIdleTime() uint32_t idleTime = 0; Display *display = XOpenDisplay(NULL); - if(!display) + if (!display) { qDebug() << "XOpenDisplay(NULL) failed"; return 0; @@ -33,10 +33,10 @@ uint32_t Platform::getIdleTime() int32_t x11event = 0, x11error = 0; static int32_t hasExtension = XScreenSaverQueryExtension(display, &x11event, &x11error); - if(hasExtension) + if (hasExtension) { XScreenSaverInfo *info = XScreenSaverAllocInfo(); - if(info) + if (info) { XScreenSaverQueryInfo(display, DefaultRootWindow(display), info); idleTime = info->idle; diff --git a/src/video/cameraworker.cpp b/src/video/cameraworker.cpp index 8671d6568..da98e58f4 100644 --- a/src/video/cameraworker.cpp +++ b/src/video/cameraworker.cpp @@ -129,7 +129,7 @@ void CameraWorker::applyProps() if (!cam.isOpened()) return; - for(int prop : props.keys()) + for (int prop : props.keys()) cam.set(prop, props.value(prop)); } @@ -148,7 +148,7 @@ void CameraWorker::subscribe() void CameraWorker::unsubscribe() { - if(--refCount <= 0) + if (--refCount <= 0) { cam.release(); refCount = 0; diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 50b455289..4f2c73998 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -793,7 +793,7 @@ void ChatForm::onLoadHistory() void ChatForm::startCounter() { - if(!timer) + if (!timer) { timer = new QTimer(); connect(timer, SIGNAL(timeout()), this, SLOT(updateTime())); @@ -805,7 +805,7 @@ void ChatForm::startCounter() void ChatForm::stopCounter() { - if(timer) + if (timer) { addSystemInfoMessage(tr("Call with %1 ended. %2").arg(f->getDisplayedName(), secondsToDHMS(timeElapsed.elapsed()/1000)), @@ -834,10 +834,10 @@ QString ChatForm::secondsToDHMS(quint32 duration) int hours = (int) (duration % 24); int days = (int) (duration / 24); - if(minutes == 0) + if (minutes == 0) return cD + res.sprintf("%02ds", seconds); - if(hours == 0 && days == 0) + if (hours == 0 && days == 0) return cD + res.sprintf("%02dm %02ds", minutes, seconds); if (days == 0) diff --git a/src/widget/form/settings/generalform.cpp b/src/widget/form/settings/generalform.cpp index c7f35a2ae..0f3ab819d 100644 --- a/src/widget/form/settings/generalform.cpp +++ b/src/widget/form/settings/generalform.cpp @@ -79,7 +79,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : bodyUI->styleBrowser->addItem(tr("None")); bodyUI->styleBrowser->addItems(QStyleFactory::keys()); - if(QStyleFactory::keys().contains(Settings::getInstance().getStyle())) + if (QStyleFactory::keys().contains(Settings::getInstance().getStyle())) bodyUI->styleBrowser->setCurrentText(Settings::getInstance().getStyle()); else bodyUI->styleBrowser->setCurrentText(tr("None")); @@ -124,7 +124,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged())); connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront); connect(bodyUI->autoacceptFiles, &QCheckBox::stateChanged, this, &GeneralForm::onAutoAcceptFileChange); - if(bodyUI->autoacceptFiles->isChecked()) + if (bodyUI->autoacceptFiles->isChecked()) connect(bodyUI->autoSaveFilesDir, SIGNAL(clicked()), this, SLOT(onAutoSaveDirChange())); //theme connect(bodyUI->useEmoticons, &QCheckBox::stateChanged, this, &GeneralForm::onUseEmoticonsChange); @@ -192,7 +192,7 @@ void GeneralForm::onSetMinimizeToTray() void GeneralForm::onStyleSelected(QString style) { - if(bodyUI->styleBrowser->currentIndex() == 0) + if (bodyUI->styleBrowser->currentIndex() == 0) Settings::getInstance().setStyle("None"); else Settings::getInstance().setStyle(style); @@ -221,7 +221,7 @@ void GeneralForm::onAutoAcceptFileChange() { Settings::getInstance().setAutoSaveEnabled(bodyUI->autoacceptFiles->isChecked()); - if(bodyUI->autoacceptFiles->isChecked() == true) + if (bodyUI->autoacceptFiles->isChecked() == true) connect(bodyUI->autoSaveFilesDir, SIGNAL(clicked()), this, SLOT(onAutoSaveDirChange())); else disconnect(bodyUI->autoSaveFilesDir, SIGNAL(clicked()),this, SLOT(onAutoSaveDirChange())); @@ -231,7 +231,7 @@ void GeneralForm::onAutoSaveDirChange() { QString previousDir = Settings::getInstance().getGlobalAutoAcceptDir(); QString directory = QFileDialog::getExistingDirectory(0, tr("Choose an auto accept directory","popup title")); - if(directory.isEmpty()) + if (directory.isEmpty()) directory = previousDir; Settings::getInstance().setGlobalAutoAcceptDir(directory); @@ -299,7 +299,7 @@ void GeneralForm::reloadSmiles() QStringList smiles; smiles << ":)" << ";)" << ":p" << ":O" << ":["; //just in case... - for(int i = 0; i < emoticons.size(); i++) + for (int i = 0; i < emoticons.size(); i++) smiles.push_front(emoticons.at(i).first()); int pixSize = 30; diff --git a/src/widget/form/tabcompleter.cpp b/src/widget/form/tabcompleter.cpp index 73d3ffeef..2fbaa48c7 100644 --- a/src/widget/form/tabcompleter.cpp +++ b/src/widget/form/tabcompleter.cpp @@ -52,7 +52,7 @@ void TabCompleter::buildCompletionList() // that section is then used as the completion regex QRegExp regex(QString("^[-_\\[\\]{}|`^.\\\\]*").append(QRegExp::escape(tabAbbrev)), Qt::CaseInsensitive); - for(auto name : group->getPeerList()) + for (auto name : group->getPeerList()) if (regex.indexIn(name) > -1) completionMap[name.toLower()] = name; diff --git a/src/widget/maskablepixmapwidget.cpp b/src/widget/maskablepixmapwidget.cpp index f0015d6d0..5f8d2ea99 100644 --- a/src/widget/maskablepixmapwidget.cpp +++ b/src/widget/maskablepixmapwidget.cpp @@ -130,6 +130,6 @@ void MaskablePixmapWidget::paintEvent(QPaintEvent *) void MaskablePixmapWidget::mousePressEvent(QMouseEvent*) { - if(clickable) + if (clickable) emit clicked(); } diff --git a/src/widget/tool/chatactions/messageaction.cpp b/src/widget/tool/chatactions/messageaction.cpp index 06f27ef1d..93b8271ee 100644 --- a/src/widget/tool/chatactions/messageaction.cpp +++ b/src/widget/tool/chatactions/messageaction.cpp @@ -29,7 +29,7 @@ MessageAction::MessageAction(const QString &author, const QString &message, cons QString MessageAction::getMessage(QString div) { QString message_; - if(Settings::getInstance().getUseEmoticons()) + if (Settings::getInstance().getUseEmoticons()) message_ = SmileyPack::getInstance().smileyfied(toHtmlChars(message)); else message_ = toHtmlChars(message); diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index dcf6c67a4..4f53a4c4e 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -54,7 +54,7 @@ void toxActivateEventHandler(const QByteArray& data) { - if(data != "$activate") + if (data != "$activate") return; Widget::getInstance()->show(); Widget::getInstance()->activateWindow(); @@ -116,7 +116,7 @@ void Widget::init() if (Settings::getInstance().getShowSystemTray()){ icon->show(); - if(Settings::getInstance().getAutostartInTray() == false) + if (Settings::getInstance().getAutostartInTray() == false) this->show(); } else @@ -149,7 +149,7 @@ void Widget::init() ui->tooliconsZone->setStyleSheet(Style::resolve("QPushButton{background-color:@themeDark;border:none;}QPushButton:hover{background-color:@themeMediumDark;border:none;}")); - if(QStyleFactory::keys().contains(Settings::getInstance().getStyle()) + if (QStyleFactory::keys().contains(Settings::getInstance().getStyle()) && Settings::getInstance().getStyle() != "None") { ui->mainHead->setStyle(QStyleFactory::create(Settings::getInstance().getStyle())); @@ -348,7 +348,7 @@ QThread* Widget::getCoreThread() void Widget::closeEvent(QCloseEvent *event) { - if(Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray() == true) + if (Settings::getInstance().getShowSystemTray() && Settings::getInstance().getCloseToTray() == true) { event->ignore(); this->hide(); @@ -365,7 +365,7 @@ void Widget::changeEvent(QEvent *event) { if (event->type() == QEvent::WindowStateChange) { - if(isMinimized() && Settings::getInstance().getMinimizeToTray()) + if (isMinimized() && Settings::getInstance().getMinimizeToTray()) { this->hide(); } @@ -415,7 +415,7 @@ QList Widget::searchProfiles() QDir dir(Settings::getSettingsDirPath()); dir.setFilter(QDir::Files | QDir::NoDotAndDotDot); dir.setNameFilters(QStringList("*.tox")); - for(QFileInfo file : dir.entryInfoList()) + for (QFileInfo file : dir.entryInfoList()) out += file.completeBaseName(); return out; } @@ -591,7 +591,7 @@ void Widget::onIconClick(QSystemTrayIcon::ActivationReason reason) { switch (reason) { case QSystemTrayIcon::Trigger: - if(this->isHidden() == true) + if (this->isHidden() == true) { this->show(); this->activateWindow(); @@ -712,7 +712,7 @@ void Widget::addFriend(int friendId, const QString &userId) void Widget::addFriendFailed(const QString&, const QString& errorInfo) { QString info = QString(tr("Couldn't request friendship")); - if(!errorInfo.isEmpty()) { + if (!errorInfo.isEmpty()) { info = info + (QString(": ") + errorInfo); } @@ -733,7 +733,7 @@ void Widget::onFriendStatusChanged(int friendId, Status status) f->getFriendWidget()->updateStatusLight(); //won't print the message if there were no messages before - if(!f->getChatForm()->isEmpty() + if (!f->getChatForm()->isEmpty() && Settings::getInstance().getStatusChangeNotificationEnabled()) { QString fStatus = ""; From 4a00125f7cac03d7a8bcc7434317a64f08e5e1ed Mon Sep 17 00:00:00 2001 From: Sean Date: Thu, 11 Dec 2014 21:29:09 -0800 Subject: [PATCH 17/20] Refactor OS X updater Went and rewrote half of it in an actually sane manner, recursive functions > nested loops. --- osx/updater.go | 77 +++++++++++++++++++++++--------------------------- 1 file changed, 36 insertions(+), 41 deletions(-) diff --git a/osx/updater.go b/osx/updater.go index 45232536f..b063a251d 100644 --- a/osx/updater.go +++ b/osx/updater.go @@ -32,6 +32,41 @@ func fs_type(path string) int { return -1 } +func install(path string, pathlen int) int { + files, _ := ioutil.ReadDir(path) + + for _, file := range files { + if fs_type(path+file.Name()) == 1 { + + addpath := "" + if len(path) != pathlen { + addpath = path[pathlen:len(path)] + } + + fmt.Print("Installing: ") + fmt.Println("/Applications/qtox.app/Contents/" + addpath + file.Name()) + if _, err := os.Stat("/Applications/qtox.app/Contents/" + file.Name()); os.IsNotExist(err) { + newfile := exec.Command("/usr/libexec/authopen", "-c", "-x", "-m", "drwxrwxr-x+", "/Applications/qtox.app/Contents/"+addpath+file.Name()) + newfile.Run() + } + + cat := exec.Command("/bin/cat", path+file.Name()) + + auth := exec.Command("/usr/libexec/authopen", "-w", "/Applications/qtox.app/Contents/"+addpath+file.Name()) + auth.Stdin, _ = cat.StdoutPipe() + auth.Stdout = os.Stdout + auth.Stderr = os.Stderr + _ = auth.Start() + _ = cat.Run() + _ = auth.Wait() + + } else { + install(path+file.Name()+"/", pathlen) + } + } + return 0 +} + func main() { usr, e := user.Current() if e != nil { @@ -45,51 +80,11 @@ func main() { } fmt.Println("qTox Updater") - files, _ := ioutil.ReadDir(update_dir) killqtox := exec.Command("/usr/bin/killall", "qtox") _ = killqtox.Run() - for _, file := range files { - if fs_type(update_dir+file.Name()) == 1 { - fmt.Print("Installing: ") - fmt.Println("/Applications/qtox.app/Contents/" + file.Name()) - if _, err := os.Stat("/Applications/qtox.app/Contents/" + file.Name()); os.IsNotExist(err) { - newfile := exec.Command("/usr/libexec/authopen", "-c", "-x", "-m", "drwxrwxr-x+", "/Applications/qtox.app/Contents/"+file.Name()) - newfile.Run() - } + install(update_dir, len(update_dir)) - cat := exec.Command("/bin/cat", update_dir+file.Name()) - auth := exec.Command("/usr/libexec/authopen", "-w", "/Applications/qtox.app/Contents/"+file.Name()) - auth.Stdin, _ = cat.StdoutPipe() - auth.Stdout = os.Stdout - auth.Stderr = os.Stderr - _ = auth.Start() - _ = cat.Run() - _ = auth.Wait() - - } else { - files, _ := ioutil.ReadDir(update_dir + file.Name()) - for _, file2 := range files { - fmt.Print("Installing: ") - fmt.Println("/Applications/qtox.app/Contents/" + file.Name() + "/" + file2.Name()) - - if _, err := os.Stat("/Applications/qtox.app/Contents/" + file.Name() + "/" + file2.Name()); os.IsNotExist(err) { - newfile := exec.Command("/usr/libexec/authopen", "-c", "-x", "-m", "drwxrwxr-x+", "/Applications/qtox.app/Contents/"+file.Name()+"/"+file2.Name()) - newfile.Run() - } - - cat := exec.Command("/bin/cat", update_dir+file.Name()+"/"+file2.Name()) - auth := exec.Command("/usr/libexec/authopen", "-w", "/Applications/qtox.app/Contents/"+file.Name()+"/"+file2.Name()) - auth.Stdin, _ = cat.StdoutPipe() - auth.Stdout = os.Stdout - auth.Stderr = os.Stderr - _ = auth.Start() - _ = cat.Run() - _ = auth.Wait() - } - } - - } os.RemoveAll(update_dir) fmt.Println("Update metadata wiped, launching qTox") launchqtox := exec.Command("/usr/bin/open", "-b", "im.tox.qtox") From e2bf37c139136b064b14c15106f48adbd72d28f5 Mon Sep 17 00:00:00 2001 From: novist Date: Thu, 11 Dec 2014 21:34:12 +0200 Subject: [PATCH 18/20] Light tray icon option --- img/taskbar/{ => dark}/taskbar_busy.png | Bin img/taskbar/{ => dark}/taskbar_busy_2x.png | Bin img/taskbar/{ => dark}/taskbar_idle.png | Bin img/taskbar/{ => dark}/taskbar_idle_2x.png | Bin img/taskbar/{ => dark}/taskbar_invisible.png | Bin img/taskbar/{ => dark}/taskbar_invisible_2x.png | Bin img/taskbar/{ => dark}/taskbar_offline.png | Bin img/taskbar/{ => dark}/taskbar_offline_2x.png | Bin img/taskbar/{ => dark}/taskbar_online.png | Bin img/taskbar/{ => dark}/taskbar_online_2x.png | Bin img/taskbar/light/taskbar_busy.png | Bin 0 -> 386 bytes img/taskbar/light/taskbar_busy_2x.png | Bin 0 -> 685 bytes img/taskbar/light/taskbar_idle.png | Bin 0 -> 363 bytes img/taskbar/light/taskbar_idle_2x.png | Bin 0 -> 635 bytes img/taskbar/light/taskbar_invisible.png | Bin 0 -> 366 bytes img/taskbar/light/taskbar_invisible_2x.png | Bin 0 -> 670 bytes img/taskbar/light/taskbar_offline.png | Bin 0 -> 378 bytes img/taskbar/light/taskbar_offline_2x.png | Bin 0 -> 677 bytes img/taskbar/light/taskbar_online.png | Bin 0 -> 320 bytes img/taskbar/light/taskbar_online_2x.png | Bin 0 -> 578 bytes res.qrc | 12 ++++++++---- src/misc/settings.cpp | 12 ++++++++++++ src/misc/settings.h | 4 ++++ src/widget/form/settings/generalform.cpp | 9 +++++++++ src/widget/form/settings/generalform.h | 1 + src/widget/form/settings/generalsettings.ui | 13 ++++++++++--- src/widget/widget.cpp | 9 +++++---- 27 files changed, 49 insertions(+), 11 deletions(-) rename img/taskbar/{ => dark}/taskbar_busy.png (100%) rename img/taskbar/{ => dark}/taskbar_busy_2x.png (100%) rename img/taskbar/{ => dark}/taskbar_idle.png (100%) rename img/taskbar/{ => dark}/taskbar_idle_2x.png (100%) rename img/taskbar/{ => dark}/taskbar_invisible.png (100%) rename img/taskbar/{ => dark}/taskbar_invisible_2x.png (100%) rename img/taskbar/{ => dark}/taskbar_offline.png (100%) rename img/taskbar/{ => dark}/taskbar_offline_2x.png (100%) rename img/taskbar/{ => dark}/taskbar_online.png (100%) rename img/taskbar/{ => dark}/taskbar_online_2x.png (100%) create mode 100644 img/taskbar/light/taskbar_busy.png create mode 100644 img/taskbar/light/taskbar_busy_2x.png create mode 100644 img/taskbar/light/taskbar_idle.png create mode 100644 img/taskbar/light/taskbar_idle_2x.png create mode 100644 img/taskbar/light/taskbar_invisible.png create mode 100644 img/taskbar/light/taskbar_invisible_2x.png create mode 100644 img/taskbar/light/taskbar_offline.png create mode 100644 img/taskbar/light/taskbar_offline_2x.png create mode 100644 img/taskbar/light/taskbar_online.png create mode 100644 img/taskbar/light/taskbar_online_2x.png diff --git a/img/taskbar/taskbar_busy.png b/img/taskbar/dark/taskbar_busy.png similarity index 100% rename from img/taskbar/taskbar_busy.png rename to img/taskbar/dark/taskbar_busy.png diff --git a/img/taskbar/taskbar_busy_2x.png b/img/taskbar/dark/taskbar_busy_2x.png similarity index 100% rename from img/taskbar/taskbar_busy_2x.png rename to img/taskbar/dark/taskbar_busy_2x.png diff --git a/img/taskbar/taskbar_idle.png b/img/taskbar/dark/taskbar_idle.png similarity index 100% rename from img/taskbar/taskbar_idle.png rename to img/taskbar/dark/taskbar_idle.png diff --git a/img/taskbar/taskbar_idle_2x.png b/img/taskbar/dark/taskbar_idle_2x.png similarity index 100% rename from img/taskbar/taskbar_idle_2x.png rename to img/taskbar/dark/taskbar_idle_2x.png diff --git a/img/taskbar/taskbar_invisible.png b/img/taskbar/dark/taskbar_invisible.png similarity index 100% rename from img/taskbar/taskbar_invisible.png rename to img/taskbar/dark/taskbar_invisible.png diff --git a/img/taskbar/taskbar_invisible_2x.png b/img/taskbar/dark/taskbar_invisible_2x.png similarity index 100% rename from img/taskbar/taskbar_invisible_2x.png rename to img/taskbar/dark/taskbar_invisible_2x.png diff --git a/img/taskbar/taskbar_offline.png b/img/taskbar/dark/taskbar_offline.png similarity index 100% rename from img/taskbar/taskbar_offline.png rename to img/taskbar/dark/taskbar_offline.png diff --git a/img/taskbar/taskbar_offline_2x.png b/img/taskbar/dark/taskbar_offline_2x.png similarity index 100% rename from img/taskbar/taskbar_offline_2x.png rename to img/taskbar/dark/taskbar_offline_2x.png diff --git a/img/taskbar/taskbar_online.png b/img/taskbar/dark/taskbar_online.png similarity index 100% rename from img/taskbar/taskbar_online.png rename to img/taskbar/dark/taskbar_online.png diff --git a/img/taskbar/taskbar_online_2x.png b/img/taskbar/dark/taskbar_online_2x.png similarity index 100% rename from img/taskbar/taskbar_online_2x.png rename to img/taskbar/dark/taskbar_online_2x.png diff --git a/img/taskbar/light/taskbar_busy.png b/img/taskbar/light/taskbar_busy.png new file mode 100644 index 0000000000000000000000000000000000000000..6408db92a198a58a73b99577b6d73c18ec1f06d4 GIT binary patch literal 386 zcmV-|0e$|7P)M#c@uwl)064bI~bZ$Nf|J-X9=y?Vv){^ThT(?HPNjDbx|3|)ym&M$Py?g&p`v?Aivv(hu528VQ5dQh{C9)UxV|Bp?ptHFY z6&Zw`9Kp8UpEQ|4F)x>a9q5J6SFSP;9gWDEL5AT17zPLc1MJ)V`zV@U0>j}aFi?4Q zv~i~c7yvn6Dk7ZW*@~55jUWs%5M&sZm|$Rp1tMA^0&4<=2QxP}1CD4s08C7d$T{%+ gf6@RrX95Hm0DgE;(OMejw*UYD07*qoM6N<$f?Q;klmGw# literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_busy_2x.png b/img/taskbar/light/taskbar_busy_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..248e058605deaf28a99d81319e61ada917cc94a7 GIT binary patch literal 685 zcmV;e0#f~nP) z9$KU)d-UTM^e6ZOv>+Zt5UnDp2MLG=@uL60gPv_Y)=NFK2SG`%wn_`71qF#SOE$*1 zO?SiQ!BVoB?0frWX44QN3EQ?;VN~t^z`0ct6=3l!49gx4jLAkp-nPZjRw{yHITDyK zmYiX71Xfj%=Q+97IdM8iXkLYYE8n6^LsI3%l?nkR8C!iWl!nERNb2b*iU}=1Q{CRO z0QWHOVMZs)j+?7n4@*P|04ZvL4^F>kkbARt4G!WtP%rG(dv%aA|s?2_+Zk6ur& zERzYtpx1b>Q+cF9>KmIRZJr8?5E6hSj64CPv)fyL2v9(`R;TxISZC*C?(jg}LG%te z$Aw3eNxHC~oQcExEG0OvOaR);Y-c1qaukPk;C)7k0Ja;f^dNFf59i829k&#r^W z!$7DAG3VHNok|4=6M^K+EzvVUNPw1GpoN9S=r2ewIoi&0&uT$Q3Rv;6HXF3_m!o5s zT&V*{XcX360(KmKWm;4abLTg9P5%D?ybX)+vlkSM7NZDu8v22b=s+$|ko)j9EK0u% z(AN3O3!3LP6y$fWPv^%|Gt~AeNR`SDkSLKC{RE2w)u1jw53fmdC_5Z3egqf*n{!@0 Tm?GKp00000NkvXXu0mjfbSWst literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_idle.png b/img/taskbar/light/taskbar_idle.png new file mode 100644 index 0000000000000000000000000000000000000000..fae60333e2dcc011bc7c7ca85aa1a9f38466ca4b GIT binary patch literal 363 zcmV-x0hIoUP)M#c@uwl)064bI~bZ$Nf|J-XArf4R%>;muJH(?D3lje(6r0$qtciWiW< z^9PH7cp(EPk1~|MkU?Ifj6qn!9cO^;hq>$X`wRci?sxkC=J^h|TS07)*w63Jk-e}V zs|!AVxCnMGI}m>XvOxgEW@h05%Lz+JV2=f4@axA5hFcekh)TH_=|Dil8mD4j0e!*- zfC3H_VCVoOh9xGjdjS;MAlsnP2zC`V&FDGs{eRK`IA;O`7yxUiFXmkj=s*Af002ov JPDHLkV1npuj$Qx& literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_idle_2x.png b/img/taskbar/light/taskbar_idle_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..93b33eba46b0f4ff9123153330d72e9423efcbb1 GIT binary patch literal 635 zcmV->0)+jEP)Eq45OM>;^Q~Q+Y%R6LT&2!sSM4Ufd@A?sAv>HU+2Qruq%*uy-Pi`CA zWXU+-CZX`A9V17eVRV2b{ConD>Df)!IqJ6W4#^_uNLxf09U4ZbLFXQjSiZ35{(kFS z5gSAr0k7dO?JVaWRBgr0hDSnL3ErW$h;(KqGBS^#-NOaAC5HeS{jKeh^v5n&3C19D zQK*_Bk3g2zRp{Zsd54PtHeWiE<90p)&B(h4MtFMwM=Wdt2FG!pj-%8EiMN2lGJ%l~ z+Y|p@#U6>m>WRCSaW{N@cIf$nTXWn4GCx3)M49&!ED2a)Jx~HUCdr{refanhU;qLc V^ZDON1N{I1002ovPDHLkV1iNU68!)G literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_invisible.png b/img/taskbar/light/taskbar_invisible.png new file mode 100644 index 0000000000000000000000000000000000000000..cc45ab1f4b2cb6e16a7f48fcde4123950c2d511d GIT binary patch literal 366 zcmV-!0g?WRP)M#c@uwl)064bI~bZ$Nf|J-XALK7GotXZIcu)4;{mg+W?c8eNG!vJ3Vj z8@+bz+W)G`swfyFh6eUyHQ?H{Yj6!QQ8E7~O`HVAAh9P;o?sY&5epz^YiepT1O)}b z#d7m<8Kh;T8BU%&$v|{85(_X400r3f>(?39ty>2dTex5$!_y~E8O+ViaV8p+K!o`j zgpCc2@dhFz%mB1R1a<`|Joxzd7;r@60bpWsM9zWl|C0v5ITIkj0D9bhg~~(yn*aa+ M07*qoM6N<$f>Zm8;{X5v literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_invisible_2x.png b/img/taskbar/light/taskbar_invisible_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..19a736b3bf86fc38ae6c3b4cd8c570603443f13c GIT binary patch literal 670 zcmV;P0%84$P)T+%0Tc4oTHK?sO1%RgrZ;h1W3u6-7QjntWmtSk>L$ssswlYJmGB zNdVCcns|QIE2)%{Y=S35+nGDjYCx_(*(Rw}g|0&%EYh6JhvJRefcg%WRd9!>W9+xz zFrt4)s(?RS#xYXzwQ%YvSffgOE!IHXsg;YdM#M_TX)(*P;KTU<&-K{-W_}ZDwHg#l zMdfx*tI!^eMsRU{Ap&zajsy4RJ(Nl%Xy3HKFbw@|h{4ZJ&O~qw#<5%56+{mA55e=i zSTnyBRJN1JglunZla2Kaa-{alHjS~YqSt>J(pdv(!;kf=BA?IeBY?r%*KHA~TCRd= zn&SP{EqL*P-4E#tY?c|@zgk|gR;f5DQ#a9IshsF?}Qoq-=i;8%bF0BRv*s~AS%qW}N^07*qoM6N<$ Ef@(H4GXMYp literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_offline.png b/img/taskbar/light/taskbar_offline.png new file mode 100644 index 0000000000000000000000000000000000000000..61c18265ea4c1c95f5e357648afa6e992f0bf1ea GIT binary patch literal 378 zcmV-=0fqjFP)M#c@uwl)064bI~bZ$Nf|J-X9=y?Vv){^ThT(?HPNjDbx|3|)ym&M$Py?g&p`v?Aivv(idtxuP)0E_*6`4ZU+`?0#<1JK!A zii!-vPL6Ofsfcg}cAytNU%ARabTkqRFbog?2H3az_fh=(5*Q9Yfq}}aqm4TqzyQek zASd6SG#RWB1V9EV=H+6G2?j=3AfhEAuqIG=FmrP=;E2Wpz{KQ;oCDwgCk=peCP07z Y0Jp+K;OSB1Bme*a07*qoM6N<$g50K<4*&oF literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_offline_2x.png b/img/taskbar/light/taskbar_offline_2x.png new file mode 100644 index 0000000000000000000000000000000000000000..db79070bb6913e58ebc666f0363a7a4f430ec092 GIT binary patch literal 677 zcmV;W0$TlvP)zdr6P3@lyvor7D@{aCBE;Gt1(`Z zyKwP=BP4xu&vVcFzIP2FlCUgm7DmPT3w$<9q5@2wgJD|1z?fVVRklQe7#ly7N=S`6`t5x##_D=5; zx<*p@JQ>Vpq}w?zBfD*yTcdnOg*+~=kc@F8EJ8>Ck}&cFkdCge{vl{qAIbCn0gW+_PsrHbuDXrr z19FZN_a>8cV&3X7|D)?`-ISm!$^@Xj%ytyv1r&jG;Cx4k0Ja*e^dPWKz?3Kx5cgU2 zznq3F=Z$h%*e%gLK}bLGS^d2z6r!Tv7P}5+w?vpI}j-;@1V};RT5fC7Yv*Zvh4X+}|sDIPU7e00000 LNkvXXu0mjfkIf|( literal 0 HcmV?d00001 diff --git a/img/taskbar/light/taskbar_online.png b/img/taskbar/light/taskbar_online.png new file mode 100644 index 0000000000000000000000000000000000000000..007f0d1c96d5840bd16b283e4420347711878bd4 GIT binary patch literal 320 zcmV-G0l)rk7RCwBAV88M#c@uwl)064bI~bZ$Nf|J-XBGe7MPQ=i^Nf(?Eq^ok2xF9bJh%iWiW< zy1OeF4nEn9B4#FG%@D1g#6U0*pMH6ap&0~Dy*LV%BWS?ox45Gkn;a7Zg#g0>kdT3gydT&$n4dvxY?{$?;QRli0dUR)2rvMqV*Cw6 S6KVMX0000i z=Y*RN&JxbgcYc!qFk#zvRfuIz1D{nPE(qs2AzeEhsFRB$_|T?fsFZ}HhM1I_*ev07idkFKX1=c#JIJBQWAK~`x#vw6@*HOn2^Wz?l){bF+`9S>|V({zEHq)$07*qoM6N<$f@F#T9smFU literal 0 HcmV?d00001 diff --git a/res.qrc b/res.qrc index 40b6d28f2..5db98f01e 100644 --- a/res.qrc +++ b/res.qrc @@ -37,10 +37,14 @@ img/status/dot_online.png img/status/dot_online_2x.png img/status/dot_online_notification.png - img/taskbar/taskbar_online_2x.png - img/taskbar/taskbar_idle_2x.png - img/taskbar/taskbar_busy_2x.png - img/taskbar/taskbar_offline_2x.png + img/taskbar/dark/taskbar_online_2x.png + img/taskbar/dark/taskbar_idle_2x.png + img/taskbar/dark/taskbar_busy_2x.png + img/taskbar/dark/taskbar_offline_2x.png + img/taskbar/light/taskbar_online_2x.png + img/taskbar/light/taskbar_idle_2x.png + img/taskbar/light/taskbar_busy_2x.png + img/taskbar/light/taskbar_offline_2x.png img/transfer.png smileys/cylgom/angel.png smileys/cylgom/angry.png diff --git a/src/misc/settings.cpp b/src/misc/settings.cpp index e04dc7f49..b14fe2e34 100644 --- a/src/misc/settings.cpp +++ b/src/misc/settings.cpp @@ -167,6 +167,7 @@ void Settings::load() timestampFormat = s.value("timestampFormat", "hh:mm").toString(); minimizeOnClose = s.value("minimizeOnClose", false).toBool(); minimizeToTray = s.value("minimizeToTray", false).toBool(); + lightTrayIcon = s.value("lightTrayIcon", false).toBool(); useNativeStyle = s.value("nativeStyle", false).toBool(); useEmoticons = s.value("useEmoticons", true).toBool(); statusChangeNotificationEnabled = s.value("statusChangeNotificationEnabled", false).toBool(); @@ -315,6 +316,7 @@ void Settings::save(QString path, bool writeFriends) s.setValue("timestampFormat", timestampFormat); s.setValue("minimizeOnClose", minimizeOnClose); s.setValue("minimizeToTray", minimizeToTray); + s.setValue("lightTrayIcon", lightTrayIcon); s.setValue("nativeStyle", useNativeStyle); s.setValue("useEmoticons", useEmoticons); s.setValue("themeColor", themeColor); @@ -530,6 +532,16 @@ void Settings::setMinimizeToTray(bool newValue) minimizeToTray = newValue; } +bool Settings::getLightTrayIcon() const +{ + return lightTrayIcon; +} + +void Settings::setLightTrayIcon(bool newValue) +{ + lightTrayIcon = newValue; +} + bool Settings::getStatusChangeNotificationEnabled() const { return statusChangeNotificationEnabled; diff --git a/src/misc/settings.h b/src/misc/settings.h index 7ebe39f66..848ade407 100644 --- a/src/misc/settings.h +++ b/src/misc/settings.h @@ -61,6 +61,9 @@ public: bool getMinimizeToTray() const; void setMinimizeToTray(bool newValue); + + bool getLightTrayIcon() const; + void setLightTrayIcon(bool newValue); QString getStyle() const; void setStyle(const QString& newValue); @@ -244,6 +247,7 @@ private: bool autostartInTray; bool closeToTray; bool minimizeToTray; + bool lightTrayIcon; bool useEmoticons; bool checkUpdates; bool showInFront; diff --git a/src/widget/form/settings/generalform.cpp b/src/widget/form/settings/generalform.cpp index c7f35a2ae..3f54ec188 100644 --- a/src/widget/form/settings/generalform.cpp +++ b/src/widget/form/settings/generalform.cpp @@ -62,6 +62,8 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : bodyUI->closeToTray->setEnabled(showSystemTray); bodyUI->minimizeToTray->setChecked(Settings::getInstance().getMinimizeToTray()); bodyUI->minimizeToTray->setEnabled(showSystemTray); + bodyUI->lightTrayIcon->setChecked(Settings::getInstance().getLightTrayIcon()); + bodyUI->lightTrayIcon->setEnabled(showSystemTray); bodyUI->statusChanges->setChecked(Settings::getInstance().getStatusChangeNotificationEnabled()); bodyUI->useEmoticons->setChecked(Settings::getInstance().getUseEmoticons()); bodyUI->autoacceptFiles->setChecked(Settings::getInstance().getAutoSaveEnabled()); @@ -120,6 +122,7 @@ GeneralForm::GeneralForm(SettingsWidget *myParent) : connect(bodyUI->startInTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetAutostartInTray); connect(bodyUI->closeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetCloseToTray); connect(bodyUI->minimizeToTray, &QCheckBox::stateChanged, this, &GeneralForm::onSetMinimizeToTray); + connect(bodyUI->lightTrayIcon, &QCheckBox::stateChanged, this, &GeneralForm::onSetLightTrayIcon); connect(bodyUI->statusChanges, &QCheckBox::stateChanged, this, &GeneralForm::onSetStatusChange); connect(bodyUI->autoAwaySpinBox, SIGNAL(editingFinished()), this, SLOT(onAutoAwayChanged())); connect(bodyUI->showInFront, &QCheckBox::stateChanged, this, &GeneralForm::onSetShowInFront); @@ -185,6 +188,12 @@ void GeneralForm::onSetCloseToTray() Settings::getInstance().setCloseToTray(bodyUI->closeToTray->isChecked()); } +void GeneralForm::onSetLightTrayIcon() +{ + Settings::getInstance().setLightTrayIcon(bodyUI->lightTrayIcon->isChecked()); + Widget::getInstance()->updateTrayIcon(); +} + void GeneralForm::onSetMinimizeToTray() { Settings::getInstance().setMinimizeToTray(bodyUI->minimizeToTray->isChecked()); diff --git a/src/widget/form/settings/generalform.h b/src/widget/form/settings/generalform.h index ec41fb0ad..a560cf7ae 100644 --- a/src/widget/form/settings/generalform.h +++ b/src/widget/form/settings/generalform.h @@ -37,6 +37,7 @@ private slots: void onSetShowSystemTray(); void onSetAutostartInTray(); void onSetCloseToTray(); + void onSetLightTrayIcon(); void onSmileyBrowserIndexChanged(int index); void onUDPUpdated(); void onProxyAddrEdited(); diff --git a/src/widget/form/settings/generalsettings.ui b/src/widget/form/settings/generalsettings.ui index 4df38f286..47258e049 100644 --- a/src/widget/form/settings/generalsettings.ui +++ b/src/widget/form/settings/generalsettings.ui @@ -39,8 +39,8 @@ 0 0 - 509 - 849 + 513 + 819 @@ -109,7 +109,7 @@ - + @@ -152,6 +152,13 @@ + + + + Light icon + + + diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index dcf6c67a4..2bf189e75 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -300,14 +300,15 @@ void Widget::updateTrayIcon() return; QString status = ui->statusButton->property("status").toString(); QString pic; + QString color = Settings::getInstance().getLightTrayIcon() ? "light" : "dark"; if (status == "online") - pic = ":img/taskbar/taskbar_online_2x.png"; + pic = ":img/taskbar/" + color + "/taskbar_online_2x.png"; else if (status == "away") - pic = ":img/taskbar/taskbar_idle_2x.png"; + pic = ":img/taskbar/" + color + "/taskbar_idle_2x.png"; else if (status == "busy") - pic = ":img/taskbar/taskbar_busy_2x.png"; + pic = ":img/taskbar/" + color + "/taskbar_busy_2x.png"; else - pic = ":img/taskbar/taskbar_offline_2x.png"; + pic = ":img/taskbar/" + color + "/taskbar_offline_2x.png"; icon->setIcon(QIcon(pic)); } From 22002efc093d53cf0b85e84604371538a64cb57e Mon Sep 17 00:00:00 2001 From: Sabri Date: Sat, 13 Dec 2014 09:26:37 +0100 Subject: [PATCH 19/20] Huge French translation fixes --- translations/fr.ts | 140 ++++++++++++++++++++++----------------------- 1 file changed, 70 insertions(+), 70 deletions(-) diff --git a/translations/fr.ts b/translations/fr.ts index 206cf9356..48cc108ea 100644 --- a/translations/fr.ts +++ b/translations/fr.ts @@ -76,13 +76,13 @@ Add Friends - Ajouter des amis + Ajouter des contacts Tox ID Tox ID of the person you're sending a friend request to - ID Tox + Tox ID @@ -93,25 +93,25 @@ Send friend request - Envoyer la demande d'ami + Envoyer la demande de contact Tox me maybe? Default message in friend requests if the field is left blank. Write something appropriate! - Je souhaiterais vous ajouter à mes contacts + Je souhaiterais vous ajouter à mes contacts. Please fill in a valid Tox ID Tox ID of the friend you're sending a friend request to - Merci de remplir un ID Tox valide + Merci d'entrer un Tox ID valide You can't add yourself as a friend! When trying to add your own Tox ID as friend - Vous ne pouvez pas vous ajouter vous même en temps qu'ami! + Vous ne pouvez pas vous ajouter vous-même ! @@ -123,19 +123,19 @@ Ignorer le proxy et se connecter directement à Internet ? qTox needs to use the Tox DNS, but can't do it through a proxy Ignore the proxy and connect to the Internet directly ? - qTox as besoin d'utiliser le DNS Tox, mais ne peut pas le faire avec un proxy + qTox a besoin d'utiliser le DNS Tox, mais ne peut pas le faire avec un proxy Ignorer le proxy et se connecter directement à Internet ? This Tox ID does not exist DNS error - Cet ID Tox n'existe pas + Ce Tox ID n'existe pas This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - Cette addresse n'existe pas + Cette adresse n'existe pas Error while looking up DNS @@ -178,22 +178,22 @@ Ignorer le proxy et se connecter directement à Internet ? Bad Idea - Mauvaise Idée + Mauvaise idée You're trying to send a special (sequential) file, that's not going to work! - Vous êtes en train d'essayer d'envoyer un fichier spécial (sequentiel), ça ne marchera pas! + Vous êtes en train d'essayer d'envoyer un fichier spécial (sequentiel), ça ne fonctionnera pas ! %1 calling - %1 appelle + %1 appel %1 stopped calling - %1a arreté l'appel + %1 a arreté l'appel @@ -229,7 +229,7 @@ Ignorer le proxy et se connecter directement à Internet ? Toxing on qTox - Toxer avec qTox + Je Tox sur qTox @@ -239,7 +239,7 @@ Ignorer le proxy et se connecter directement à Internet ? Friend is already added - Cet ami est déjà dans cos contact + Ce contact est déjà dans vos contacts @@ -249,7 +249,7 @@ Ignorer le proxy et se connecter directement à Internet ? The .tox file is encrypted, but encryption was not checked, continuing regardless. - Le fichier .tox est chiffré, mais l'encryption n'as pas été activée. Le problème sera ignoré. + Le fichier .tox est chiffré, mais le chiffrement n'a pas été activé. Le problème sera ignoré. @@ -261,14 +261,14 @@ Ignorer le proxy et se connecter directement à Internet ? Password error - Mod de passe invalide + Mot de passe invalide Failed to setup password. Empty password. - Impossible de mettre ne place le mot de passe. + Impossible de mettre en place le mot de passe. Le mot de passe est vide. @@ -289,7 +289,7 @@ Le mot de passe est vide. Wrong password has been entered - Un mauvais mot de passe à été entré + Un mauvais mot de passe a été entré @@ -316,7 +316,7 @@ Voulez-vous essayer un mot de passe différent? Due to incorret password logging will be disabled - À cause d'un mauvais mot de passe, l'historique sera désactivé + Due à l'utilisation d'un mauvais mot de passe, l'historique sera désactivé @@ -326,7 +326,7 @@ Voulez-vous essayer un mot de passe différent? Will be saved without encryption! - L'historique sera sauvegardé sans être chiffré! + L'historique sera sauvegardé sans être chiffré ! @@ -380,12 +380,12 @@ Voulez-vous essayer un mot de passe différent? Friend request Title of the window to aceept/deny a friend request - Demande d'ami + Demande de contact Someone wants to make friends with you - Quelqu'un veut devenir votre ami + Quelqu'un vient de vous ajouter dans sa liste de contacts @@ -395,7 +395,7 @@ Voulez-vous essayer un mot de passe différent? Friend request message: - Message de demande d'ami: + Message au sujet de la demande: @@ -422,7 +422,7 @@ Voulez-vous essayer un mot de passe différent? Copy friend ID Menu to copy the Tox ID of that friend - Copier l'ID ami + Copier l'ID du contact @@ -458,7 +458,7 @@ Voulez-vous essayer un mot de passe différent? Disable global auto accept context menu entry - Désactiver l'acceptation automatique de fichier + Désactiver le téléchargement automatique de fichiers @@ -470,7 +470,7 @@ Voulez-vous essayer un mot de passe différent? Remove friend Menu to remove the friend from our friendlist - Supprimer ami + Supprimer ce contact @@ -502,7 +502,7 @@ Voulez-vous essayer un mot de passe différent? You can't disconnect while a call is active! popup text - Vous ne pouvez pas vous déconnecter avec un appel en cours! + Vous ne pouvez pas vous déconnecter avec un appel en cours ! @@ -520,7 +520,7 @@ Voulez-vous essayer un mot de passe différent? The translation may not load until qTox restarts. - La translation peut ne pas se charger jusqu'à ce que qTox redémarre. + La traduction peut ne pas prendre effet immédiatement. Redémarrez qTox si ce n'est pas le cas. Translation: @@ -550,7 +550,7 @@ Voulez-vous essayer un mot de passe différent? Minimize to tray - Minimizer dans la barre d'état + Minimiser dans la barre d'état @@ -564,7 +564,7 @@ Voulez-vous essayer un mot de passe différent? Auto away after (0 to disable): - Auto-absent après (0 pour désactiver): + Se rendre absent après (0 pour désactiver): @@ -620,7 +620,7 @@ Voulez-vous essayer un mot de passe différent? Reconnect reconnect button - Reconnection + Se reconnecter @@ -640,7 +640,7 @@ Voulez-vous essayer un mot de passe différent? Focus qTox when a message is received - Montrer qTox quand un message est reçu + Montrer la fênetre qTox quand un message est reçu @@ -713,7 +713,7 @@ Voulez-vous essayer un mot de passe différent? This allows, e.g., toxing over Tor. It adds load to the Tox network however, so use only when necessary. force tcp checkbox tooltip - Permet par exemple d'utiliser Tox à travers Tor, mais ce n'est à utiliser que si nécessaire, car cela ralenti le réseau Tox. + Permet par exemple d'utiliser Tox à travers Tor, mais ce n'est à utiliser que si nécessaire car cela ralenti le réseau Tox. Disable UDP (not recommended) @@ -748,7 +748,7 @@ Voulez-vous essayer un mot de passe différent? Smileys - Emoticones + Émoticônes @@ -768,7 +768,7 @@ Voulez-vous essayer un mot de passe différent? Toggle speakers volume - Couper les haut parleurs + Couper les haut-parleurs @@ -818,7 +818,7 @@ Voulez-vous essayer un mot de passe différent? 0 users in chat - 0 personnes + Le groupe est vide @@ -844,7 +844,7 @@ Voulez-vous essayer un mot de passe différent? You can't switch profiles while a call is active! popup text - Vous ne pouvez pas changer de profil quand un appel est en cours! + Vous ne pouvez pas changer de profil quand un appel est en cours ! @@ -894,7 +894,7 @@ Voulez-vous essayer un mot de passe différent? The file you chose could not be written to. - Le fichier que vous avez choisi n'as pas pu être écrit. + Le fichier que vous avez choisi n'es pas disponible en écriture. @@ -912,7 +912,7 @@ Voulez-vous essayer un mot de passe différent? Deletion imminent! deletion confirmation title - Suppression imminente! + Suppression imminente ! @@ -936,13 +936,13 @@ Voulez-vous essayer un mot de passe différent? Ignoring non-Tox file popup title - Fichier non-Tox ignoré + Fichier incompatible avec Tox ignoré Warning: you've chosen a file that is not a Tox save file; ignoring. popup text - Attention: Vous avez sélectionné un fichier qui n'est pas une sauvegarde Tox: il sera ignoré. + Attention: Vous avez sélectionné un fichier qui n'est pas une sauvegarde Tox, il sera ignoré. @@ -986,7 +986,7 @@ Voulez-vous essayer un mot de passe différent? Your Tox ID (click to copy) - Votre ID Tox (cliquez pour copier) + Votre Tox ID (cliquez pour copier) @@ -1033,7 +1033,7 @@ Voulez-vous essayer un mot de passe différent? This is useful to remain safe on public computers delete profile button tooltip - Util pour sécuriser sur un ordinateur public + Utile pour rester en sécurité sur un ordinateur public @@ -1045,7 +1045,7 @@ Voulez-vous essayer un mot de passe différent? New Tox ID new profile button - Nouvel ID Tox + Nouvel Tox ID @@ -1093,12 +1093,12 @@ Voulez-vous essayer un mot de passe différent? Add friends - Ajouter des amis + Ajouter des contacts Create a group chat - Creer un groupe + Créer un groupe @@ -1125,7 +1125,7 @@ Voulez-vous essayer un mot de passe différent? Tox video - Vidéo tox + Vidéo Tox @@ -1145,7 +1145,7 @@ Voulez-vous essayer un mot de passe différent? You already have history log file encrypted with different password Do you want to delete old history file? Vous avez déjà un historique chiffré avec un autre mot de passe -Voulez vous supprimer l'ancien historique? +Voulez vous supprimer l'ancien historique ? @@ -1192,7 +1192,7 @@ Voulez vous supprimer l'ancien historique? Warning: you've chosen a file that is not a Tox save file; ignoring. popup text - Attention: Vous avez sélectionné un fichier qui n'est pas une sauvegarde Tox: il sera ignoré. + Attention: Vous avez sélectionné un fichier qui n'est pas une sauvegarde Tox, il sera ignoré. @@ -1233,12 +1233,12 @@ Voulez vous supprimer l'ancien historique? An update is available, do you want to download it now ? It will be installed when qTox restarts. Une mise à jour est disponible, voulez vous la télécharger maintenant ? -Elle sera installée au prochain démarrage de qTox +Elle sera installée au prochain démarrage de qTox. Tox URI to parse - URI Tox à utiliser + URL Tox à utiliser @@ -1255,7 +1255,7 @@ Elle sera installée au prochain démarrage de qTox Repeat Password - Répetez le mot de passe + Retapez le mot de passe @@ -1270,13 +1270,13 @@ Elle sera installée au prochain démarrage de qTox This address does not exist The DNS gives the Tox ID associated to toxme.se addresses - Cette addresse n'existe pas + Cette adresse n'existe pas Error while looking up DNS The DNS gives the Tox ID associated to toxme.se addresses - Erreur en consultant le serveur DNS + Une erreur s'est produite en consultant le serveur DNS @@ -1316,22 +1316,22 @@ Elle sera installée au prochain démarrage de qTox Add a friend Title of the window to add a friend through Tox URI - Ajouter un ami + Ajouter un contact Do you want to add %1 as a friend ? - Voulez-vous ajouter %1 à vos amis ? + Voulez-vous ajouter %1 à vos contacts ? User ID: - ID utilisateur: + ID d'utilisateur: Friend request message: - Message de demande d'ami: + Associer un message à cette demande: @@ -1354,7 +1354,7 @@ Elle sera installée au prochain démarrage de qTox away - indisponnible + absent busy @@ -1368,7 +1368,7 @@ Elle sera installée au prochain démarrage de qTox Away - Indisponible + Absent @@ -1383,7 +1383,7 @@ Elle sera installée au prochain démarrage de qTox Change status to: - Changer le status en: + Changer le status par: @@ -1395,7 +1395,7 @@ Elle sera installée au prochain démarrage de qTox Away Button to set your status to 'Away' - Indisponible + Absent @@ -1443,18 +1443,18 @@ Elle sera installée au prochain démarrage de qTox Toxcore failed to start, the application will terminate after you close this message. - Toxcore n'as pas pu démarrer correctement, l'application va quitter quand vous fermerez ce message. + ToxCore n'as pas pu démarrer correctement, l'application va s'arrêter quand vous fermerez cette alerte. toxcore failed to start with your proxy settings. qTox cannot run; please modify your settings and restart. popup text - Toxcore n'as pas pu démarrer avec ces paramètres de proxy, qTox ne peut pas continuer; merci de modifier vos paramètres et redémarrer. + ToxCore n'as pas pu démarrer avec ces paramètres proxy. Merci de modifier ou désactiver vos paramètres et redémarrer l'application. Add friend - Ajouter un ami + Ajouter un contact @@ -1469,13 +1469,13 @@ Elle sera installée au prochain démarrage de qTox Couldn't request friendship - Impossible de demander en ami + Impossible d'envoyer la demande de contact away contact status - indisponnible + absent @@ -1487,7 +1487,7 @@ Elle sera installée au prochain démarrage de qTox offline contact status - déconnecté + hors ligne @@ -1510,7 +1510,7 @@ Elle sera installée au prochain démarrage de qTox Message failed to send - Le message n'as pas pu être envoyé + Le message n'as pu être envoyé From 84dea5e12cda03335b868f4930dc9d33e83a60d8 Mon Sep 17 00:00:00 2001 From: Dubslow Date: Sat, 13 Dec 2014 12:18:11 -0600 Subject: [PATCH 20/20] Revert "fix #902" @apprb #932 This reverts commit 13306031e238258a3faf2909a01987cf093765dc. --- src/widget/tool/chatactions/chataction.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widget/tool/chatactions/chataction.cpp b/src/widget/tool/chatactions/chataction.cpp index 00f872106..a2aa3e140 100644 --- a/src/widget/tool/chatactions/chataction.cpp +++ b/src/widget/tool/chatactions/chataction.cpp @@ -25,7 +25,7 @@ QTextBlockFormat ChatAction::nameFormat, ChatAction::dateFormat; QString ChatAction::toHtmlChars(const QString &str) { - static QList> replaceList = {{"&","&"}, {">",">"}, {"<","<"}, {" ", " "}}; // {"&","&"} should be always first + static QList> replaceList = {{"&","&"}, {">",">"}, {"<","<"}}; QString res = str; for (auto &it : replaceList)