From 2b290d6db11957f01f9136fa9b0e91244e0aab16 Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Tue, 22 Aug 2023 16:02:06 +0200 Subject: [PATCH 1/3] Add startup and close application option --- .../SysTray-X-app/languages/SysTray-X.de.qm | Bin 7330 -> 7843 bytes .../SysTray-X-app/languages/SysTray-X.de.ts | 61 ++++++-- .../SysTray-X-app/languages/SysTray-X.el.qm | Bin 7694 -> 8217 bytes .../SysTray-X-app/languages/SysTray-X.el.ts | 63 +++++++-- .../languages/SysTray-X.en-US.qm | Bin 6742 -> 7249 bytes .../languages/SysTray-X.en-US.ts | 65 +++++++-- .../SysTray-X-app/languages/SysTray-X.it.qm | Bin 7400 -> 7967 bytes .../SysTray-X-app/languages/SysTray-X.it.ts | 63 +++++++-- .../SysTray-X-app/languages/SysTray-X.nl.qm | Bin 7178 -> 7691 bytes .../SysTray-X-app/languages/SysTray-X.nl.ts | 61 ++++++-- .../languages/SysTray-X.pt-BR.qm | Bin 7122 -> 7677 bytes .../languages/SysTray-X.pt-BR.ts | 61 ++++++-- .../SysTray-X-app/languages/SysTray-X.ru.qm | Bin 7187 -> 7732 bytes .../SysTray-X-app/languages/SysTray-X.ru.ts | 61 ++++++-- app/SysTray-X/SysTray-X-app/preferences.cpp | 113 +++++++++++++++ app/SysTray-X/SysTray-X-app/preferences.h | 96 +++++++++++++ app/SysTray-X/SysTray-X-app/preferences.ui | 116 +++++++++++++++- .../SysTray-X-app/preferencesdialog.cpp | 123 +++++++++++++++++ .../SysTray-X-app/preferencesdialog.h | 59 ++++++++ app/SysTray-X/SysTray-X-app/systrayx.cpp | 53 +++++++ app/SysTray-X/SysTray-X-app/systrayx.h | 10 ++ app/SysTray-X/SysTray-X-app/systrayxlink.cpp | 121 ++++++++++++++++ app/SysTray-X/SysTray-X-app/systrayxlink.h | 32 ++++- webext/_locales/de/messages.json | 40 ++++++ webext/_locales/el/messages.json | 40 ++++++ webext/_locales/en-US/messages.json | 40 ++++++ webext/_locales/it/messages.json | 40 ++++++ webext/_locales/nl/messages.json | 40 ++++++ webext/_locales/pt-BR/messages.json | 40 ++++++ webext/_locales/ru/messages.json | 40 ++++++ webext/background.js | 66 ++++++++- webext/css/options.css | 33 +++++ webext/js/defaults.js | 19 +++ webext/options.html | 69 +++++++++- webext/options.js | 130 ++++++++++++++++++ 35 files changed, 1644 insertions(+), 111 deletions(-) diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm index 733666c845a7f6b4303bc8fbedf5b96774b206c2..f5c58e6098316f3027cc381f33ffb6a028a6d92d 100644 GIT binary patch delta 969 zcmZ`%Ye-XJ7=F&#IcLZ1Y|Gm*HOtBj31(SpN9(B1&4@Qfcbg&e%vw{1II& zYpr`xsolW{*2N4WtVR7Ox=45YQ~ns#BD0&8^{zlLio^NdkMBIs`#kUSotA>uqFtkz zi)RG;c2; zIRDg?dX!$hLi_>DFG~dC?_lB94#IuK;*vRl-ijqZ`T%V!R=mvx#}`cCZul6JGF_uT@Lo7mpU{Q#S*GDLcT*meH* zNv6--5q3SP-R6$1jk=o7J#usdTpiCf({XAUFZb(7uj2$vqEK5gph=Q;rYpR- z7*~#ZNQ&6;o`6D|*jYdVvMy%JynY(MuX!0io>I-wyy|{Tp`6ret6u{nv$ffc8)>c? z+OnT#DGast`L_pTB&dy)oFD^MDbBWucn#9b$J;26d}+~25*}fb9KGFitFNU)3>juF zNKZO?%E-|U-JAtsx~3_5?sAaQHtUNzRaCF(?NI~rYQ3+GewPHje&fD&GFD=c3Y!T3 z%+RAyVyY8{4-vXvE>uOSKMU?*2UHVem{0>R?6lh8p|v8q7l{smUe4rnx&wYqYE}Xv zUG&w1>fdOE*1{p2#^kE-RNHG5cVQGA+$rQR#uUsZxC>TP!cDtqwZj;FhKMnrN9gYwQ$1nx3?i$Y_X%(ZBMs2osKH2MX3t-b!kDL*rPLL{$rwa z>f|8{Uc4a-j$sqVne7g{RTaB{FqzR&*x78>+^ delta 622 zcmXAmYe-XJ7{~wT?7Z*JJjZj~wOL?PqDa)h&@vK|aG_yl&^|~QrQN7VNJx^L1yZ^) zWn~hPcqvOLiiy=ItFaCGkaSU@n?|NZ}--`kVlo!6QsRJSd3 zcvD6pUG)LH57JBpU@8Y&`3q1SU>y;_+JvR2B*5vy3ac5wA{6JI16a@h>AZpBySFL- z78}a!fTbTBn}T$28k^jOKyo2A|DFVr8d3f^2e3^GE_DddjtaST-SEOZB#iu-0_18j z<5?A;4v6bLBQ$5l+AC)P`y;WhJq*mdFHY<^4~RJiJuv~Klo$pln*l?y)G*Zm2$@nx z(LDmok}irz2p}qT?wSMLCq3UkPWPsm)J4as4a_m40p>ckAf9fc4I^wv{4y18W0e^+ z*?WJfkm2QS_HZrnNF6NVs{tIGvlil#$9U#)I=6edOCA7>7G98^O5$31=NF3Gm+>yo z7816d2adfWk;BGS{UPE@7$5J>A|YRmPqHsjE-E+cKj=N1e0nj7S3GhkkKVDZF`X=$ zAu(u6dTm`oMtRbk@fQ?4p(qDF5=e#O^3~Gm(~np+X)r)yk8AlM1IA(8v|i+)(}`{%oh9)IQNI;TY;!4mh3k< K4+ln_!|Wentfoc) diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts index fa5d088..d246c6a 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts @@ -336,31 +336,58 @@ + Apps + Anwendungen + + + + Close application + Stopanwendung + + + + + Browse... + Durchsuche... + + + + + Arguments: + Argumente: + + + + Startup application + Startanwendung + + + Mail Nachrichten - + Use the preferences dialog in Thunderbird to select the accounts and folders Verwenden Sie den Einstellungsdialog in Thunderbird, um die Konten und Ordner auszuwählen - + Debug Debug - + Display debug window Debug-Fenster anzeigen - + Save Speichern - + Cancel Annullieren @@ -371,42 +398,48 @@ Hauptfenster minimieren - - + + Open Image Bild öffnen - - + + Image Files (*.png *.jpg *.bmp) Bilddateien (*.png *.jpg *.bmp) + + + + Select application + Anwendung auswählen + SysTrayX - + &Show/Hide &Anzeigen/Verbergen - + &Preferences &Einstellungen - + &About &Über - + &Quit &Beenden - + Close Schließen diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm index 5c2a6005e3de0b05e29cb89e629a2482de80b60f..848bb7aef50f7cec736fce21026c334528f36fc0 100644 GIT binary patch delta 990 zcmZXS3rJI87>3`o|D3bwj$6*$rgoVocHgMzW=1+m%dQqlbTQ0UEmjVp=1eoK~hv=q?alpQO-3WPq9wJhBM$QCela|@t3R{T+G z77hF!SvFxk;`c4~VWsf*ZC)D7E$|2ExJR|1ZBvnpO9*R<1hmtHg-u6DeVC9QMY}xG zmB>Zq%JYRwv1Bex5E=`eKuEAC6cL2~GO@3b&h^=%NpXs%OcmoILntM)xbFkC>j#Mk zQf5&)Yeje7Ga#TuY)aZoI#1=JPBsv%UOwC0OtxP6jV1jljmPraL+QI;grY$GmG*qa z)`(Q(BA}bX^N|Y0+lq$KWS|@4w`pP<4RFZ+c~BpUb%6g1?*kH;t5hz3O@Q;2rotSW ztDiEt{RE{Eu6){hmq1#T%?XDIz$IxGZJ@sOQtX2Q%EKy6n@7fht0Y^Cm#+1zw2LEP z?v?b&^Cp=lyAm*dN)t_XOU0jdQ{1~%V;dL=DpeLAfUZ=PRZ0I#utAkmeulsj)KYX2 z-K$gm#z~2>x9ZQ$biaJN73ewDT`C*Ghih0FyT)qRWptmv?=P~20Eiy#Fb^EsNSo_cFZ#fS2D)~Zej%}k5UlJ4v(56*EB*#o{0?3K delta 618 zcmXAmT}V@L7{;G-&i|a9?VO#Xo10EyQpqBs)(2^g0=;mdQ92_pLS~eG(KmWw32I-E zT2`#gA{u6833hYBa#YB07ePTQ6Z*glLr|DTqDaG8uXOdo3(x!fp69(=*uM3Kn>&3o z*V&Z*1?*`XAiV)g1_ARJ#DWDt>4n%C12RHbeU$;OGuUWP2e1sK`L_Wv_J6t(C>?l7 z`Z??fH~{-|>}rVsoQiUPF<_lSMQWDrfUg$x=@}sXqR>Cv3J8~2^L#TI7O~Ef z*95kk-RI8{=m-lRS^{lhpN@|LY>mjeXq`PQI+Ge;J0<2!=4DXAxVV4vF&XOO0S`?H zp)$_XBn8F6LgHajG1gWGWcnnrow&??Y2{klJHwJ!egT+#Qc<1@u(+l06v>?dsjG4i z71kvg=f45!Nz>-uC~;?*-W^^AXol&-h6kiulw0*V${m!iEvMp@gdE*McO3i7S4xsp z47x4f?JKBJ$?{|LGYJb6<-|_{xuAI48Yuu%0)L+YX({FFpN|yGtxWqLQDCcTtGP_N zYPGD2jM6I9dmMpqW9mp`oQ%WP;+>NO+@rC6gNhy0wnYU3UZ)*g@^cJm^?kKOYG2SA zJ6=&`eqHso6JfbNUPny`6Z-FIdL=u16v(MHhWPc&XfS!W(1hG)B+PLwlΝέα - + + Close application + Κλείσιμο αίτησης + + + + + Browse... + ξεφυλλίζω... + + + + + Arguments: + Επιχειρήματα: + + + + Startup application + Εφαρμογή εκκίνησης + + + Mail Αλληλογραφία - + Use the preferences dialog in Thunderbird to select the accounts and folders Χρησιμοποιήστε το παράθυρο διαλόγου Προτιμήσεις Thunderbird για να επιλέξετε λογαριασμούς και φακέλους - + Debug Αποσφαλμάτωση - + Display debug window Προβολή παραθύρου αποσφαλμάτωσης @@ -357,52 +379,63 @@ Ελαχιστοποίηση στην περιοχή ειδοποιήσεων - + + Apps + Εφαρμογές + + + Save Αποθήκευση - + Cancel Άκυρο - - + + Open Image Άνοιγμα εικόνας - - + + Image Files (*.png *.jpg *.bmp) Αρχεία εικόνας (*.png *.jpg *.bmp) + + + + Select application + επιλέξτε εφαρμογή + SysTrayX - + &Show/Hide &Εμφάνιση/Απόκρυψη - + &Preferences &Προτιμήσεις - + &About &Σχετικά - + &Quit &Έξοδος - + Close Κλείσιμο diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.qm index b5531c699b4b393ea3b4c5159d8c1d0cdcff3f53..aaacd993fe857aa1b08fd97a4604b8b4e54ed273 100644 GIT binary patch delta 911 zcmZ8fYe-XJ7=F&#IcH~{(^<~5<)y31qQXgc69TtT(dc55q=m8OGHL2^M~n)kAM2ti z%1kAqQo2KbT6D39kc=XtD}h}k34=v0T18}8y(<_IA0ID#-}8LW^Stl(Y~iEKwyDhV z_Gy;JiB53)e1PsAxHHXwJ{{ax8DO{$e#s9&DhJ;^0GRG!?m-TibQ=p2;sMM+!Qw-J zp#H6i=_t5*nfRNqqR>ou7OM{Q5pE1?a&v$Q+pu>0GY~h3()Wu1b(qPJZ(unTKeKpO zFA$%|JpK6<5MQ&_N9BP0oXsnKO2irLj#C|gxtl%Rd5a7bvyrV`06R}-3`YRtX!{3? zgFnF?VRw?;9q!l`vc=^rO!Oq4>0fa>m6Z|eW<@%F&j`M{r&lLFJ_BP#xGQx#Fo@D zG(zeW`#um*$QS#Ul7O0F*q=W}0RnL^5@u4DHpjgjdO}?}D@j#v086}-(cD0}+N8o? zXQ>-q(%`p;l($3*=bj(~NwTTjPrPe#_LC+W^SHcvBMBRmWlv;?#xyP;X2>veL4MXZ zQb@@@O~_dpqB(6>xJyAwl%g!_*HQH=?x+EEx3c3r{TEZN($IN@jO7~TtX4{_7)Lbf zn6AnAF--I2{FOk`-e3p&KsQN*9bQ^Kkq8iIb9S%S7hnu2vsJpQMFr|m1vjdp!H29E zF3w(CQCH=z)_hq}bkHTFGFB5DM5#eNLEW%LSBzkA)YjDd+%}sniVyhpC#6*SWgdbP zIMAjhro^!E%RMzd_jIS%>#1}(waS|6KN@qy4YHJmB6{0H+ZAY4lPAYWrXsh;?b7~d l1^jBg(Mlu@PBN!a9&c1_N{pCLq&aJ~I`6;C;ILZ9{|0HJo1TcM&}Gpl7mP!}##N+;!oT9B}@*SNsO78^PNL09!8>on}Dh6qY({0J2cxz69{i|EE!llIKrJ zUxrd|CXk-QhErjBmqNLx2vDn0@n-_C45I4$a=>8-F7+jlc0h0+x`Ae-%fiU?Bw!vA zox?src_Xf?93i1iY`Ari1QGFeTR#B=#N@8afVjk@Cz62n)zmZ50+>9^Kj{aAJl0

889*Q{g54Cq4kzAj4d-g4GS>sk5SNNIo`;d5d+8I&;2Yh&GHe3)-@(&QI{ zWrDMrkMdV*h=J0h zgP`@ZV*xc + Apps + Apps + + + + Close application + Close application + + + + + Browse... + Browse... + + + + + Arguments: + Arguments: + + + + Startup application + Startup application + + + Arguments: + Arguments: + + + Mail Mail - + Use the preferences dialog in Thunderbird to select the accounts and folders Use the preferences dialog in Thunderbird to select the accounts and folders - + Debug Debug - + Display debug window Display debug window - + Save Save - + Cancel Cancel @@ -376,42 +407,48 @@ Minimize to tray - - + + Open Image Open Image - - + + Image Files (*.png *.jpg *.bmp) Image Files (*.png *.jpg *.bmp) + + + + Select application + Select application + SysTrayX - + &Show/Hide &Show/Hide - + &Preferences &Preferences - + &About &About - + &Quit &Quit - + Close Close diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm index a74f3c592ae9b5472b92f2c66f1ab56653b8586e..de1b4e145a741852ad3841d448a51e831c97cdce 100644 GIT binary patch delta 1015 zcmaKqc}P@I6vn?dzGa+w&ZJ|{QM05%sbs|Vgu;b3+cYaG!kEUVO^iCtj1@(hP_$T) zO&d|!zCrZIM5TpVx-xLfK6qn0++IZ2xaaj4Ml-0+?9*bX(0TNP#Otl&L=qCwd z*PWmMLi_j6Kya z1Ga#OW9IuT>!A>%hE1Fm?p{T4xT5RkTZ>!+2w3GcW5Hd`{afXknzT9WOin(XXDFW21aiyE7JE`WhZRb1|sdJXFaK9U>r?-PZHuaD|VBx9y zxT&j%on4QaJgb}URBI8hggEYtmWeG<>@3})hXJ(9mNggozr^QQHtfGfu(?(>dl&zc z3~N__6N|cUeb>YH6+7L)fO(<4hGa3_j$C-TJaEGWC)P4np%QK*4Ip!ixn8e7n585S zi)XG6<-D(e&YS>qvm<$?Twi&0g4h2_P%GwowIYC`*1p_NSQ>DU}P;a>WA7aGo>V=5=twnAjlu0;5!Txl_%0gl&)DOWgf;6NM!9@zm!j!%q>DLPn-0ySU*Aw0`>$|y1IDc!k zE0DMZ_B04c5wPWBKtc=nmS2Ff7rbo{uysB7T|lff>GKOfVy&q+-UOH$S^Z)?E%dWC z{~H1;W9?!MfzGn<$raFhZ1n6Dz>+!ZpmEA`?poFWTLbsR(jC-rk{^#fp~W}&2`{~p z94ZpL0qFpLyOVfW4<8Ix0j}*5Zy~M(Ny^wrbLRsoQ|4>7A0p?3fP diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts index 0aa49a9..b6fce1f 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts @@ -332,22 +332,44 @@ Nuovi - + + Close application + Applicazione alla chiusura + + + + + Browse... + Sfogliare... + + + + + Arguments: + Argomenti: + + + + Startup application + Applicazione di avvio + + + Mail Messaggi - + Use the preferences dialog in Thunderbird to select the accounts and folders Usa la finestra di dialogo delle preferenze in Thunderbird per selezionare account e cartelle - + Debug Debug - + Display debug window Mostra finestra di debug @@ -358,52 +380,63 @@ Minimizza nel vassoio - + + Apps + Applicazioni + + + Save Salva - + Cancel Annulla - - + + Open Image Apri immagine - - + + Image Files (*.png *.jpg *.bmp) File immagine (*.png *.jpg *.bmp) + + + + Select application + Selezionare l'applicazione + SysTrayX - + &Show/Hide &Mostra/Nascondi - + &Preferences &Preferenze - + &About &Informazioni - + &Quit &Esci - + Close Chiudi diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm index b1bc42297be8579436be3b235cbf6d901fbf659b..f932f4b1917a5ac446841c84ad8eaa9b63e8a55e 100644 GIT binary patch delta 948 zcmaJ^+|;>KHd|_8gfOYdO0=A&lF`K^2`ORClZjKuE+|G0f0U&q z+Dt7?bTbG5COBHga;KgTRJ|tGp75iYX92EEwXUNFV8&FtQ^o;fuIh2Y3UXsg^>h{83oSy8ev0y> za3VSnK8QPn?g;|&UZH0_H85URAKg4n12kv`4NFOXpJr&dp9)lKwZ-pAV4F6swvt>J z(q{c>2ZB4buYUB=yejQ@`UMgYCx+%9rss$fllyCEFuk~a4>b-B79Eqr8}clh?VHdg#vg{3>hWx z%OSXX4Tmf~8tF+85 zTP&6tzQ0-386SacqLz}NND3Ey70_-Y1;wz<5kpcPrEWRW=5#s=?KV%LKTESXut~TP zWQ`%d3M8&L delta 618 zcmXAmZAepb6vm%>_y6Brz1KVEUYtaQ({bAfwt=N;fHXV!>fb>6EO>YXFgdaGECaGzu+n4%kc*0<3jnYGuQmx44+m)e z95z*1fGjUIw+vF>EVj7IfQ&qN|4h@qT5SJX2$(~HOMMJz9--*uRrp{$AdLN;0pt?V z@uCh;gW|^OG1Av!AJDm3^Gq`!6tHml zBY@4ZOX3Lvc*?r>%!96HFAv43?>%QdRJO&rHKhT@T)rTYZ>9@(@?D8uGA!k_4pM%% z!y`C+lE{ZP5Dz=XM*VgdisX``ba+fE&Cj9WYNYOOG;SV|daAb) z?-MC<>J6aW(-+?vCcZEFXM3F#$b|m+ipzk$N%k9ll8(!*b_!luB@eHmJ*E$7XUbC) z4BFD)n(_!Vn*J{SiUtoV%HdCBJgT??O+e<5QZ;v*f@o7FevQ&$MM~0roqz|_th&?m z39fo}kdZd6b_oO`MAh-ZNirLLsEcA+CA_eDZ!_cJ=KW&0w> HZSDLYQXQgm diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts index 9bd75a6..a597ec3 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.ts @@ -340,31 +340,58 @@ + Apps + Apps + + + + Close application + Stop programma + + + + + Browse... + Bestand zoeken... + + + + + Arguments: + Argumenten: + + + + Startup application + Start programma + + + Mail Berichten - + Use the preferences dialog in Thunderbird to select the accounts and folders Gebruik het voorkeurenvenster in Thunderbird om de accounts en mappen te selecteren - + Debug Debug - + Display debug window Toon debug venster - + Save Bewaren - + Cancel Annnuleren @@ -375,42 +402,48 @@ Minimaliseer naar systeemvak - - + + Open Image Open afbeelding - - + + Image Files (*.png *.jpg *.bmp) Afbeeldingsbestanden (*.png *.jpg *.bmp) + + + + Select application + Selecteer programma + SysTrayX - + &Show/Hide &Tonen/Verbergen - + &Preferences &Opties - + &About O&ver - + &Quit &Afsluiten - + Close Sluiten diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm index 24ef2fe0748bdcf9c1c4ff139704aa2ce56a7d6e..b37885bba86610092578cc694ed1151773641c98 100644 GIT binary patch delta 947 zcmah{Ye-XJ7=F%nE}Q4Lldc_`Qd)^!j0uKXcEK&wvNA7pAtG3F>1evK9m^CHgXm&K zwzR0I*3|-wSd{srLKNypRF**{`%^|zDv1$UX0HW8zvA%meth5i+}`hWXN)a5I)gdi z7_Zbt#e?1F2eipxTN(g<9PH>;K>rL}#!o|vCtR=U?%d?n*gr! zZ#6$a-o3kkkcQQTCLnqQ`3Ksm?>!1~vVq8_C>k3fJ~K9dP6L#9CPliB6_5ocz2*WC zHO##H^$pNUK#MwNqt3d@~HuBsNGNHHeb1ZbOoaa+?w<)EMw2vQ#`ou)B^!dU=z0g4-6L$W4U+6f;c@9az)&MRNu_(;eBD9$D^*o@c-B_b zK@98Khp3VJq3c*o0;Y}n{i{YPz=?>r#@RI1oglOCs4a+*TL?{}Z69!CehN@QjUyMr)wasm0EJv0ykI=j3%Y7M{q6$dQbWfzDOyGe1Y=FIUq|iWX|YzX*B`L*amfm-@SzlyD2EdjP~m|e znUkFnR$pmlxwAs`XHN77PU#Jy=iEwWzJdY*df*_a4|ZCXiEk39xA{D~{7#F-@&{)Y zZe}GRhcp~0qxK4v5IBK$Ubx|+Q#)z9uoIq1il`NCkKdVK_j=tfhh23YGfodZ5<-!= z3s6i%?muKMqN$)=!hh+ai=A$#L;Z&@P-EK7q|Vpf-GLwvA^r7sH3IhG$3fv5g z(vrebk;sh97Z`oGu}V^6%@0OFnG}^Q!YqUuI1F)Qb)-)R4$pbc@BcdsTgLp?mU3sW z=effA9K^n6fW3#9IRwakVE*5LB?8tl0@$M{ydnbbO00Ke0a%XGqMLv?|G&BuD1Gt> zkgV8QkquYK%m zlBWdLAl~B75x}t6b!-uINE|zz1cX8+c2hg&4s&HRz}Co?OcyvQ;Uqge-2*7k*%2>Q zwzjpL^M+Z3J=;b+LV}Gn*AhoiVlBia=SnNrP~X`j`Q(Qbyj0p=;GzD6)b*3bo%^Nk zs(mCZEEx?S>Dye>#(_BTT`-LvUq!(yO|RD7ro6n|r2nE?CSP4a;w>>bzKQ;E1kIO9 zG9(7=mQRj+GU~ESB;S&d?}~C}l0Z5YUvoVLSgln2?I#f)<-`1IT9{T+fqN7gkeWaQ-} F**{7dp$Py0 diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts index 66ef4bf..6b81cb3 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.ts @@ -340,31 +340,58 @@ + Apps + Aplicativos + + + + Close application + Fechando aplicativo + + + + + Browse... + Procurar... + + + + + Arguments: + Argumentos: + + + + Startup application + Aplicativo de inicialização + + + Mail E-mail - + Use the preferences dialog in Thunderbird to select the accounts and folders Use a janela de preferências no Thunderbird para selecionar as contas e pastas - + Debug Depuração - + Display debug window Mostrar janela de depuração - + Save Salvar - + Cancel Cancelar @@ -375,42 +402,48 @@ Minimizar para a tray - - + + Open Image Abrir imagem - - + + Image Files (*.png *.jpg *.bmp) Arquivo de imagem (*.png *.jpg *.bmp) + + + + Select application + Selecione o aplicativo + SysTrayX - + &Show/Hide &Exibir/Ocultar - + &Preferences &Preferências - + &About &Sobre - + &Quit &Sair - + Close Fechar diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm index 38fc92ad653f4f59587c80159dfde98b3300521d..9512af122540445627c1bec20b1362269e0f86c4 100644 GIT binary patch delta 945 zcmZ8fYe-XJ7=E^W=b}4q&bgT_nwFSSOw+VwUgpe6TAE1_T@2G{!pz|oih&Z*O-qww z7A2X|9r`t?l!&qmL`bF)-H;+8q*4+il5X#e{1G4Le24FSp7(j4_dBw+H}%+j#o0Eq zu~D}L?4So=DzHn3!b5KyO#eo_Vm-B9Lid`d)>vhG4V5H?47vEv>YfO2x@2|!t((vD98!5`WtjCNjR zoyvNWyUn`F{kB%IVb>_d+Q+eOI-dK8Gfry&-AB$e7DaLHay!P(lgf6kG@5oHLe5b{ zHwrb}Z5xSmQQZAzFNv1&Tnm{9c*8HU(7ADlj}v>qOi$64j58|hZV6D>Z352Ky`6QY|?(E{xRaw1;uED zR4(>U5Rktk4y+&nLs!6|)zcK9Iq;Q!Ax-I6;Oo&5YS5}ySG^;Hm(_924V0@zUHJPl zO+!|{_&!8=&FXQ-IWkZsg_P|l-cQLk(nRyfkP5bva4;{qCP!%wPU)0_3@e7EXZ`OB z$x&-i_S!MJr==Qp%?HeRq)8i4QL;3R({I2qsj0h4|BJp;)6j8)j5)MYN(vf{j^O!pzqiSo~|29$>Gj zuJt%A7K@)PKN0%EVpteK3y83CM$gKU5W&*re9@%SWx1+7&WIAX+f`Xw;;pQf-|FW1 zn#AlNdo&U9*ixeS)$B7QzY8n1NoUFbTFokl6ggeaQtyAgfw+f1QyhQX}Y S7kNu+yu021;d~C`AomBz%j6LN delta 618 zcmXAmT}TvR7=_QweBaFM&N!pH>mNm7iV~4aMXN?dL2Ia)8RSJoq-h#t^s|u^xONfb zPD!z85|JqOCsfdix}ssC7hOnZ7PW<4gwR3?Erzs}^-5O%kscfNX)q4+FOC;Ca6RO$2Wr2OPh!?kWRPo3Y861Rw*&o>qWA{jaG@C=U0N z{{>3Qlj(gL_BIdFy9Mkk^a2T)*#Bn%u%E`kZ<_&EmEhK&1BP4hT(ztqU4Hd8DtD^<QAO zfo1>b%mk9E?4M@dkg-zJ>c0@kfabOuX@MhJ`QJxWM2+_0=OitbtIZd76Y!kwsJ=|T zS9;kY3Nqg7w*>+bru27%vlLjF;4O{PMI?jug@BZZv29c$;5|moa-K^t8Xlh|QpZW7 zv2B1VD>U^jEoA61XMNO!G-Q6Cr&F@h<3M_SXiQXCs6_Dy!AUh7`fBqg1g+Hbq1v + Apps + Программы + + + + Close application + Заявление о закрытии + + + + + Browse... + просматривать... + + + + + Arguments: + аргументы: + + + + Startup application + Приложение при запуске + + + Mail Письма - + Use the preferences dialog in Thunderbird to select the accounts and folders Используйте диалоговое окно настроек в Thunderbird, чтобы выбрать учетные записи и папки - + Debug Отладка - + Display debug window Показывать окно отладки - + Save Сохранить - + Cancel Отменить @@ -372,42 +399,48 @@ Свернуть в трей - - + + Open Image Открыть изображение - - + + Image Files (*.png *.jpg *.bmp) Файлы изображений (*.png *.jpg *.bmp) + + + + Select application + выберите приложение + SysTrayX - + &Show/Hide &Показать/Скрыть - + &Preferences &Настройки - + &About &О приложении - + &Quit &Выход - + Close Закрыть diff --git a/app/SysTray-X/SysTray-X-app/preferences.cpp b/app/SysTray-X/SysTray-X-app/preferences.cpp index 7230af2..0734e17 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.cpp +++ b/app/SysTray-X/SysTray-X-app/preferences.cpp @@ -80,6 +80,11 @@ Preferences::Preferences( QObject *parent ) : QObject( parent ) m_version_branch = QLatin1String( APP_GITBRANCH ); m_theme = PREF_THEME_LIGHT; + + m_startup_app = ""; + m_startup_app_args = ""; + m_close_app = ""; + m_close_app_args = ""; } @@ -687,6 +692,114 @@ void Preferences::setTheme( Theme theme ) } +/* + * Get the startup application. + */ +QString Preferences::getStartupApplication() const +{ + + return m_startup_app; +} + + +/* + * Set the startup application. + */ +void Preferences::setStartupApplication( QString app ) +{ + if( m_startup_app != app ) + { + m_startup_app = app; + + /* + * Tell the world the new preference + */ + emit signalStartupAppChange(); + } +} + + +/* + * Get the startup application arguments. + */ +QString Preferences::getStartupApplicationArgs() const +{ + + return m_startup_app_args; +} + + +/* + * Set the startup application arguments. + */ +void Preferences::setStartupApplicationArgs( QString args ) +{ + if( m_startup_app_args != args ) + { + m_startup_app_args = args; + + /* + * Tell the world the new preference + */ + emit signalStartupAppArgsChange(); + } +} + + +/* + * Get the close application. + */ +QString Preferences::getCloseApplication() const +{ + + return m_close_app; +} + + +/* + * Set the close application. + */ +void Preferences::setCloseApplication( QString app ) +{ + if( m_close_app != app ) + { + m_close_app = app; + + /* + * Tell the world the new preference + */ + emit signalCloseAppChange(); + } +} + + +/* + * Get the close application arguments. + */ +QString Preferences::getCloseApplicationArgs() const +{ + + return m_close_app_args; +} + + +/* + * Set the close application arguments. + */ +void Preferences::setCloseApplicationArgs( QString args ) +{ + if( m_close_app_args != args ) + { + m_close_app_args = args; + + /* + * Tell the world the new preference + */ + emit signalCloseAppArgsChange(); + } +} + + /* * Get the debug state. */ diff --git a/app/SysTray-X/SysTray-X-app/preferences.h b/app/SysTray-X/SysTray-X-app/preferences.h index 9af258b..e99ccd7 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.h +++ b/app/SysTray-X/SysTray-X-app/preferences.h @@ -462,6 +462,62 @@ class Preferences : public QObject */ void setTheme( Theme theme ); + /** + * @brief getStartupApplication. Get the startup application. + * + * @return The app. + */ + QString getStartupApplication() const; + + /** + * @brief setStartupApplication. Set the startup application. + * + * @param app The app. + */ + void setStartupApplication( QString app ); + + /** + * @brief getStartupApplicationArgs. Get the startup application arguments. + * + * @return The arg. + */ + QString getStartupApplicationArgs() const; + + /** + * @brief setStartupApplicationArgs. Set the startup application arguments. + * + * @param app The args. + */ + void setStartupApplicationArgs( QString args ); + + /** + * @brief getCloseApplication. Get the close application. + * + * @return The app. + */ + QString getCloseApplication() const; + + /** + * @brief setCloseApplication. Set the close application. + * + * @param app The app. + */ + void setCloseApplication( QString app ); + + /** + * @brief getCloseApplicationArgs. Get the close application arguments. + * + * @return The args. + */ + QString getCloseApplicationArgs() const; + + /** + * @brief setCloseApplicationArgs. Set the close application arguments. + * + * @param args The args. + */ + void setCloseApplicationArgs( QString args ); + /** * @brief getDebug. Get the debug windows state. * @@ -613,6 +669,26 @@ class Preferences : public QObject */ void signalThemeChange(); + /** + * @brief signalStartupAppChange. Signal a startup application change. + */ + void signalStartupAppChange(); + + /** + * @brief signalStartupAppArgsChange. Signal a startup application arguments change. + */ + void signalStartupAppArgsChange(); + + /** + * @brief signalCloseAppChange. Signal a close application change. + */ + void signalCloseAppChange(); + + /** + * @brief signalCloseAppArgsChange. Signal a close application arguments change. + */ + void signalCloseAppArgsChange(); + private: /** @@ -769,6 +845,26 @@ class Preferences : public QObject * @brief m_theme. The theme. */ Theme m_theme; + + /** + * @brief m_startup_app + */ + QString m_startup_app; + + /** + * @brief m_startup_app_args + */ + QString m_startup_app_args; + + /** + * @brief m_close_app + */ + QString m_close_app; + + /** + * @brief m_close_app_args + */ + QString m_close_app_args; }; #endif // PREFERENCES_H diff --git a/app/SysTray-X/SysTray-X-app/preferences.ui b/app/SysTray-X/SysTray-X-app/preferences.ui index 2eec372..c7a7ce3 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.ui +++ b/app/SysTray-X/SysTray-X-app/preferences.ui @@ -29,7 +29,7 @@ - 0 + 2 @@ -824,6 +824,112 @@ + + + Apps + + + + + + + + Close application + + + + + + + + + + + + + Browse... + + + + + + + + + + + Arguments: + + + + + + + + + + + + + + + + + Startup application + + + + + + + + + + + + + Browse... + + + + + + + + + + + Arguments: + + + + + + + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Mail @@ -953,12 +1059,12 @@ - - - + + - + + diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp index 314d71f..12b17a3 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp @@ -118,6 +118,9 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi connect( m_ui->savePushButton, &QPushButton::clicked, this, &PreferencesDialog::slotAccept); connect( m_ui->cancelPushButton, &QPushButton::clicked, this, &PreferencesDialog::slotReject); + connect( m_ui->startupBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotStartupApplicationSelect ); + connect( m_ui->closeBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotCloseApplicationSelect ); + /* * Set number color */ @@ -149,6 +152,14 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi */ setNumberMargins( m_pref->getNumberMargins() ); + /* + * Set the startup and close application parameters + */ + setStartupApplication( m_pref->getStartupApplication() ); + setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); + setCloseApplication( m_pref->getCloseApplication() ); + setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); + /* * Dialog on top */ @@ -433,6 +444,41 @@ void PreferencesDialog::setTheme( Preferences::Theme theme ) } +/* + * Set startup application + */ +void PreferencesDialog::setStartupApplication( QString app ) +{ + m_ui->startupApplicationLineEdit->setText( app ); +} + + +/* + * Set startup application arguments + */ +void PreferencesDialog::setStartupApplicationArgs( QString args ) +{ + m_ui->startupApplicationArgsLineEdit->setText( args ); +} + +/* + * Set close application + */ +void PreferencesDialog::setCloseApplication( QString app ) +{ + m_ui->closeApplicationLineEdit->setText( app ); +} + + +/* + * Set close application arguments + */ +void PreferencesDialog::setCloseApplicationArgs( QString args ) +{ + m_ui->closeApplicationArgsLineEdit->setText( args ); +} + + /* * Handle the accept signal */ @@ -473,6 +519,15 @@ void PreferencesDialog::slotAccept() Preferences::Theme theme = static_cast< Preferences::Theme >( m_ui->themeGroup->checkedId() ); m_pref->setTheme( theme ); + QString startupApp = m_ui->startupApplicationLineEdit->text(); + m_pref->setStartupApplication( startupApp ); + QString startupAppArgs= m_ui->startupApplicationArgsLineEdit->text(); + m_pref->setStartupApplicationArgs( startupAppArgs ); + QString closeApp = m_ui->closeApplicationLineEdit->text(); + m_pref->setCloseApplication( closeApp ); + QString closeAppArgs= m_ui->closeApplicationArgsLineEdit->text(); + m_pref->setCloseApplicationArgs( closeAppArgs ); + /* * Force different color? */ @@ -537,6 +592,10 @@ void PreferencesDialog::slotReject() setNumberAlignment( m_pref->getNumberAlignment() ); setNumberMargins( m_pref->getNumberMargins() ); setTheme( m_pref->getTheme() ); + setStartupApplication( m_pref->getStartupApplication() ); + setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); + setCloseApplication( m_pref->getCloseApplication() ); + setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); setDebug( m_pref->getDebug()); } @@ -606,6 +665,34 @@ void PreferencesDialog::slotColorSelect() } +/* + * Handle the startup application button + */ +void PreferencesDialog::slotStartupApplicationSelect() +{ + QFileDialog file_dialog( this, tr( "Select application" ), "", "" ); + + if( file_dialog.exec() ) + { + setStartupApplication( file_dialog.selectedFiles()[ 0 ] ); + } +} + + +/* + * Handle the close application button + */ +void PreferencesDialog::slotCloseApplicationSelect() +{ + QFileDialog file_dialog( this, tr( "Select application" ), "", "" ); + + if( file_dialog.exec() ) + { + setCloseApplication( file_dialog.selectedFiles()[ 0 ] ); + } +} + + /* * Handle the debug change signal */ @@ -803,3 +890,39 @@ void PreferencesDialog::slotThemeChange() { setTheme( m_pref->getTheme() ); } + + +/* + * Handle the startup application change signal + */ +void PreferencesDialog::slotStartupAppChange() +{ + setStartupApplication( m_pref->getStartupApplication() ); +} + + +/* + * Handle the startup application arguments change signal + */ +void PreferencesDialog::slotStartupAppArgsChange() +{ + setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); +} + + +/* + * Handle the close application change signal + */ +void PreferencesDialog::slotCloseAppChange() +{ + setCloseApplication( m_pref->getCloseApplication() ); +} + + +/* + * Handle the close application arguments change signal + */ +void PreferencesDialog::slotCloseAppArgsChange() +{ + setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); +} diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.h b/app/SysTray-X/SysTray-X-app/preferencesdialog.h index ca54b56..c62eee0 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.h +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.h @@ -209,6 +209,35 @@ class PreferencesDialog : public QDialog */ void setTheme( Preferences::Theme theme ); + /** + * @brief setStartupApplication. Set the startup application. + * + * @param app The application. + */ + void setStartupApplication( QString app ); + + /** + * @brief setStartupApplicationArgs. Set the startup application arguments. + * + * @param args The application arguments. + */ + void setStartupApplicationArgs( QString args ); + + /** + * @brief setCloseApplication. Set the close application. + * + * @param app The application. + */ + void setCloseApplication( QString app ); + + /** + * @brief setCloseApplicationArgs. Set the close application arguments. + * + * @param args The application arguments. + */ + void setCloseApplicationArgs( QString args ); + + signals: /** @@ -325,6 +354,26 @@ class PreferencesDialog : public QDialog */ void slotThemeChange(); + /** + * @brief slotStartupAppChange. Slot for handling startup application change. + */ + void slotStartupAppChange(); + + /** + * @brief slotStartupAppArgsChange. Slot for handling startup application arguments change. + */ + void slotStartupAppArgsChange(); + + /** + * @brief slotCloseAppChange. Slot for handling close application change. + */ + void slotCloseAppChange(); + + /** + * @brief slotCloseAppArgsChange. Slot for handling close application arguments change. + */ + void slotCloseAppArgsChange(); + private slots: /** @@ -352,6 +401,16 @@ class PreferencesDialog : public QDialog */ void slotColorSelect(); + /** + * @brief slotStartupApplicationSelect. Handle the startup application button click. + */ + void slotStartupApplicationSelect(); + + /** + * @brief slotCloseApplicationSelect. Handle the close application button click. + */ + void slotCloseApplicationSelect(); + private: /** diff --git a/app/SysTray-X/SysTray-X-app/systrayx.cpp b/app/SysTray-X/SysTray-X-app/systrayx.cpp index 914ec41..d7e63bf 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayx.cpp @@ -14,6 +14,7 @@ * Qt includes */ #include +#include #include #include #include @@ -132,6 +133,10 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalRestoreWindowPositionsChange, m_pref_dialog, &PreferencesDialog::slotRestoreWindowPositionsChange ); connect( m_preferences, &Preferences::signalCloseTypeChange, m_pref_dialog, &PreferencesDialog::slotCloseTypeChange ); connect( m_preferences, &Preferences::signalThemeChange, m_pref_dialog, &PreferencesDialog::slotThemeChange ); + connect( m_preferences, &Preferences::signalStartupAppChange, m_pref_dialog, &PreferencesDialog::slotStartupAppChange ); + connect( m_preferences, &Preferences::signalStartupAppArgsChange, m_pref_dialog, &PreferencesDialog::slotStartupAppArgsChange ); + connect( m_preferences, &Preferences::signalCloseAppChange, m_pref_dialog, &PreferencesDialog::slotCloseAppChange ); + connect( m_preferences, &Preferences::signalCloseAppArgsChange, m_pref_dialog, &PreferencesDialog::slotCloseAppArgsChange ); connect( m_preferences, &Preferences::signalDebugChange, m_pref_dialog, &PreferencesDialog::slotDebugChange ); connect( m_preferences, &Preferences::signalDefaultIconTypeChange, m_link, &SysTrayXLink::slotDefaultIconTypeChange ); @@ -152,6 +157,10 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalRestoreWindowPositionsChange, m_link, &SysTrayXLink::slotRestoreWindowPositionsChange ); connect( m_preferences, &Preferences::signalCloseTypeChange, m_link, &SysTrayXLink::slotCloseTypeChange ); connect( m_preferences, &Preferences::signalThemeChange, m_link, &SysTrayXLink::slotThemeChange ); + connect( m_preferences, &Preferences::signalStartupAppChange, m_link, &SysTrayXLink::slotStartupAppChange ); + connect( m_preferences, &Preferences::signalStartupAppArgsChange, m_link, &SysTrayXLink::slotStartupAppArgsChange ); + connect( m_preferences, &Preferences::signalCloseAppChange, m_link, &SysTrayXLink::slotCloseAppChange ); + connect( m_preferences, &Preferences::signalCloseAppArgsChange, m_link, &SysTrayXLink::slotCloseAppArgsChange ); connect( m_preferences, &Preferences::signalDebugChange, m_link, &SysTrayXLink::slotDebugChange ); connect( m_preferences, &Preferences::signalHideDefaultIconChange, this, &SysTrayX::slotSelectIconObjectPref ); @@ -167,6 +176,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_link, &SysTrayXLink::signalVersion, this, &SysTrayX::slotVersion ); connect( m_link, &SysTrayXLink::signalKdeIntegration, this, &SysTrayX::slotSelectIconObject ); connect( m_link, &SysTrayXLink::signalLocale, this, &SysTrayX::slotLoadLanguage ); + connect( m_link, &SysTrayXLink::signalStartupApp, this, &SysTrayX::slotStartupApp ); + connect( m_link, &SysTrayXLink::signalCloseApp, this, &SysTrayX::slotCloseApp ); #ifdef Q_OS_UNIX @@ -195,6 +206,10 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) slotSelectIconObject( false ); slotSetUnreadMail( 10 ); + + m_preferences->setStartupApplication( "/home/maxime/test.sh" ); + m_preferences->setStartupApplicationArgs( "/home/maxime/startup.txt StartupString" ); + slotStartupApp(); */ } @@ -572,6 +587,11 @@ void SysTrayX::slotErrorAddOnShutdown() m_tray_icon->hide(); } + /* + * Launch close application + */ + slotCloseApp(); + /* * Let's quit */ @@ -703,3 +723,36 @@ void SysTrayX::slotLoadLanguage( QString locale ) qApp->installTranslator( &m_translator ); } } + + +/* + * Handle a startup app launch request + */ +void SysTrayX::slotStartupApp() +{ + QString app = m_preferences->getStartupApplication(); + QString args = m_preferences->getStartupApplicationArgs(); + QStringList args_list = args.split( ' ', Qt::SkipEmptyParts ); + + if( !app.isEmpty() ) + { + QProcess::startDetached( app, args_list ); + } +} + + +/* + * Handle a close app launch request + */ +void SysTrayX::slotCloseApp() +{ + QString app = m_preferences->getCloseApplication(); + QString args = m_preferences->getCloseApplicationArgs(); + QStringList args_list = args.split( ' ', Qt::SkipEmptyParts ); + + if( !app.isEmpty() ) + { + QProcess::startDetached( app, args_list ); + } +} + diff --git a/app/SysTray-X/SysTray-X-app/systrayx.h b/app/SysTray-X/SysTray-X-app/systrayx.h index 209007f..9888ff5 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.h +++ b/app/SysTray-X/SysTray-X-app/systrayx.h @@ -138,6 +138,16 @@ class SysTrayX : public QObject */ void slotLoadLanguage( QString locale ); + /** + * @brief slotStartupApp. Handle a startup app launch request. + */ + void slotStartupApp(); + + /** + * @brief slotCloseApp. Handle a close app launch request. + */ + void slotCloseApp(); + private slots: /** diff --git a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp index dbfefa6..618e4c4 100644 --- a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp @@ -331,6 +331,14 @@ void SysTrayXLink::DecodeMessage( const QByteArray& message ) if( jsonObject.contains( "shutdown" ) && jsonObject[ "shutdown" ].isString() ) { + /* + * Launch close appplication + */ + emit signalCloseApp(); + + /* + * Shutdown the addon + */ emit signalAddOnShutdown(); } @@ -426,6 +434,26 @@ void SysTrayXLink::DecodeMessage( const QByteArray& message ) { DecodePreferences( jsonObject[ "preferences" ].toObject() ); } + + if( jsonObject.contains( "startupApp" ) && jsonObject[ "startupApp" ].isString() && + jsonObject.contains( "startupAppArgs" ) && jsonObject[ "startupAppArgs" ].isString() ) + { + QString app = jsonObject[ "startupApp" ].toString(); + QString args = jsonObject[ "startupAppArgs" ].toString(); + + /* + * Store the new startup application parameters + */ + m_pref->setStartupApplication( app ); + m_pref->setStartupApplicationArgs( args ); + + emit signalStartupApp(); + } + + if( jsonObject.contains( "closeApp" ) && jsonObject[ "closeApp" ].isString() ) + { + emit signalCloseApp(); + } } } @@ -763,6 +791,46 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref ) m_pref->setTheme( theme ); } + if( pref.contains( "startupApp" ) && pref[ "startupApp" ].isString() ) + { + QString app = pref[ "startupApp" ].toString(); + + /* + * Store the new startup application + */ + m_pref->setStartupApplication( app ); + } + + if( pref.contains( "startupAppArgs" ) && pref[ "startupAppArgs" ].isString() ) + { + QString args = pref[ "startupAppArgs" ].toString(); + + /* + * Store the new startup application arguments + */ + m_pref->setStartupApplicationArgs( args ); + } + + if( pref.contains( "closeApp" ) && pref[ "closeApp" ].isString() ) + { + QString app = pref[ "closeApp" ].toString(); + + /* + * Store the new close application + */ + m_pref->setCloseApplication( app ); + } + + if( pref.contains( "closeAppArgs" ) && pref[ "closeAppArgs" ].isString() ) + { + QString args = pref[ "closeAppArgs" ].toString(); + + /* + * Store the new close application arguments + */ + m_pref->setCloseApplicationArgs( args ); + } + if( pref.contains( "debug" ) && pref[ "debug" ].isString() ) { bool debug = pref[ "debug" ].toString() == "true"; @@ -843,6 +911,11 @@ void SysTrayXLink::EncodePreferences( const Preferences& pref ) prefObject.insert("startupDelay", QJsonValue::fromVariant( QString::number( pref.getStartupDelay() ) ) ); prefObject.insert("theme", QJsonValue::fromVariant( QString::number( pref.getTheme() ) ) ); + prefObject.insert("startupApp", QJsonValue::fromVariant( pref.getStartupApplication() ) ); + prefObject.insert("startupAppArgs", QJsonValue::fromVariant( pref.getStartupApplicationArgs() ) ); + prefObject.insert("closeApp", QJsonValue::fromVariant( pref.getCloseApplication() ) ); + prefObject.insert("closeAppArgs", QJsonValue::fromVariant( pref.getCloseApplicationArgs() ) ); + QJsonObject preferencesObject; preferencesObject.insert("preferences", prefObject ); @@ -1109,3 +1182,51 @@ void SysTrayXLink::slotThemeChange() sendPreferences(); } } + + +/* + * Handle a startup application change signal + */ +void SysTrayXLink::slotStartupAppChange() +{ + if( m_pref->getAppPrefChanged() ) + { + sendPreferences(); + } +} + + +/* + * Handle a startup application arguments change signal + */ +void SysTrayXLink::slotStartupAppArgsChange() +{ + if( m_pref->getAppPrefChanged() ) + { + sendPreferences(); + } +} + + +/* + * Handle a close application change signal + */ +void SysTrayXLink::slotCloseAppChange() +{ + if( m_pref->getAppPrefChanged() ) + { + sendPreferences(); + } +} + + +/* + * Handle a close application arguments change signal + */ +void SysTrayXLink::slotCloseAppArgsChange() +{ + if( m_pref->getAppPrefChanged() ) + { + sendPreferences(); + } +} diff --git a/app/SysTray-X/SysTray-X-app/systrayxlink.h b/app/SysTray-X/SysTray-X-app/systrayxlink.h index 981ff87..9cf4a67 100644 --- a/app/SysTray-X/SysTray-X-app/systrayxlink.h +++ b/app/SysTray-X/SysTray-X-app/systrayxlink.h @@ -241,6 +241,16 @@ class SysTrayXLink : public QObject */ void signalWindowPositions( QList< QPoint > window_positions ); + /** + * @brief signalStartupApp. Signal the startup app launch request. + */ + void signalStartupApp(); + + /** + * @brief signalCloseApp. Signal the close app launch request. + */ + void signalCloseApp(); + public slots: /** @@ -343,7 +353,27 @@ class SysTrayXLink : public QObject */ void slotThemeChange(); - private slots: + /** + * @brief slotStartupAppChange. Slot for handling startup application change signals. + */ + void slotStartupAppChange(); + + /** + * @brief slotStartupAppArgsChange. Slot for handling startup application arguments change signals. + */ + void slotStartupAppArgsChange(); + + /** + * @brief slotCloseAppChange. Slot for handling close application change signals. + */ + void slotCloseAppChange(); + + /** + * @brief slotCloseAppArgsChange. Slot for handling close application arguments change signals. + */ + void slotCloseAppArgsChange(); + + private slots: /** * @brief slotLinkRead. Read the link. diff --git a/webext/_locales/de/messages.json b/webext/_locales/de/messages.json index 7221578..e27ea91 100644 --- a/webext/_locales/de/messages.json +++ b/webext/_locales/de/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Anwendungen", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Nachrichten", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Anwendungen", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Startanwendung", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Anwendung: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Argumente: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Stopanwendung", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Anwendung: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Argumente: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Konten", "description": "Title for Accounts options" diff --git a/webext/_locales/el/messages.json b/webext/_locales/el/messages.json index a44c7ed..1bf6a00 100644 --- a/webext/_locales/el/messages.json +++ b/webext/_locales/el/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Εφαρμογές", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Αλληλογραφία", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Εφαρμογές", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Εφαρμογή εκκίνησης", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Εφαρμογή: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Επιχειρήματα: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Κλείσιμο αίτησης", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Εφαρμογή: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Επιχειρήματα: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Λογαριασμοί", "description": "Title for Accounts options" diff --git a/webext/_locales/en-US/messages.json b/webext/_locales/en-US/messages.json index 38a468f..84f6bf8 100644 --- a/webext/_locales/en-US/messages.json +++ b/webext/_locales/en-US/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Apps", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Mail", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Apps", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Startup application", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Application: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Arguments: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Closing application", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Application: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Arguments: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Accounts", "description": "Title for Accounts options" diff --git a/webext/_locales/it/messages.json b/webext/_locales/it/messages.json index 04bce52..c20008b 100644 --- a/webext/_locales/it/messages.json +++ b/webext/_locales/it/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Applicazioni", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Posta", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Applicazioni", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Applicazione di avvio", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Applicazione: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Argomenti: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Applicazione alla chiusura", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Applicazione: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Argomenti: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Account", "description": "Title for Accounts options" diff --git a/webext/_locales/nl/messages.json b/webext/_locales/nl/messages.json index bad4550..c3b5dab 100644 --- a/webext/_locales/nl/messages.json +++ b/webext/_locales/nl/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Apps", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Berichten", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Apps", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Start programma", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Programma: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Argumenten: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Stop programma", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Programma: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Argumenten: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Accounts", "description": "Title for Accounts options" diff --git a/webext/_locales/pt-BR/messages.json b/webext/_locales/pt-BR/messages.json index c24b0b5..269934a 100644 --- a/webext/_locales/pt-BR/messages.json +++ b/webext/_locales/pt-BR/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Aplicativos", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "E-mail", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Aplicativos", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Aplicativo de inicialização", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Aplicativo: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "Argumentos: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Fechando aplicativo", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Aplicativo: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "Argumentos: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Contas", "description": "Title for Accounts options" diff --git a/webext/_locales/ru/messages.json b/webext/_locales/ru/messages.json index ab8c34c..e118871 100644 --- a/webext/_locales/ru/messages.json +++ b/webext/_locales/ru/messages.json @@ -34,6 +34,11 @@ "description": "Tab for Icon options" }, + "tab_apps": { + "message": "Программы", + "description": "Tab for Apps options" + }, + "tab_mail": { "message": "Письма", "description": "Tab for Mail options" @@ -304,6 +309,41 @@ "description": "The dark theme" }, + "apps": { + "message": "Программы", + "description": "Title for Apps options" + }, + + "startup_application": { + "message": "Приложение при запуске", + "description": "The startup application parameters" + }, + + "startup_app": { + "message": "Приложение: ", + "description": "The startup application" + }, + + "startup_app_args": { + "message": "аргументы: ", + "description": "Arguments for a startup application" + }, + + "close_application": { + "message": "Заявление о закрытии", + "description": "The close application parameters" + }, + + "close_app": { + "message": "Приложение: ", + "description": "The close application" + }, + + "close_app_args": { + "message": "аргументы: ", + "description": "Arguments for a close application" + }, + "accounts": { "message": "Аккаунты", "description": "Title for Accounts options" diff --git a/webext/background.js b/webext/background.js index badfa69..3c766e7 100644 --- a/webext/background.js +++ b/webext/background.js @@ -5,6 +5,9 @@ var SysTrayX = { startupWindowPositions: [], hideDefaultIcon: false, + + startupApp: "", + startupAppArgs: "", }; SysTrayX.Info = { @@ -63,6 +66,9 @@ SysTrayX.Messaging = { // Send preferences to app SysTrayX.Messaging.sendPreferences(); + // Send startup app trigger + SysTrayX.Messaging.sendStartupApp(); + // Let us wait until TB is ready, needed for TB91 and higher? const startupDelay = await storage() .get("startupDelay") @@ -575,6 +581,19 @@ SysTrayX.Messaging = { }); }, + sendStartupApp: function () { + SysTrayX.Link.postSysTrayXMessage({ + startupApp: SysTrayX.startupApp, + startupAppArgs: SysTrayX.startupAppArgs, + }); + }, + + sendCloseApp: function () { + SysTrayX.Link.postSysTrayXMessage({ + closeApp: "closeApp", + }); + }, + sendPreferences: async function () { await storage() .get([ @@ -599,6 +618,10 @@ SysTrayX.Messaging = { "countType", "startupDelay", "theme", + "startupApp", + "startupAppArgs", + "closeApp", + "closeAppArgs", ]) .then( SysTrayX.Messaging.sendPreferencesStorage, @@ -633,6 +656,10 @@ SysTrayX.Messaging = { const countType = result.countType || "0"; const startupDelay = result.startupDelay || "5"; const theme = result.theme || "0"; + const startupApp = result.startupApp || ""; + const startupAppArgs = result.startupAppArgs || ""; + const closeApp = result.closeApp || ""; + const closeAppArgs = result.closeAppArgs || ""; if (theme == "0" && numberColor == "#ffffff") { numberColor = "#000000"; @@ -664,6 +691,10 @@ SysTrayX.Messaging = { countType, startupDelay, theme, + startupApp, + startupAppArgs, + closeApp, + closeAppArgs, }, }); @@ -707,7 +738,7 @@ SysTrayX.Link = { postSysTrayXMessage: function (object) { // Send object (will be stringified by postMessage) - //console.debug("postSysTrayXMessage: " + JSON.stringify(object)); + console.debug("postSysTrayXMessage: " + JSON.stringify(object)); SysTrayX.Link.portSysTrayX.postMessage(object); }, @@ -876,6 +907,34 @@ SysTrayX.Link = { }); } + const startupApp = response["preferences"].startupApp; + if (startupApp !== undefined) { + await storage().set({ + startupApp: startupApp, + }); + } + + const startupAppArgs = response["preferences"].startupAppArgs; + if (startupAppArgs !== undefined) { + await storage().set({ + startupAppArgs: startupAppArgs, + }); + } + + const closeApp = response["preferences"]. closeApp; + if (closeApp !== undefined) { + await storage().set({ + closeApp: closeApp, + }); + } + + const closeAppArgs = response["preferences"].closeAppArgs; + if (closeAppArgs !== undefined) { + await storage().set({ + closeAppArgs: closeAppArgs, + }); + } + const debug = response["preferences"].debug; if (debug) { await storage().set({ @@ -972,6 +1031,11 @@ async function start() { const hideDefaultIcon = await getHideDefaultIcon(); SysTrayX.hideDefaultIcon = hideDefaultIcon; + // Get startup app launch parameters + const {startupApp, startupAppArgs} = await getStartupAppParam(); + SysTrayX.startupApp = startupApp; + SysTrayX.startupAppArgs = startupAppArgs; + // Used sync storage // const inUse = await browser.storage.sync.getBytesInUse(); // console.log("Storage in use: " + inUse); diff --git a/webext/css/options.css b/webext/css/options.css index 9f11706..cd66f76 100644 --- a/webext/css/options.css +++ b/webext/css/options.css @@ -138,6 +138,22 @@ body { padding: 10px 10px 10px 10px; } +#startupapplicationselect { + width: 25em; + border-style: solid; + border-width: 1px; + margin: 10px 10px 10px 10px; + padding: 10px 10px 10px 10px; +} + +#closeapplicationselect { + width: 25em; + border-style: solid; + border-width: 1px; + margin: 10px 10px 10px 10px; + padding: 10px 10px 10px 10px; +} + ul, #accountsTree { list-style-type: none; @@ -198,6 +214,23 @@ ul, margin: 10px; } +label[id="fileDefaultIconTypeLabel"], +label[id="fileIconTypeLabel"] +{ + display: inline-block; + padding: 8px 16px; + vertical-align: middle; + overflow: hidden; + text-decoration: none; + color: inherit; + background-color: #f1f1f1; + text-align: center; + cursor: pointer; + white-space: nowrap; + border: 1px solid #ccc; + border-radius: 8px; +} + button[name="savebutton"] { display: inline-block; padding: 8px 16px; diff --git a/webext/js/defaults.js b/webext/js/defaults.js index 6bad602..27ec2a1 100644 --- a/webext/js/defaults.js +++ b/webext/js/defaults.js @@ -286,6 +286,25 @@ async function getCountType() { return await storage().get("countType").then(resolve, reject); } +// +// Get startup app parameters +// +async function getStartupAppParam() { + function resolve(result) { + const startupApp = result.startupApp || ""; + const startupAppArgs = result.startupAppArgs || ""; + return { startupApp, startupAppArgs }; + } + + function reject() { + return { startupApp: "", startupAppArgs: "" }; + } + + return await storage() + .get(["startupApp", "startupAppArgs"]) + .then(resolve, reject); +} + // Helper funcs for TB91 and later folder handling async function getMailFolderInfo(folder) { diff --git a/webext/options.html b/webext/options.html index 7f52a86..1cee5dd 100644 --- a/webext/options.html +++ b/webext/options.html @@ -29,6 +29,7 @@

+
@@ -219,8 +220,7 @@ +
+
+

__MSG_apps__

+ + + + + + + + + + + +
+ __MSG_startup_application__ +
+ + + +
+ + + +
+ + + + + + + + + + + +
+ __MSG_close_application__ +
+ + + +
+ + + +
+
+
+

__MSG_accounts__

diff --git a/webext/options.js b/webext/options.js index 26661aa..40c4e7c 100644 --- a/webext/options.js +++ b/webext/options.js @@ -300,6 +300,27 @@ SysTrayX.SaveOptions = { startupDelay: startupDelay, }); + // + // Save launch parameters + // + const startupAppInput = document.getElementById("startupAppInput"); + const startupApp = startupAppInput.value; + const startupAppArgsInput = document.getElementById("startupAppArgsInput"); + const startupAppArgs = startupAppArgsInput.value; + + const closeAppInput = document.getElementById("closeAppInput"); + const closeApp = closeAppInput.value; + const closeAppArgsInput = document.getElementById("closeAppArgsInput"); + const closeAppArgs = closeAppArgsInput.value; + + // Store launch parameters + await storage().set({ + startupApp: startupApp, + startupAppArgs: startupAppArgs, + closeApp: closeApp, + closeAppArgs: closeAppArgs, + }); + // Mark add-on preferences changed await storage().set({ addonprefchanged: true, @@ -511,6 +532,37 @@ SysTrayX.RestoreOptions = { SysTrayX.RestoreOptions.setTheme, SysTrayX.RestoreOptions.onThemeError ); + + // + // Restore launch parameters + // + await storage() + .get("startupApp") + .then( + SysTrayX.RestoreOptions.setStartupApp, + SysTrayX.RestoreOptions.onStartupAppError + ); + + await storage() + .get("startupAppArgs") + .then( + SysTrayX.RestoreOptions.setStartupAppArgs, + SysTrayX.RestoreOptions.onStartupAppArgsError + ); + + await storage() + .get("closeApp") + .then( + SysTrayX.RestoreOptions.setCloseApp, + SysTrayX.RestoreOptions.onCloseAppError + ); + + await storage() + .get("closeAppArgs") + .then( + SysTrayX.RestoreOptions.setCloseAppArgs, + SysTrayX.RestoreOptions.onCloseAppArgsError + ); }, // @@ -911,6 +963,62 @@ SysTrayX.RestoreOptions = { console.log(`Theme Error: ${error}`); }, + // + // Restore startup app callbacks + // + setStartupApp: function (result) { + const startupApp = result.startupApp || ""; + + const startupAppInput = document.getElementById("startupAppInput"); + startupAppInput.value = startupApp; + }, + + onStartupAppError: function (error) { + console.log(`StartupApp Error: ${error}`); + }, + + // + // Restore startup app args callbacks + // + setStartupAppArgs: function (result) { + const startupAppArgs = result.startupAppArgs || ""; + + const startupAppArgsInput = document.getElementById("startupAppArgsInput"); + startupAppArgsInput.value = startupAppArgs; + }, + + onStartupAppArgsError: function (error) { + console.log(`StartupAppArgs Error: ${error}`); + }, + + // + // Restore close app callbacks + // + setCloseApp: function (result) { + const closeApp = result.closeApp || ""; + + const closeAppInput = document.getElementById("closeAppInput"); + closeAppInput.value = closeApp; + }, + + onCloseAppError: function (error) { + console.log(`CloseApp Error: ${error}`); + }, + + // + // Restore close app args callbacks + // + setCloseAppArgs: function (result) { + const closeAppArgs = result.closeAppArgs || ""; + + const closeAppArgsInput = document.getElementById("closeAppArgsInput"); + closeAppArgsInput.value = closeAppArgs; + }, + + onCloseAppArgsError: function (error) { + console.log(`CloseAppArgs Error: ${error}`); + }, + // // Restore filters callbacks // @@ -1161,6 +1269,26 @@ SysTrayX.StorageChanged = { theme: changes[item].newValue, }); } + if (item === "startupApp") { + SysTrayX.RestoreOptions.setStartupApp({ + startupApp: changes[item].newValue, + }); + } + if (item === "startupAppArgs") { + SysTrayX.RestoreOptions.setStartupAppArgs({ + startupAppArgs: changes[item].newValue, + }); + } + if (item === "closeApp") { + SysTrayX.RestoreOptions.setCloseApp({ + closeApp: changes[item].newValue, + }); + } + if (item === "closeAppArgs") { + SysTrayX.RestoreOptions.setCloseAppArgs({ + closeAppArgs: changes[item].newValue, + }); + } if (item === "filters") { SysTrayX.RestoreOptions.setFilters({ @@ -1193,6 +1321,8 @@ SysTrayX.StorageChanged = { document.getElementById("minimizeiconselect").className = "active"; document.getElementById("closeselect").className = "active"; document.getElementById("themeselect").className = "active"; + document.getElementById("startupapplicationselect").className = "active"; + document.getElementById("closeapplicationselect").className = "active"; }, }; From 5407a84f093c19ee967f07f029f096aaba2f6ab0 Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Fri, 25 Aug 2023 18:18:20 +0200 Subject: [PATCH 2/3] Cleanup --- .../SysTray-X-app/languages/SysTray-X.de.qm | Bin 7843 -> 7841 bytes .../SysTray-X-app/languages/SysTray-X.de.ts | 10 +-- .../SysTray-X-app/languages/SysTray-X.el.qm | Bin 8217 -> 8215 bytes .../SysTray-X-app/languages/SysTray-X.el.ts | 14 ++- .../languages/SysTray-X.en-US.qm | Bin 7249 -> 7243 bytes .../languages/SysTray-X.en-US.ts | 16 +--- .../SysTray-X-app/languages/SysTray-X.it.qm | Bin 7967 -> 7965 bytes .../SysTray-X-app/languages/SysTray-X.it.ts | 14 ++- .../SysTray-X-app/languages/SysTray-X.nl.qm | Bin 7691 -> 7689 bytes .../SysTray-X-app/languages/SysTray-X.nl.ts | 10 +-- .../languages/SysTray-X.pt-BR.qm | Bin 7677 -> 7675 bytes .../languages/SysTray-X.pt-BR.ts | 11 +-- .../SysTray-X-app/languages/SysTray-X.ru.qm | Bin 7732 -> 7730 bytes .../SysTray-X-app/languages/SysTray-X.ru.ts | 10 +-- app/SysTray-X/SysTray-X-app/preferences.cpp | 44 ++++----- app/SysTray-X/SysTray-X-app/preferences.h | 48 +++++----- app/SysTray-X/SysTray-X-app/preferences.ui | 20 ++--- .../SysTray-X-app/preferencesdialog.cpp | 84 +++++++++--------- .../SysTray-X-app/preferencesdialog.h | 32 +++---- app/SysTray-X/SysTray-X-app/systrayx.cpp | 22 ++--- app/SysTray-X/SysTray-X-app/systrayx.h | 4 +- app/SysTray-X/SysTray-X-app/systrayxlink.cpp | 52 +++++------ app/SysTray-X/SysTray-X-app/systrayxlink.h | 12 +-- webext/_locales/de/messages.json | 12 +-- webext/_locales/el/messages.json | 12 +-- webext/_locales/en-US/messages.json | 14 +-- webext/_locales/it/messages.json | 12 +-- webext/_locales/nl/messages.json | 12 +-- webext/_locales/pt-BR/messages.json | 12 +-- webext/_locales/ru/messages.json | 12 +-- webext/background.js | 44 ++++----- webext/css/options.css | 2 +- webext/js/defaults.js | 12 +-- webext/options.html | 16 ++-- webext/options.js | 62 ++++++------- 35 files changed, 286 insertions(+), 339 deletions(-) diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.qm index f5c58e6098316f3027cc381f33ffb6a028a6d92d..4cbfd974b2828d52e62ff06a781178c59a3a6567 100644 GIT binary patch delta 254 zcmZ2%yU=z*s+8nE24i7C1_lO21~0Rz3=C`q5L&8sV!b}&@rmp8IVUhJpLT?SL9%D! zb9X_1R*3>*e* zjw+H23|#Bj=D%Iaz##UAZDCj_1A~+S+vdhw3=BMP*j{?gV_;xi%Wkpi5Ca3_yUEuX z^#!>(J3M~@oiveiRpC3J9gdUvnZzY^x%Ip2fHvE32mW8lz#z!Zee>r9pjjIy+cUWf z2J+b+Vg@>LCts?tGSH^D$tJp6-1_q&-tkN%47#KtyC)+c+2VQ4m?YqLj!1;wuT`z@!K|Fv>pJNLH1BU^d zqlzR01J^pX`EQppFo^wQTNoC~z#wJBwz=^Z0|U<+wwGS>7#LXBvRkY=#K6G#jy=NZ z9njPrlg~5ibMkU_c>V%9ZQ^8pCUHr9ZvE~$pv^Yif&W)BFbJ}9-~4$2Xx8S*_Dt@A z!F;xdn1PPm&6g^y474d>@^mI0#v7ZDFu96Oj*%#zyoQ@&vY><YFc1oMQz5l+a1L diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts index d246c6a..716d397 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.de.ts @@ -206,10 +206,6 @@ Default minimize Standard Minimieren - - Minimize to tray, method 1 - In Systemleiste verbergen, Methode 1 - Minimize to tray, method 2 @@ -235,10 +231,6 @@ Start application minimized Anwendung minimiert starten - - Minimize on close - Beim Fensterschließen, Minimieren - Number properties @@ -358,7 +350,7 @@ - Startup application + Start application Startanwendung diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.qm index 848bb7aef50f7cec736fce21026c334528f36fc0..c3eb3e40d55d5ebab250180baaa7b9732ae3272a 100644 GIT binary patch delta 253 zcmbQ~Fx_E7nxq$lv9KTm1A`)im)TSX2DV8MTKee3dVR+46W8l=o?u!&?Fa*d)U}Dv z-38aOiv8kaU=W_nD*aN0fkAB5WP3(;PhmFJzAFq2Tv=@DdMOMH5*2Lv99tL|IO5nG zRU{c0xSiPMzg-Fx*J4{37RtaNUB$M!@fHIE?k<5qeRdE delta 260 zcmbR4Fw#!{h3uR!Cu3_8Uc#DC7cM{u6uXzj%tT)*$RvltsV3J^uaC!$c z_1@(3jQX6`oE@IOfKFRHnV(5qGL~DvyAEix26y29l?)6*irhDUUI3c)bFw{?yWng- z+e6Gi9yedAurdRK_>{@hnRFQaHXmUM7Molo**{raQjbG8xFoTtq_kl22MP7fj8bB3 E0AH3yh5!Hn diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts index ed7c44c..7a76b25 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.el.ts @@ -186,10 +186,6 @@ Default minimize Προεπιλεγμένη ελαχιστοποίηση - - Minimize to tray, method 1 - Μέθοδος 1 - Minimize to tray, method 2 @@ -347,11 +343,6 @@ Arguments: Επιχειρήματα: - - - Startup application - Εφαρμογή εκκίνησης - Mail @@ -383,6 +374,11 @@ Apps Εφαρμογές + + + Start application + Εφαρμογή εκκίνησης + Save diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.qm index aaacd993fe857aa1b08fd97a4604b8b4e54ed273..d5c107e083895578bf25f2daf033b789f9cf71cd 100644 GIT binary patch delta 268 zcmca;aoS=+n&bfnV_`uC1_nh2FSDr(3~VA0T0(tdy*}gZiR<+_CowIbc7%aJJYeE; zcfqf$V!!wp7zFOJO21TLU=ZFk*`Cqe^D-N2-xUT1PA4{Xy%Yup(GWI$jx7uf>{Hkr zRV0Dp@7U(QT?!NzU|Sd#3N-2s+vdhw3=G`=*j{?gV_;xSX17>%h=GCe)#U4p`huFA z9iG2{PMXZQs_-4qj>yUUOyZK<-1^;hK$|CU2mW8lz`#G9`{vIJ3=9&%lkJ(@1x5L6 z4>1ExuIEb?R%T!jDVsc1se5#K6G#iao;V9njPZ zlg~5ibLw+;c>V%9ZSrJ(CUHqYZvE~$pv@Dw1OKmNVBnw5ee>r91_lYB3z*ymrTJ_R zF#}C*t_d$4rU< diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts index d955c0b..81b1a29 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.en-US.ts @@ -211,10 +211,6 @@ Default minimize Default minimize - - Minimize to tray, method 1 - Minimize to tray, method 1 - Minimize to tray, method 2 @@ -240,10 +236,6 @@ Start application minimized Start application minimized - - Minimize on close - Minimize on close - Number properties @@ -363,12 +355,8 @@ - Startup application - Startup application - - - Arguments: - Arguments: + Start application + Start application diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.qm index de1b4e145a741852ad3841d448a51e831c97cdce..6198b4de384156c276a3afc9f6d8dc5d5eaf9399 100644 GIT binary patch delta 258 zcmbPlH`i`Lnq&%tv9KTm1A{Vym)TSX2DW(+TI%}5dVNOeiR<+_KQS$zc7%aJ^2NmG z?tf-hBr^FrqrPA) zXNTu6pp!Opt}1*7w4;79Ka;p*J-2>$9nj_!?!f;m85jhExo`fwz`!8QI@zAdU2rv@ z?IC8M$*O#*!paN`Vw)yUXVPH|+I)nmS#{F0t4jW0 F1pw`tNYVfR diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts index b6fce1f..d648117 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.it.ts @@ -192,10 +192,6 @@ Default minimize Minimizzazione predefinita - - Minimize to tray, method 1 - Minimizza nel vassoio, metodo 1 - Minimize to tray, method 2 @@ -348,11 +344,6 @@ Arguments: Argomenti: - - - Startup application - Applicazione di avvio - Mail @@ -384,6 +375,11 @@ Apps Applicazioni + + + Start application + Applicazione di avvio + Save diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.nl.qm index f932f4b1917a5ac446841c84ad8eaa9b63e8a55e..eb62c28b85434b56a7a7c3ed6995162a409ab90c 100644 GIT binary patch delta 253 zcmeCS>9m=UCKtz@W(BWj2+8fz1X&OJ1E=ug@4ialJmL4Ab&yM;I6+zD#`X zF1VIe>=z#cgODw&^h*^622q2__KfbHiEONWR~Q&Lx3H<}r7$pv-D1<{*uucT{(#L< zMUsJmtBP&@+oeG9DQpYFLKzq&``9)&-eO?jImPzUYaRmwYdO2cszVG6jISnNXVe#5 z&)MPm3+SYYoU01oF))bSp3KiAE;*lDzq^isLGTWD;Qy5j3<7JpZ~nZ%z#zps*`CQ= za66yvA!eY-ihQZU%0Qb~CQoP5VYJ(Pgz3J>WF-j=R>9zs#G=X7;>$NzN=#w}0MHsn A!T9(1WCK<(GEG)>tz@W(BWj2+8fz1X&OJ1K?ug{n`alJmL9Mke?M;I6+zD<1Y zF1Vgm>=z#cgODw&^h*^629ev7?HSzzli67Nt}rlgZedf`OJQITyThi>v4w$w{Q;Y! ziX;OAR~6g*w@ZQI)7TbvZuXzj%tmW($s}3vF7EHbDefault minimize Standaard minimalisatie - - Minimize to tray, method 1 - Minimaliseer naar systeemvak, methode 1 - Minimize to tray, method 2 @@ -239,10 +235,6 @@ Start application minimized Start programma geminimaliseerd - - Minimize on close - Minimaliseren bij sluiten - Number properties @@ -362,7 +354,7 @@ - Startup application + Start application Start programma diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.pt-BR.qm index b37885bba86610092578cc694ed1151773641c98..0aaa09326b3de34025e1056861cbb345b7217732 100644 GIT binary patch delta 253 zcmexs{o8s%nxqedv9KTm1A`)im)TSX2G%1GT5|8idVNOOiR<+_e=#kec7%aJ;?~6H z?t(K}#eVTIFbJ+?m42zhz#wvGvOS}_XDAzM-xUT1PA4{Xy%Yupv3YFz99tL|*o)X4 zRU{c0xLDZczg-Fx4`5pu7RtaNS;4ls@fHIEj}zNVuX#XA+1V{t9b#Z$Y?^$XQC~2W zv%~Wj&`HxdR~5bk+L1q*pGjPDGPizr9nj_=?!f;m85jf{xo`fw05t3MWP2ue!G(Ob xhnRspPQFxOWd;V(ZIh=n=`b2>KEhNiGI@iz1FK+gNn+7te({By_u#j zDv}HgTr6z!-!27;2eB;-3uR!CtYX{Tc#DC7$BFHw*F2!5?Cch+4lyt=HnB%Iy#t#1 zV)A)Lea>*s4$oger%j*C&m=B6m0Q2N4rp@_ci{h(3=9H}+&6z-0Gjo7vOSZ#;9@@8 zL(D)PH(#o-G6RF?j>*%RbQp~`A7LsMnY={2aDefault minimize Comportamento padrão - - Minimize to tray, method 1 - Minimizar para à área de notificações? (muito grande) - Minimizar para a tray, método 1 - Minimize to tray, method 2 @@ -239,10 +234,6 @@ Start application minimized Iniciar aplicação minimizada - - Minimize on close - Minimizar ao fechar - Number properties @@ -362,7 +353,7 @@ - Startup application + Start application Aplicativo de inicialização diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.qm index 9512af122540445627c1bec20b1362269e0f86c4..19dbd4869bfcc57fdab99d65922f5dd3724e2311 100644 GIT binary patch delta 258 zcmdmDv&m*cnq&oov9KTm1A`)im)TSX2DUl~E%|n0y*^{$#P#}|Vob}Y9bsUQ_&4#n zyWmMyv0r=)41%v&rC+KrFo>#6wr6zrOk`v2yTZW0`G8GbFNJ|Y>>Qgu#})<#4h=R( z6-fpLu0?F~-!27;x3Db?3uR!CT*kJ!@fHIE&oQ=_Uh^0jSa-5ptUAQNz{D~6I-|be zT+R;9UqB~ybFM0U$G{+Rcrrhexa4wf{q8!T&3)W~|5q|F2u$X_`SSt;gOu!KdnTZ} z_-qd`15LK(OBGfIy6eN_=}bC|F`JJt9T%C*Bw@xT7+jKAR5JM>r~2e>@$${-5@%Tf D1FA{R delta 260 zcmdmFv&CjYnq(D&v9KTm1A`)im)TSX2DUl~E%|<8y*^{`#P#}|5=_gd9bsUQWSIEe zUGOxk*e^Z?2Eo^?(l1pQ7(@;juU#})<#4h=R( z6-fpLu0?F~-!27;x3Mh@3k4drf^Bo-Ed~ajV{9+I<}om^?qs)Eb%=q1iGw}D=^X=u zsMX~2jQX7OIXgUm0iD)8nV(5qawWHZcOB5?KJLK(D;XFBCUf8Xd4YjJN`A6E6VP3J zwuhL3Cfo9*3M&Im_%wMslMZ9t<|9nUMJB%!FQ42kZpI-TT#{H+Qd%(iAgB7~REe{! E0R3r7OaK4? diff --git a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts index 020a2d5..af72a01 100644 --- a/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts +++ b/app/SysTray-X/SysTray-X-app/languages/SysTray-X.ru.ts @@ -207,10 +207,6 @@ Need documentation what methods do... Свернуть окно - - Minimize to tray, method 1 - Свернуть в трей, вариант 1 - Minimize to tray, method 2 @@ -236,10 +232,6 @@ Start application minimized Запуск приложения свернутым - - Minimize on close - Сворачивать при закрытии - Number properties @@ -359,7 +351,7 @@ - Startup application + Start application Приложение при запуске diff --git a/app/SysTray-X/SysTray-X-app/preferences.cpp b/app/SysTray-X/SysTray-X-app/preferences.cpp index 0734e17..a65948d 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.cpp +++ b/app/SysTray-X/SysTray-X-app/preferences.cpp @@ -81,8 +81,8 @@ Preferences::Preferences( QObject *parent ) : QObject( parent ) m_theme = PREF_THEME_LIGHT; - m_startup_app = ""; - m_startup_app_args = ""; + m_start_app = ""; + m_start_app_args = ""; m_close_app = ""; m_close_app_args = ""; } @@ -693,55 +693,55 @@ void Preferences::setTheme( Theme theme ) /* - * Get the startup application. + * Get the start application. */ -QString Preferences::getStartupApplication() const +QString Preferences::getStartApp() const { - return m_startup_app; + return m_start_app; } /* - * Set the startup application. + * Set the start application. */ -void Preferences::setStartupApplication( QString app ) +void Preferences::setStartApp( QString app ) { - if( m_startup_app != app ) + if( m_start_app != app ) { - m_startup_app = app; + m_start_app = app; /* * Tell the world the new preference */ - emit signalStartupAppChange(); + emit signalStartAppChange(); } } /* - * Get the startup application arguments. + * Get the start application arguments. */ -QString Preferences::getStartupApplicationArgs() const +QString Preferences::getStartAppArgs() const { - return m_startup_app_args; + return m_start_app_args; } /* - * Set the startup application arguments. + * Set the start application arguments. */ -void Preferences::setStartupApplicationArgs( QString args ) +void Preferences::setStartAppArgs( QString args ) { - if( m_startup_app_args != args ) + if( m_start_app_args != args ) { - m_startup_app_args = args; + m_start_app_args = args; /* * Tell the world the new preference */ - emit signalStartupAppArgsChange(); + emit signalStartAppArgsChange(); } } @@ -749,7 +749,7 @@ void Preferences::setStartupApplicationArgs( QString args ) /* * Get the close application. */ -QString Preferences::getCloseApplication() const +QString Preferences::getCloseApp() const { return m_close_app; @@ -759,7 +759,7 @@ QString Preferences::getCloseApplication() const /* * Set the close application. */ -void Preferences::setCloseApplication( QString app ) +void Preferences::setCloseApp( QString app ) { if( m_close_app != app ) { @@ -776,7 +776,7 @@ void Preferences::setCloseApplication( QString app ) /* * Get the close application arguments. */ -QString Preferences::getCloseApplicationArgs() const +QString Preferences::getCloseAppArgs() const { return m_close_app_args; @@ -786,7 +786,7 @@ QString Preferences::getCloseApplicationArgs() const /* * Set the close application arguments. */ -void Preferences::setCloseApplicationArgs( QString args ) +void Preferences::setCloseAppArgs( QString args ) { if( m_close_app_args != args ) { diff --git a/app/SysTray-X/SysTray-X-app/preferences.h b/app/SysTray-X/SysTray-X-app/preferences.h index e99ccd7..abaca82 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.h +++ b/app/SysTray-X/SysTray-X-app/preferences.h @@ -463,60 +463,60 @@ class Preferences : public QObject void setTheme( Theme theme ); /** - * @brief getStartupApplication. Get the startup application. + * @brief getStartApp. Get the start application. * * @return The app. */ - QString getStartupApplication() const; + QString getStartApp() const; /** - * @brief setStartupApplication. Set the startup application. + * @brief setStartApp. Set the start application. * * @param app The app. */ - void setStartupApplication( QString app ); + void setStartApp( QString app ); /** - * @brief getStartupApplicationArgs. Get the startup application arguments. + * @brief getStartAppArgs. Get the start application arguments. * * @return The arg. */ - QString getStartupApplicationArgs() const; + QString getStartAppArgs() const; /** - * @brief setStartupApplicationArgs. Set the startup application arguments. + * @brief setStartAppArgs. Set the start application arguments. * * @param app The args. */ - void setStartupApplicationArgs( QString args ); + void setStartAppArgs( QString args ); /** - * @brief getCloseApplication. Get the close application. + * @brief getCloseApp. Get the close application. * * @return The app. */ - QString getCloseApplication() const; + QString getCloseApp() const; /** - * @brief setCloseApplication. Set the close application. + * @brief setCloseApp. Set the close application. * * @param app The app. */ - void setCloseApplication( QString app ); + void setCloseApp( QString app ); /** - * @brief getCloseApplicationArgs. Get the close application arguments. + * @brief getCloseAppArgs. Get the close application arguments. * * @return The args. */ - QString getCloseApplicationArgs() const; + QString getCloseAppArgs() const; /** - * @brief setCloseApplicationArgs. Set the close application arguments. + * @brief setCloseAppArgs. Set the close application arguments. * * @param args The args. */ - void setCloseApplicationArgs( QString args ); + void setCloseAppArgs( QString args ); /** * @brief getDebug. Get the debug windows state. @@ -670,14 +670,14 @@ class Preferences : public QObject void signalThemeChange(); /** - * @brief signalStartupAppChange. Signal a startup application change. + * @brief signalStartAppChange. Signal a start application change. */ - void signalStartupAppChange(); + void signalStartAppChange(); /** - * @brief signalStartupAppArgsChange. Signal a startup application arguments change. + * @brief signalStartAppArgsChange. Signal a start application arguments change. */ - void signalStartupAppArgsChange(); + void signalStartAppArgsChange(); /** * @brief signalCloseAppChange. Signal a close application change. @@ -847,14 +847,14 @@ class Preferences : public QObject Theme m_theme; /** - * @brief m_startup_app + * @brief m_start_app */ - QString m_startup_app; + QString m_start_app; /** - * @brief m_startup_app_args + * @brief m_start_app_args */ - QString m_startup_app_args; + QString m_start_app_args; /** * @brief m_close_app diff --git a/app/SysTray-X/SysTray-X-app/preferences.ui b/app/SysTray-X/SysTray-X-app/preferences.ui index c7a7ce3..ff2cb03 100644 --- a/app/SysTray-X/SysTray-X-app/preferences.ui +++ b/app/SysTray-X/SysTray-X-app/preferences.ui @@ -842,7 +842,7 @@ - + @@ -863,7 +863,7 @@ - + @@ -875,7 +875,7 @@ - Startup application + Start application @@ -883,10 +883,10 @@ - + - + Browse... @@ -904,7 +904,7 @@ - + @@ -1059,12 +1059,12 @@ - - - - + + + + diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp index 12b17a3..3a356cc 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.cpp @@ -118,8 +118,8 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi connect( m_ui->savePushButton, &QPushButton::clicked, this, &PreferencesDialog::slotAccept); connect( m_ui->cancelPushButton, &QPushButton::clicked, this, &PreferencesDialog::slotReject); - connect( m_ui->startupBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotStartupApplicationSelect ); - connect( m_ui->closeBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotCloseApplicationSelect ); + connect( m_ui->startBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotStartAppSelect ); + connect( m_ui->closeBrowseButton, &QPushButton::clicked, this, &PreferencesDialog::slotCloseAppSelect ); /* * Set number color @@ -153,12 +153,12 @@ PreferencesDialog::PreferencesDialog( SysTrayXLink *link, Preferences *pref, QWi setNumberMargins( m_pref->getNumberMargins() ); /* - * Set the startup and close application parameters + * Set the start and close application parameters */ - setStartupApplication( m_pref->getStartupApplication() ); - setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); - setCloseApplication( m_pref->getCloseApplication() ); - setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); + setStartApp( m_pref->getStartApp() ); + setStartAppArgs( m_pref->getStartAppArgs() ); + setCloseApp( m_pref->getCloseApp() ); + setCloseAppArgs( m_pref->getCloseAppArgs() ); /* * Dialog on top @@ -445,37 +445,37 @@ void PreferencesDialog::setTheme( Preferences::Theme theme ) /* - * Set startup application + * Set start application */ -void PreferencesDialog::setStartupApplication( QString app ) +void PreferencesDialog::setStartApp( QString app ) { - m_ui->startupApplicationLineEdit->setText( app ); + m_ui->startAppLineEdit->setText( app ); } /* - * Set startup application arguments + * Set start application arguments */ -void PreferencesDialog::setStartupApplicationArgs( QString args ) +void PreferencesDialog::setStartAppArgs( QString args ) { - m_ui->startupApplicationArgsLineEdit->setText( args ); + m_ui->startAppArgsLineEdit->setText( args ); } /* * Set close application */ -void PreferencesDialog::setCloseApplication( QString app ) +void PreferencesDialog::setCloseApp( QString app ) { - m_ui->closeApplicationLineEdit->setText( app ); + m_ui->closeAppLineEdit->setText( app ); } /* * Set close application arguments */ -void PreferencesDialog::setCloseApplicationArgs( QString args ) +void PreferencesDialog::setCloseAppArgs( QString args ) { - m_ui->closeApplicationArgsLineEdit->setText( args ); + m_ui->closeAppArgsLineEdit->setText( args ); } @@ -519,14 +519,14 @@ void PreferencesDialog::slotAccept() Preferences::Theme theme = static_cast< Preferences::Theme >( m_ui->themeGroup->checkedId() ); m_pref->setTheme( theme ); - QString startupApp = m_ui->startupApplicationLineEdit->text(); - m_pref->setStartupApplication( startupApp ); - QString startupAppArgs= m_ui->startupApplicationArgsLineEdit->text(); - m_pref->setStartupApplicationArgs( startupAppArgs ); - QString closeApp = m_ui->closeApplicationLineEdit->text(); - m_pref->setCloseApplication( closeApp ); - QString closeAppArgs= m_ui->closeApplicationArgsLineEdit->text(); - m_pref->setCloseApplicationArgs( closeAppArgs ); + QString startApp = m_ui->startAppLineEdit->text(); + m_pref->setStartApp( startApp ); + QString startAppArgs= m_ui->startAppArgsLineEdit->text(); + m_pref->setStartAppArgs( startAppArgs ); + QString closeApp = m_ui->closeAppLineEdit->text(); + m_pref->setCloseApp( closeApp ); + QString closeAppArgs= m_ui->closeAppArgsLineEdit->text(); + m_pref->setCloseAppArgs( closeAppArgs ); /* * Force different color? @@ -592,10 +592,10 @@ void PreferencesDialog::slotReject() setNumberAlignment( m_pref->getNumberAlignment() ); setNumberMargins( m_pref->getNumberMargins() ); setTheme( m_pref->getTheme() ); - setStartupApplication( m_pref->getStartupApplication() ); - setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); - setCloseApplication( m_pref->getCloseApplication() ); - setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); + setStartApp( m_pref->getStartApp() ); + setStartAppArgs( m_pref->getStartAppArgs() ); + setCloseApp( m_pref->getCloseApp() ); + setCloseAppArgs( m_pref->getCloseAppArgs() ); setDebug( m_pref->getDebug()); } @@ -666,15 +666,15 @@ void PreferencesDialog::slotColorSelect() /* - * Handle the startup application button + * Handle the start application button */ -void PreferencesDialog::slotStartupApplicationSelect() +void PreferencesDialog::slotStartAppSelect() { QFileDialog file_dialog( this, tr( "Select application" ), "", "" ); if( file_dialog.exec() ) { - setStartupApplication( file_dialog.selectedFiles()[ 0 ] ); + setStartApp( file_dialog.selectedFiles()[ 0 ] ); } } @@ -682,13 +682,13 @@ void PreferencesDialog::slotStartupApplicationSelect() /* * Handle the close application button */ -void PreferencesDialog::slotCloseApplicationSelect() +void PreferencesDialog::slotCloseAppSelect() { QFileDialog file_dialog( this, tr( "Select application" ), "", "" ); if( file_dialog.exec() ) { - setCloseApplication( file_dialog.selectedFiles()[ 0 ] ); + setCloseApp( file_dialog.selectedFiles()[ 0 ] ); } } @@ -893,20 +893,20 @@ void PreferencesDialog::slotThemeChange() /* - * Handle the startup application change signal + * Handle the start application change signal */ -void PreferencesDialog::slotStartupAppChange() +void PreferencesDialog::slotStartAppChange() { - setStartupApplication( m_pref->getStartupApplication() ); + setStartApp( m_pref->getStartApp() ); } /* - * Handle the startup application arguments change signal + * Handle the start application arguments change signal */ -void PreferencesDialog::slotStartupAppArgsChange() +void PreferencesDialog::slotStartAppArgsChange() { - setStartupApplicationArgs( m_pref->getStartupApplicationArgs() ); + setStartAppArgs( m_pref->getStartAppArgs() ); } @@ -915,7 +915,7 @@ void PreferencesDialog::slotStartupAppArgsChange() */ void PreferencesDialog::slotCloseAppChange() { - setCloseApplication( m_pref->getCloseApplication() ); + setCloseApp( m_pref->getCloseApp() ); } @@ -924,5 +924,5 @@ void PreferencesDialog::slotCloseAppChange() */ void PreferencesDialog::slotCloseAppArgsChange() { - setCloseApplicationArgs( m_pref->getCloseApplicationArgs() ); + setCloseAppArgs( m_pref->getCloseAppArgs() ); } diff --git a/app/SysTray-X/SysTray-X-app/preferencesdialog.h b/app/SysTray-X/SysTray-X-app/preferencesdialog.h index c62eee0..ae20b0e 100644 --- a/app/SysTray-X/SysTray-X-app/preferencesdialog.h +++ b/app/SysTray-X/SysTray-X-app/preferencesdialog.h @@ -210,32 +210,32 @@ class PreferencesDialog : public QDialog void setTheme( Preferences::Theme theme ); /** - * @brief setStartupApplication. Set the startup application. + * @brief setStartApp. Set the start application. * * @param app The application. */ - void setStartupApplication( QString app ); + void setStartApp( QString app ); /** - * @brief setStartupApplicationArgs. Set the startup application arguments. + * @brief setStartAppArgs. Set the start application arguments. * * @param args The application arguments. */ - void setStartupApplicationArgs( QString args ); + void setStartAppArgs( QString args ); /** - * @brief setCloseApplication. Set the close application. + * @brief setCloseApp. Set the close application. * * @param app The application. */ - void setCloseApplication( QString app ); + void setCloseApp( QString app ); /** - * @brief setCloseApplicationArgs. Set the close application arguments. + * @brief setCloseAppArgs. Set the close application arguments. * * @param args The application arguments. */ - void setCloseApplicationArgs( QString args ); + void setCloseAppArgs( QString args ); signals: @@ -355,14 +355,14 @@ class PreferencesDialog : public QDialog void slotThemeChange(); /** - * @brief slotStartupAppChange. Slot for handling startup application change. + * @brief slotStartAppChange. Slot for handling start application change. */ - void slotStartupAppChange(); + void slotStartAppChange(); /** - * @brief slotStartupAppArgsChange. Slot for handling startup application arguments change. + * @brief slotStartAppArgsChange. Slot for handling start application arguments change. */ - void slotStartupAppArgsChange(); + void slotStartAppArgsChange(); /** * @brief slotCloseAppChange. Slot for handling close application change. @@ -402,14 +402,14 @@ class PreferencesDialog : public QDialog void slotColorSelect(); /** - * @brief slotStartupApplicationSelect. Handle the startup application button click. + * @brief slotStartAppSelect. Handle the start application button click. */ - void slotStartupApplicationSelect(); + void slotStartAppSelect(); /** - * @brief slotCloseApplicationSelect. Handle the close application button click. + * @brief slotCloseAppSelect. Handle the close application button click. */ - void slotCloseApplicationSelect(); + void slotCloseAppSelect(); private: diff --git a/app/SysTray-X/SysTray-X-app/systrayx.cpp b/app/SysTray-X/SysTray-X-app/systrayx.cpp index d7e63bf..545becf 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayx.cpp @@ -133,8 +133,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalRestoreWindowPositionsChange, m_pref_dialog, &PreferencesDialog::slotRestoreWindowPositionsChange ); connect( m_preferences, &Preferences::signalCloseTypeChange, m_pref_dialog, &PreferencesDialog::slotCloseTypeChange ); connect( m_preferences, &Preferences::signalThemeChange, m_pref_dialog, &PreferencesDialog::slotThemeChange ); - connect( m_preferences, &Preferences::signalStartupAppChange, m_pref_dialog, &PreferencesDialog::slotStartupAppChange ); - connect( m_preferences, &Preferences::signalStartupAppArgsChange, m_pref_dialog, &PreferencesDialog::slotStartupAppArgsChange ); + connect( m_preferences, &Preferences::signalStartAppChange, m_pref_dialog, &PreferencesDialog::slotStartAppChange ); + connect( m_preferences, &Preferences::signalStartAppArgsChange, m_pref_dialog, &PreferencesDialog::slotStartAppArgsChange ); connect( m_preferences, &Preferences::signalCloseAppChange, m_pref_dialog, &PreferencesDialog::slotCloseAppChange ); connect( m_preferences, &Preferences::signalCloseAppArgsChange, m_pref_dialog, &PreferencesDialog::slotCloseAppArgsChange ); connect( m_preferences, &Preferences::signalDebugChange, m_pref_dialog, &PreferencesDialog::slotDebugChange ); @@ -157,8 +157,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_preferences, &Preferences::signalRestoreWindowPositionsChange, m_link, &SysTrayXLink::slotRestoreWindowPositionsChange ); connect( m_preferences, &Preferences::signalCloseTypeChange, m_link, &SysTrayXLink::slotCloseTypeChange ); connect( m_preferences, &Preferences::signalThemeChange, m_link, &SysTrayXLink::slotThemeChange ); - connect( m_preferences, &Preferences::signalStartupAppChange, m_link, &SysTrayXLink::slotStartupAppChange ); - connect( m_preferences, &Preferences::signalStartupAppArgsChange, m_link, &SysTrayXLink::slotStartupAppArgsChange ); + connect( m_preferences, &Preferences::signalStartAppChange, m_link, &SysTrayXLink::slotStartAppChange ); + connect( m_preferences, &Preferences::signalStartAppArgsChange, m_link, &SysTrayXLink::slotStartAppArgsChange ); connect( m_preferences, &Preferences::signalCloseAppChange, m_link, &SysTrayXLink::slotCloseAppChange ); connect( m_preferences, &Preferences::signalCloseAppArgsChange, m_link, &SysTrayXLink::slotCloseAppArgsChange ); connect( m_preferences, &Preferences::signalDebugChange, m_link, &SysTrayXLink::slotDebugChange ); @@ -176,7 +176,7 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) connect( m_link, &SysTrayXLink::signalVersion, this, &SysTrayX::slotVersion ); connect( m_link, &SysTrayXLink::signalKdeIntegration, this, &SysTrayX::slotSelectIconObject ); connect( m_link, &SysTrayXLink::signalLocale, this, &SysTrayX::slotLoadLanguage ); - connect( m_link, &SysTrayXLink::signalStartupApp, this, &SysTrayX::slotStartupApp ); + connect( m_link, &SysTrayXLink::signalStartApp, this, &SysTrayX::slotStartApp ); connect( m_link, &SysTrayXLink::signalCloseApp, this, &SysTrayX::slotCloseApp ); #ifdef Q_OS_UNIX @@ -209,7 +209,7 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) m_preferences->setStartupApplication( "/home/maxime/test.sh" ); m_preferences->setStartupApplicationArgs( "/home/maxime/startup.txt StartupString" ); - slotStartupApp(); + slotStartApp(); */ } @@ -728,10 +728,10 @@ void SysTrayX::slotLoadLanguage( QString locale ) /* * Handle a startup app launch request */ -void SysTrayX::slotStartupApp() +void SysTrayX::slotStartApp() { - QString app = m_preferences->getStartupApplication(); - QString args = m_preferences->getStartupApplicationArgs(); + QString app = m_preferences->getStartApp(); + QString args = m_preferences->getStartAppArgs(); QStringList args_list = args.split( ' ', Qt::SkipEmptyParts ); if( !app.isEmpty() ) @@ -746,8 +746,8 @@ void SysTrayX::slotStartupApp() */ void SysTrayX::slotCloseApp() { - QString app = m_preferences->getCloseApplication(); - QString args = m_preferences->getCloseApplicationArgs(); + QString app = m_preferences->getCloseApp(); + QString args = m_preferences->getCloseAppArgs(); QStringList args_list = args.split( ' ', Qt::SkipEmptyParts ); if( !app.isEmpty() ) diff --git a/app/SysTray-X/SysTray-X-app/systrayx.h b/app/SysTray-X/SysTray-X-app/systrayx.h index 9888ff5..f48103d 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.h +++ b/app/SysTray-X/SysTray-X-app/systrayx.h @@ -139,9 +139,9 @@ class SysTrayX : public QObject void slotLoadLanguage( QString locale ); /** - * @brief slotStartupApp. Handle a startup app launch request. + * @brief slotStartApp. Handle a start app launch request. */ - void slotStartupApp(); + void slotStartApp(); /** * @brief slotCloseApp. Handle a close app launch request. diff --git a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp index 618e4c4..cfaf6e1 100644 --- a/app/SysTray-X/SysTray-X-app/systrayxlink.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayxlink.cpp @@ -435,19 +435,19 @@ void SysTrayXLink::DecodeMessage( const QByteArray& message ) DecodePreferences( jsonObject[ "preferences" ].toObject() ); } - if( jsonObject.contains( "startupApp" ) && jsonObject[ "startupApp" ].isString() && - jsonObject.contains( "startupAppArgs" ) && jsonObject[ "startupAppArgs" ].isString() ) + if( jsonObject.contains( "startApp" ) && jsonObject[ "startApp" ].isString() && + jsonObject.contains( "startAppArgs" ) && jsonObject[ "startAppArgs" ].isString() ) { - QString app = jsonObject[ "startupApp" ].toString(); - QString args = jsonObject[ "startupAppArgs" ].toString(); + QString app = jsonObject[ "startApp" ].toString(); + QString args = jsonObject[ "startAppArgs" ].toString(); /* - * Store the new startup application parameters + * Store the new start application parameters */ - m_pref->setStartupApplication( app ); - m_pref->setStartupApplicationArgs( args ); + m_pref->setStartApp( app ); + m_pref->setStartAppArgs( args ); - emit signalStartupApp(); + emit signalStartApp(); } if( jsonObject.contains( "closeApp" ) && jsonObject[ "closeApp" ].isString() ) @@ -791,24 +791,24 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref ) m_pref->setTheme( theme ); } - if( pref.contains( "startupApp" ) && pref[ "startupApp" ].isString() ) + if( pref.contains( "startApp" ) && pref[ "startApp" ].isString() ) { - QString app = pref[ "startupApp" ].toString(); + QString app = pref[ "startApp" ].toString(); /* - * Store the new startup application + * Store the new start application */ - m_pref->setStartupApplication( app ); + m_pref->setStartApp( app ); } - if( pref.contains( "startupAppArgs" ) && pref[ "startupAppArgs" ].isString() ) + if( pref.contains( "startAppArgs" ) && pref[ "startAppArgs" ].isString() ) { - QString args = pref[ "startupAppArgs" ].toString(); + QString args = pref[ "startAppArgs" ].toString(); /* - * Store the new startup application arguments + * Store the new start application arguments */ - m_pref->setStartupApplicationArgs( args ); + m_pref->setStartAppArgs( args ); } if( pref.contains( "closeApp" ) && pref[ "closeApp" ].isString() ) @@ -818,7 +818,7 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref ) /* * Store the new close application */ - m_pref->setCloseApplication( app ); + m_pref->setCloseApp( app ); } if( pref.contains( "closeAppArgs" ) && pref[ "closeAppArgs" ].isString() ) @@ -828,7 +828,7 @@ void SysTrayXLink::DecodePreferences( const QJsonObject& pref ) /* * Store the new close application arguments */ - m_pref->setCloseApplicationArgs( args ); + m_pref->setCloseAppArgs( args ); } if( pref.contains( "debug" ) && pref[ "debug" ].isString() ) @@ -911,10 +911,10 @@ void SysTrayXLink::EncodePreferences( const Preferences& pref ) prefObject.insert("startupDelay", QJsonValue::fromVariant( QString::number( pref.getStartupDelay() ) ) ); prefObject.insert("theme", QJsonValue::fromVariant( QString::number( pref.getTheme() ) ) ); - prefObject.insert("startupApp", QJsonValue::fromVariant( pref.getStartupApplication() ) ); - prefObject.insert("startupAppArgs", QJsonValue::fromVariant( pref.getStartupApplicationArgs() ) ); - prefObject.insert("closeApp", QJsonValue::fromVariant( pref.getCloseApplication() ) ); - prefObject.insert("closeAppArgs", QJsonValue::fromVariant( pref.getCloseApplicationArgs() ) ); + prefObject.insert("startApp", QJsonValue::fromVariant( pref.getStartApp() ) ); + prefObject.insert("startAppArgs", QJsonValue::fromVariant( pref.getStartAppArgs() ) ); + prefObject.insert("closeApp", QJsonValue::fromVariant( pref.getCloseApp() ) ); + prefObject.insert("closeAppArgs", QJsonValue::fromVariant( pref.getCloseAppArgs() ) ); QJsonObject preferencesObject; preferencesObject.insert("preferences", prefObject ); @@ -1185,9 +1185,9 @@ void SysTrayXLink::slotThemeChange() /* - * Handle a startup application change signal + * Handle a start application change signal */ -void SysTrayXLink::slotStartupAppChange() +void SysTrayXLink::slotStartAppChange() { if( m_pref->getAppPrefChanged() ) { @@ -1197,9 +1197,9 @@ void SysTrayXLink::slotStartupAppChange() /* - * Handle a startup application arguments change signal + * Handle a start application arguments change signal */ -void SysTrayXLink::slotStartupAppArgsChange() +void SysTrayXLink::slotStartAppArgsChange() { if( m_pref->getAppPrefChanged() ) { diff --git a/app/SysTray-X/SysTray-X-app/systrayxlink.h b/app/SysTray-X/SysTray-X-app/systrayxlink.h index 9cf4a67..89c2e4e 100644 --- a/app/SysTray-X/SysTray-X-app/systrayxlink.h +++ b/app/SysTray-X/SysTray-X-app/systrayxlink.h @@ -242,9 +242,9 @@ class SysTrayXLink : public QObject void signalWindowPositions( QList< QPoint > window_positions ); /** - * @brief signalStartupApp. Signal the startup app launch request. + * @brief signalStartApp. Signal the start app launch request. */ - void signalStartupApp(); + void signalStartApp(); /** * @brief signalCloseApp. Signal the close app launch request. @@ -354,14 +354,14 @@ class SysTrayXLink : public QObject void slotThemeChange(); /** - * @brief slotStartupAppChange. Slot for handling startup application change signals. + * @brief slotStartAppChange. Slot for handling start application change signals. */ - void slotStartupAppChange(); + void slotStartAppChange(); /** - * @brief slotStartupAppArgsChange. Slot for handling startup application arguments change signals. + * @brief slotStartAppArgsChange. Slot for handling start application arguments change signals. */ - void slotStartupAppArgsChange(); + void slotStartAppArgsChange(); /** * @brief slotCloseAppChange. Slot for handling close application change signals. diff --git a/webext/_locales/de/messages.json b/webext/_locales/de/messages.json index e27ea91..1b12b34 100644 --- a/webext/_locales/de/messages.json +++ b/webext/_locales/de/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Startanwendung", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Anwendung: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Argumente: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/el/messages.json b/webext/_locales/el/messages.json index 1bf6a00..cc3b4ab 100644 --- a/webext/_locales/el/messages.json +++ b/webext/_locales/el/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Εφαρμογή εκκίνησης", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Εφαρμογή: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Επιχειρήματα: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/en-US/messages.json b/webext/_locales/en-US/messages.json index 84f6bf8..48e9fc7 100644 --- a/webext/_locales/en-US/messages.json +++ b/webext/_locales/en-US/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { - "message": "Startup application", - "description": "The startup application parameters" + "start_application": { + "message": "Start application", + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Application: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Arguments: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/it/messages.json b/webext/_locales/it/messages.json index c20008b..864ff45 100644 --- a/webext/_locales/it/messages.json +++ b/webext/_locales/it/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Applicazione di avvio", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Applicazione: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Argomenti: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/nl/messages.json b/webext/_locales/nl/messages.json index c3b5dab..156b29a 100644 --- a/webext/_locales/nl/messages.json +++ b/webext/_locales/nl/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Start programma", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Programma: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Argumenten: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/pt-BR/messages.json b/webext/_locales/pt-BR/messages.json index 269934a..0b65ab1 100644 --- a/webext/_locales/pt-BR/messages.json +++ b/webext/_locales/pt-BR/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Aplicativo de inicialização", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Aplicativo: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "Argumentos: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/_locales/ru/messages.json b/webext/_locales/ru/messages.json index e118871..44ec014 100644 --- a/webext/_locales/ru/messages.json +++ b/webext/_locales/ru/messages.json @@ -314,19 +314,19 @@ "description": "Title for Apps options" }, - "startup_application": { + "start_application": { "message": "Приложение при запуске", - "description": "The startup application parameters" + "description": "The start application parameters" }, - "startup_app": { + "start_app": { "message": "Приложение: ", - "description": "The startup application" + "description": "The start application" }, - "startup_app_args": { + "start_app_args": { "message": "аргументы: ", - "description": "Arguments for a startup application" + "description": "Arguments for a start application" }, "close_application": { diff --git a/webext/background.js b/webext/background.js index 3c766e7..02747f4 100644 --- a/webext/background.js +++ b/webext/background.js @@ -6,8 +6,8 @@ var SysTrayX = { hideDefaultIcon: false, - startupApp: "", - startupAppArgs: "", + startApp: "", + startAppArgs: "", }; SysTrayX.Info = { @@ -66,8 +66,8 @@ SysTrayX.Messaging = { // Send preferences to app SysTrayX.Messaging.sendPreferences(); - // Send startup app trigger - SysTrayX.Messaging.sendStartupApp(); + // Send start app trigger + SysTrayX.Messaging.sendStartApp(); // Let us wait until TB is ready, needed for TB91 and higher? const startupDelay = await storage() @@ -581,10 +581,10 @@ SysTrayX.Messaging = { }); }, - sendStartupApp: function () { + sendStartApp: function () { SysTrayX.Link.postSysTrayXMessage({ - startupApp: SysTrayX.startupApp, - startupAppArgs: SysTrayX.startupAppArgs, + startApp: SysTrayX.startApp, + startAppArgs: SysTrayX.startAppArgs, }); }, @@ -618,8 +618,8 @@ SysTrayX.Messaging = { "countType", "startupDelay", "theme", - "startupApp", - "startupAppArgs", + "startApp", + "startAppArgs", "closeApp", "closeAppArgs", ]) @@ -656,8 +656,8 @@ SysTrayX.Messaging = { const countType = result.countType || "0"; const startupDelay = result.startupDelay || "5"; const theme = result.theme || "0"; - const startupApp = result.startupApp || ""; - const startupAppArgs = result.startupAppArgs || ""; + const startApp = result.startApp || ""; + const startAppArgs = result.startAppArgs || ""; const closeApp = result.closeApp || ""; const closeAppArgs = result.closeAppArgs || ""; @@ -691,8 +691,8 @@ SysTrayX.Messaging = { countType, startupDelay, theme, - startupApp, - startupAppArgs, + startApp, + startAppArgs, closeApp, closeAppArgs, }, @@ -907,17 +907,17 @@ SysTrayX.Link = { }); } - const startupApp = response["preferences"].startupApp; - if (startupApp !== undefined) { + const startApp = response["preferences"].startApp; + if (startApp !== undefined) { await storage().set({ - startupApp: startupApp, + startApp: startApp, }); } - const startupAppArgs = response["preferences"].startupAppArgs; - if (startupAppArgs !== undefined) { + const startAppArgs = response["preferences"].startAppArgs; + if (startAppArgs !== undefined) { await storage().set({ - startupAppArgs: startupAppArgs, + startAppArgs: startAppArgs, }); } @@ -1032,9 +1032,9 @@ async function start() { SysTrayX.hideDefaultIcon = hideDefaultIcon; // Get startup app launch parameters - const {startupApp, startupAppArgs} = await getStartupAppParam(); - SysTrayX.startupApp = startupApp; - SysTrayX.startupAppArgs = startupAppArgs; + const {startApp, startAppArgs} = await getStartAppParam(); + SysTrayX.startApp = startApp; + SysTrayX.startAppArgs = startAppArgs; // Used sync storage // const inUse = await browser.storage.sync.getBytesInUse(); diff --git a/webext/css/options.css b/webext/css/options.css index cd66f76..fe90ccd 100644 --- a/webext/css/options.css +++ b/webext/css/options.css @@ -138,7 +138,7 @@ body { padding: 10px 10px 10px 10px; } -#startupapplicationselect { +#startapplicationselect { width: 25em; border-style: solid; border-width: 1px; diff --git a/webext/js/defaults.js b/webext/js/defaults.js index 27ec2a1..5189c2d 100644 --- a/webext/js/defaults.js +++ b/webext/js/defaults.js @@ -289,19 +289,19 @@ async function getCountType() { // // Get startup app parameters // -async function getStartupAppParam() { +async function getStartAppParam() { function resolve(result) { - const startupApp = result.startupApp || ""; - const startupAppArgs = result.startupAppArgs || ""; - return { startupApp, startupAppArgs }; + const startApp = result.startApp || ""; + const startAppArgs = result.startAppArgs || ""; + return { startApp, startAppArgs }; } function reject() { - return { startupApp: "", startupAppArgs: "" }; + return { startApp: "", startAppArgs: "" }; } return await storage() - .get(["startupApp", "startupAppArgs"]) + .get(["startApp", "startAppArgs"]) .then(resolve, reject); } diff --git a/webext/options.html b/webext/options.html index 1cee5dd..1f65a19 100644 --- a/webext/options.html +++ b/webext/options.html @@ -517,29 +517,29 @@

__MSG_apps__

- +
- + - + diff --git a/webext/options.js b/webext/options.js index 40c4e7c..f0e6750 100644 --- a/webext/options.js +++ b/webext/options.js @@ -303,10 +303,10 @@ SysTrayX.SaveOptions = { // // Save launch parameters // - const startupAppInput = document.getElementById("startupAppInput"); - const startupApp = startupAppInput.value; - const startupAppArgsInput = document.getElementById("startupAppArgsInput"); - const startupAppArgs = startupAppArgsInput.value; + const startAppInput = document.getElementById("startAppInput"); + const startApp = startAppInput.value; + const startAppArgsInput = document.getElementById("startAppArgsInput"); + const startAppArgs = startAppArgsInput.value; const closeAppInput = document.getElementById("closeAppInput"); const closeApp = closeAppInput.value; @@ -315,8 +315,8 @@ SysTrayX.SaveOptions = { // Store launch parameters await storage().set({ - startupApp: startupApp, - startupAppArgs: startupAppArgs, + startApp: startApp, + startAppArgs: startAppArgs, closeApp: closeApp, closeAppArgs: closeAppArgs, }); @@ -537,17 +537,17 @@ SysTrayX.RestoreOptions = { // Restore launch parameters // await storage() - .get("startupApp") + .get("startApp") .then( - SysTrayX.RestoreOptions.setStartupApp, - SysTrayX.RestoreOptions.onStartupAppError + SysTrayX.RestoreOptions.setStartApp, + SysTrayX.RestoreOptions.onStartAppError ); await storage() - .get("startupAppArgs") + .get("startAppArgs") .then( - SysTrayX.RestoreOptions.setStartupAppArgs, - SysTrayX.RestoreOptions.onStartupAppArgsError + SysTrayX.RestoreOptions.setStartAppArgs, + SysTrayX.RestoreOptions.onStartAppArgsError ); await storage() @@ -966,29 +966,29 @@ SysTrayX.RestoreOptions = { // // Restore startup app callbacks // - setStartupApp: function (result) { - const startupApp = result.startupApp || ""; + setStartApp: function (result) { + const startApp = result.startApp || ""; - const startupAppInput = document.getElementById("startupAppInput"); - startupAppInput.value = startupApp; + const startAppInput = document.getElementById("startAppInput"); + startAppInput.value = startApp; }, - onStartupAppError: function (error) { - console.log(`StartupApp Error: ${error}`); + onStartAppError: function (error) { + console.log(`StartApp Error: ${error}`); }, // // Restore startup app args callbacks // - setStartupAppArgs: function (result) { - const startupAppArgs = result.startupAppArgs || ""; + setStartAppArgs: function (result) { + const startAppArgs = result.startAppArgs || ""; - const startupAppArgsInput = document.getElementById("startupAppArgsInput"); - startupAppArgsInput.value = startupAppArgs; + const startAppArgsInput = document.getElementById("startAppArgsInput"); + startAppArgsInput.value = startAppArgs; }, - onStartupAppArgsError: function (error) { - console.log(`StartupAppArgs Error: ${error}`); + onStartAppArgsError: function (error) { + console.log(`StartAppArgs Error: ${error}`); }, // @@ -1269,14 +1269,14 @@ SysTrayX.StorageChanged = { theme: changes[item].newValue, }); } - if (item === "startupApp") { - SysTrayX.RestoreOptions.setStartupApp({ - startupApp: changes[item].newValue, + if (item === "startApp") { + SysTrayX.RestoreOptions.setStartApp({ + startApp: changes[item].newValue, }); } - if (item === "startupAppArgs") { - SysTrayX.RestoreOptions.setStartupAppArgs({ - startupAppArgs: changes[item].newValue, + if (item === "startAppArgs") { + SysTrayX.RestoreOptions.setStartAppArgs({ + startAppArgs: changes[item].newValue, }); } if (item === "closeApp") { @@ -1321,7 +1321,7 @@ SysTrayX.StorageChanged = { document.getElementById("minimizeiconselect").className = "active"; document.getElementById("closeselect").className = "active"; document.getElementById("themeselect").className = "active"; - document.getElementById("startupapplicationselect").className = "active"; + document.getElementById("startapplicationselect").className = "active"; document.getElementById("closeapplicationselect").className = "active"; }, }; From af1593d5cda093f168a2f53298c25628f4bc046d Mon Sep 17 00:00:00 2001 From: Ximi1970 Date: Fri, 25 Aug 2023 20:44:32 +0200 Subject: [PATCH 3/3] Cleanup --- app/SysTray-X/SysTray-X-app/systrayx.cpp | 4 ++-- webext/background.js | 4 ++-- webext/css/options.css | 4 ++-- webext/js/defaults.js | 2 +- webext/options.html | 4 ++-- webext/options.js | 8 ++++---- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/SysTray-X/SysTray-X-app/systrayx.cpp b/app/SysTray-X/SysTray-X-app/systrayx.cpp index 545becf..b11b88c 100644 --- a/app/SysTray-X/SysTray-X-app/systrayx.cpp +++ b/app/SysTray-X/SysTray-X-app/systrayx.cpp @@ -207,8 +207,8 @@ SysTrayX::SysTrayX( QObject *parent ) : QObject( parent ) slotSetUnreadMail( 10 ); - m_preferences->setStartupApplication( "/home/maxime/test.sh" ); - m_preferences->setStartupApplicationArgs( "/home/maxime/startup.txt StartupString" ); + m_preferences->setStartApp( "/home/maxime/test.sh" ); + m_preferences->setStartAppArgs( "/home/maxime/startup.txt StartupString" ); slotStartApp(); */ } diff --git a/webext/background.js b/webext/background.js index 02747f4..e07c395 100644 --- a/webext/background.js +++ b/webext/background.js @@ -738,7 +738,7 @@ SysTrayX.Link = { postSysTrayXMessage: function (object) { // Send object (will be stringified by postMessage) - console.debug("postSysTrayXMessage: " + JSON.stringify(object)); + // console.debug("postSysTrayXMessage: " + JSON.stringify(object)); SysTrayX.Link.portSysTrayX.postMessage(object); }, @@ -1031,7 +1031,7 @@ async function start() { const hideDefaultIcon = await getHideDefaultIcon(); SysTrayX.hideDefaultIcon = hideDefaultIcon; - // Get startup app launch parameters + // Get start app launch parameters const {startApp, startAppArgs} = await getStartAppParam(); SysTrayX.startApp = startApp; SysTrayX.startAppArgs = startAppArgs; diff --git a/webext/css/options.css b/webext/css/options.css index fe90ccd..a9b1fcd 100644 --- a/webext/css/options.css +++ b/webext/css/options.css @@ -138,7 +138,7 @@ body { padding: 10px 10px 10px 10px; } -#startapplicationselect { +#startappselect { width: 25em; border-style: solid; border-width: 1px; @@ -146,7 +146,7 @@ body { padding: 10px 10px 10px 10px; } -#closeapplicationselect { +#closeappselect { width: 25em; border-style: solid; border-width: 1px; diff --git a/webext/js/defaults.js b/webext/js/defaults.js index 5189c2d..0652370 100644 --- a/webext/js/defaults.js +++ b/webext/js/defaults.js @@ -287,7 +287,7 @@ async function getCountType() { } // -// Get startup app parameters +// Get start app parameters // async function getStartAppParam() { function resolve(result) { diff --git a/webext/options.html b/webext/options.html index 1f65a19..9139e0f 100644 --- a/webext/options.html +++ b/webext/options.html @@ -517,7 +517,7 @@

__MSG_apps__

-
- __MSG_startup_application__ + __MSG_start_application__
- +
- +
+
@@ -545,7 +545,7 @@
__MSG_start_application__
- +
diff --git a/webext/options.js b/webext/options.js index f0e6750..7f8cedd 100644 --- a/webext/options.js +++ b/webext/options.js @@ -964,7 +964,7 @@ SysTrayX.RestoreOptions = { }, // - // Restore startup app callbacks + // Restore start app callbacks // setStartApp: function (result) { const startApp = result.startApp || ""; @@ -978,7 +978,7 @@ SysTrayX.RestoreOptions = { }, // - // Restore startup app args callbacks + // Restore start app args callbacks // setStartAppArgs: function (result) { const startAppArgs = result.startAppArgs || ""; @@ -1321,8 +1321,8 @@ SysTrayX.StorageChanged = { document.getElementById("minimizeiconselect").className = "active"; document.getElementById("closeselect").className = "active"; document.getElementById("themeselect").className = "active"; - document.getElementById("startapplicationselect").className = "active"; - document.getElementById("closeapplicationselect").className = "active"; + document.getElementById("startappselect").className = "active"; + document.getElementById("closeappselect").className = "active"; }, };
__MSG_close_application__