From 395fc8261461fca1c755be5280f820da3193702c Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Mon, 7 Oct 2024 22:45:20 +0500 Subject: [PATCH] Update --- README.md | 2 - .../contents/code/tools.js | 231 --------- ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1871 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1793 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 1896 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1596 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 1706 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1631 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 1723 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1945 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 2054 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 2350 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 2485 -> 0 bytes ...lasma_applet_com.github.adhec.DittoMenu.mo | Bin 1665 -> 0 bytes .../plasma_applet_org.kde.plasma.dittomenu.mo | Bin 1823 -> 0 bytes .../contents/ui/ConfigGeneral.qml | 212 -------- .../contents/ui/ItemGridDelegate.qml | 118 ----- .../contents/ui/ItemGridView.qml | 485 ------------------ .../contents/ui/ItemMultiGridView.qml | 210 -------- com.github.adhec.DittoMenu/metadata.json | 29 -- .../contents/config/config.qml | 0 .../contents/config/main.xml | 23 +- ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1641 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1478 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1317 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1384 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1658 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 2763 bytes ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin ...lasma_applet_com.github.adhec.MenuDitto.mo | Bin 0 -> 1412 bytes .../contents/ui/ActionMenu.qml | 50 +- .../contents/ui/CompactRepresentation.qml | 55 +- .../contents/ui/ConfigGeneral.qml | 233 +++++++++ .../contents/ui/ItemGridDelegate.qml | 121 +++++ .../contents/ui/ItemGridView.qml | 469 +++++++++++++++++ .../contents/ui/ItemMultiGridView.qml | 257 ++++++++++ .../contents/ui/MenuRepresentation.qml | 468 +++++++++-------- .../contents/ui/code/tools.js | 181 +++++++ .../contents/ui/main.qml | 151 ++++-- com.github.adhec.MenuDitto/metadata.json | 25 + .../translate/ReadMe.md | 20 +- .../translate/build | 6 +- .../translate/fr.po | 95 +++- .../translate/ko.po | 100 +++- .../translate/merge | 4 +- .../translate/nl.po | 95 +++- .../translate/pl.po | 95 +++- .../translate/plasmoidlocaletest | 0 .../translate/pt_BR.po | 100 +++- .../translate/ru.po | 108 ++-- .../translate/template.pot | 66 ++- .../translate/tr.po | 95 +++- push.sh | 3 +- 53 files changed, 2230 insertions(+), 1877 deletions(-) delete mode 100644 com.github.adhec.DittoMenu/contents/code/tools.js delete mode 100644 com.github.adhec.DittoMenu/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/ko/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/ko/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/nl/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/nl/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/ru/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/tr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/locale/tr/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo delete mode 100644 com.github.adhec.DittoMenu/contents/ui/ConfigGeneral.qml delete mode 100644 com.github.adhec.DittoMenu/contents/ui/ItemGridDelegate.qml delete mode 100644 com.github.adhec.DittoMenu/contents/ui/ItemGridView.qml delete mode 100644 com.github.adhec.DittoMenu/contents/ui/ItemMultiGridView.qml delete mode 100644 com.github.adhec.DittoMenu/metadata.json rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/config/config.qml (100%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/config/main.xml (89%) create mode 100644 com.github.adhec.MenuDitto/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo create mode 100644 com.github.adhec.MenuDitto/contents/locale/ko/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo create mode 100644 com.github.adhec.MenuDitto/contents/locale/nl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo create mode 100644 com.github.adhec.MenuDitto/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo create mode 100644 com.github.adhec.MenuDitto/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo create mode 100644 com.github.adhec.MenuDitto/contents/locale/ru/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo rename com.github.adhec.DittoMenu/contents/locale/template/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo => com.github.adhec.MenuDitto/contents/locale/template/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo (100%) create mode 100644 com.github.adhec.MenuDitto/contents/locale/tr/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/ui/ActionMenu.qml (51%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/ui/CompactRepresentation.qml (54%) create mode 100644 com.github.adhec.MenuDitto/contents/ui/ConfigGeneral.qml create mode 100644 com.github.adhec.MenuDitto/contents/ui/ItemGridDelegate.qml create mode 100644 com.github.adhec.MenuDitto/contents/ui/ItemGridView.qml create mode 100644 com.github.adhec.MenuDitto/contents/ui/ItemMultiGridView.qml rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/ui/MenuRepresentation.qml (55%) create mode 100644 com.github.adhec.MenuDitto/contents/ui/code/tools.js rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/contents/ui/main.qml (50%) create mode 100644 com.github.adhec.MenuDitto/metadata.json rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/ReadMe.md (74%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/build (93%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/fr.po (70%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/ko.po (67%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/merge (98%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/nl.po (75%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/pl.po (74%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/plasmoidlocaletest (100%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/pt_BR.po (69%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/ru.po (67%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/template.pot (68%) rename {com.github.adhec.DittoMenu => com.github.adhec.MenuDitto}/translate/tr.po (75%) diff --git a/README.md b/README.md index f2311a5..817423d 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,4 @@ DittoMenu plasmoid [YooMoney](https://yoomoney.ru/to/4100115921160758) -[Qiwi](https://qiwi.com/n/VALERIAFADEEVA) - Etherium 0x981FBf878fe451BDB83BEaF68078394d4B13213f diff --git a/com.github.adhec.DittoMenu/contents/code/tools.js b/com.github.adhec.DittoMenu/contents/code/tools.js deleted file mode 100644 index ffc44d3..0000000 --- a/com.github.adhec.DittoMenu/contents/code/tools.js +++ /dev/null @@ -1,231 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2013 by Aurélien Gâteau * - * Copyright (C) 2013-2015 by Eike Hein * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -.pragma library - -function fillActionMenu(i18n, actionMenu, actionList, favoriteModel, favoriteId) { - // Accessing actionList can be a costly operation, so we don't - // access it until we need the menu. - - var actions = createFavoriteActions(i18n, favoriteModel, favoriteId); - - if (actions) { - if (actionList && actionList.length > 0) { - var separator = { "type": "separator" }; - actionList.unshift(separator); - // actionList = actions.concat(actionList); // this crashes Qt O.o - actionList.unshift.apply(actionList, actions); - } else { - actionList = actions; - } - } - - actionMenu.actionList = actionList; -} - -function createFavoriteActions(i18n, favoriteModel, favoriteId) { - if (favoriteModel === null || !favoriteModel.enabled || favoriteId == null) { - return null; - } - - if ("initForClient" in favoriteModel) { - var activities = favoriteModel.activities.runningActivities; - - if (activities.length <= 1) { - var action = {}; - - if (favoriteModel.isFavorite(favoriteId)) { - action.text = i18n("Remove from Favorites"); - action.icon = "list-remove"; - action.actionId = "_kicker_favorite_remove"; - } else if (favoriteModel.maxFavorites == -1 || favoriteModel.count < favoriteModel.maxFavorites) { - action.text = i18n("Add to Favorites"); - action.icon = "bookmark-new"; - action.actionId = "_kicker_favorite_add"; - } else { - return null; - } - - action.actionArgument = { favoriteModel: favoriteModel, favoriteId: favoriteId }; - - return [action]; - - } else { - var actions = []; - - var linkedActivities = favoriteModel.linkedActivitiesFor(favoriteId); - - // Adding the item to link/unlink to all activities - - var linkedToAllActivities = - !(linkedActivities.indexOf(":global") === -1); - - actions.push({ - text : i18n("On All Activities"), - checkable : true, - - actionId : linkedToAllActivities ? - "_kicker_favorite_remove_from_activity" : - "_kicker_favorite_set_to_activity", - checked : linkedToAllActivities, - - actionArgument : { - favoriteModel: favoriteModel, - favoriteId: favoriteId, - favoriteActivity: "" - } - }); - - - // Adding items for each activity separately - - var addActivityItem = function(activityId, activityName) { - var linkedToThisActivity = - !(linkedActivities.indexOf(activityId) === -1); - - actions.push({ - text : activityName, - checkable : true, - checked : linkedToThisActivity && !linkedToAllActivities, - - actionId : - // If we are on all activities, and the user clicks just one - // specific activity, unlink from everything else - linkedToAllActivities ? "_kicker_favorite_set_to_activity" : - - // If we are linked to the current activity, just unlink from - // that single one - linkedToThisActivity ? "_kicker_favorite_remove_from_activity" : - - // Otherwise, link to this activity, but do not unlink from - // other ones - "_kicker_favorite_add_to_activity", - - actionArgument : { - favoriteModel : favoriteModel, - favoriteId : favoriteId, - favoriteActivity : activityId - } - }); - }; - - // Adding the item to link/unlink to the current activity - - addActivityItem(favoriteModel.activities.currentActivity, i18n("On The Current Activity")); - - actions.push({ - type: "separator", - actionId: "_kicker_favorite_separator" - }); - - // Adding the items for each activity - - activities.forEach(function(activityId) { - addActivityItem(activityId, favoriteModel.activityNameForId(activityId)); - }); - - return [{ - text : i18n("Show In Favorites"), - icon : "favorite", - subActions : actions - }]; - } - } else { - var action = {}; - - if (favoriteModel.isFavorite(favoriteId)) { - action.text = i18n("Remove from Favorites"); - action.icon = "list-remove"; - action.actionId = "_kicker_favorite_remove"; - } else if (favoriteModel.maxFavorites == -1 || favoriteModel.count < favoriteModel.maxFavorites) { - action.text = i18n("Add to Favorites"); - action.icon = "bookmark-new"; - action.actionId = "_kicker_favorite_add"; - } else { - return null; - } - - action.actionArgument = { favoriteModel: favoriteModel, favoriteId: favoriteId }; - - return [action]; - } -} - -function triggerAction(plasmoid, model, index, actionId, actionArgument) { - function startsWith(txt, needle) { - return txt.substr(0, needle.length) === needle; - } - - if (startsWith(actionId, "_kicker_favorite_")) { - handleFavoriteAction(actionId, actionArgument); - return; - } - - var closeRequested = model.trigger(index, actionId, actionArgument); - - if (closeRequested) { - plasmoid.expanded = false; - - return true; - } - - return false; -} - -function handleFavoriteAction(actionId, actionArgument) { - var favoriteId = actionArgument.favoriteId; - var favoriteModel = actionArgument.favoriteModel; - - console.log(actionId); - - if (favoriteModel === null || favoriteId == null) { - return null; - } - - if ("initForClient" in favoriteModel) { - if (actionId == "_kicker_favorite_remove") { - console.log("Removing from all activities"); - favoriteModel.removeFavoriteFrom(favoriteId, ":any"); - - } else if (actionId == "_kicker_favorite_add") { - console.log("Adding to global activity"); - favoriteModel.addFavoriteTo(favoriteId, ":global"); - - } else if (actionId == "_kicker_favorite_remove_from_activity") { - console.log("Removing from a specific activity"); - favoriteModel.removeFavoriteFrom(favoriteId, actionArgument.favoriteActivity); - - } else if (actionId == "_kicker_favorite_add_to_activity") { - console.log("Adding to another activity"); - favoriteModel.addFavoriteTo(favoriteId, actionArgument.favoriteActivity); - - } else if (actionId == "_kicker_favorite_set_to_activity") { - console.log("Removing the item from the favourites, and re-adding it just to be on a specific activity"); - favoriteModel.setFavoriteOn(favoriteId, actionArgument.favoriteActivity); - - } - } else { - if (actionId == "_kicker_favorite_remove") { - favoriteModel.removeFavorite(favoriteId); - } else if (actionId == "_kicker_favorite_add") { - favoriteModel.addFavorite(favoriteId); - } - } -} diff --git a/com.github.adhec.DittoMenu/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo b/com.github.adhec.DittoMenu/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo deleted file mode 100644 index 85301d92e8391aa684c6202ad561863b76e5015b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1871 zcmZ9LzmFS56vqcR0vHG(ArO8XOhh0BtPNeVBq-+W`w{H3x${K|-FSCwPcl2RnVI$F zkoW^AL87FfBJQCy>>Gd>-~ykn&GKivKZ4b$$xI2z~{g1Lxqg;60G^`M2V6B=rjH zWsvl{4AK+g8OlMqKnnI0Cf!Fl)BDlh{Q)V;LHAPaNS!@_NxeaX@}fa{?GMWN1GsQp~KROmcsE3T*I1a%CWL4rq&^lXHBiS$aBwDqzTeh;6odN%~)%313TQm zCXIALvvu_*XLM!EI#Ns}r(8NVxyiQ^C#7Ls%0IVW1%6W30lY7}gV;HAFg*NuxYS^1k0{*ZRF^OHLJC8MQ=^F~8n!ZbjW*)N1neUfkVy zeh|lJ=haN z^ICVK+diz}?fP4_6^q6(xEylDJjmOjk!zvMJLp;A(2tjQ2CLD9!+n$lM2^}fv8giS zm|qyGP-Ez6)ZwU+wu?M>DuaCbyh`R@8_AkCY=H*lqPSf>GG2&Wo@>k_!c#9h$+}7_ zS#W$pL*ZF#KEvk_s$TYNZ9X&e8TInE&_yWQnIgsPg91;3P?QOt%h^I{UFI^MCCHxj ztG4E8!RZCrrp<=vlT=cBTSE!m{imUecj*P|>-QnUZdCg4X77%Q6vu~>@L^gg;j17(Q&di{j+1g|Hi|@=4;qmuCUH0V)0t zNcsK(Uj+ZD`^Qjp6lXdP()zn7{sedtd>VYe?&m>TzXj5Hwm>@H9gyOF1CN7$*XK1z z{oVsZU^9Yg{Uk{HUciU)oB>IYv~i8m~=}V0%ii zF}juuGA&rtlNUu?83PI9ZQ=RQ$>gCCk&&Jf7(IEgT8;NL;>)91z3gO1!69 zGmd4uop^Vahd0$V7V9_8?Z;6qNNDuAahb5)q{+`s*eWz`)Sg1MiKrCxY|bM8xKVSA z^Oi3%mP(mC9Ev(wJQ|~4dTHO}Zl>z`U2UDb_S+Td3^AQ6RIc8jcck+vYWmLwl+E`~$v@=Z^>QLUSHuECzlAYT$K{=Kcyk0V?nj@L%vac>EY+C&828!(c5K z0bd252BY8!u&p}Y1J)oO1Rny2s^cGmk0QPVJ_(M2&w*3mGhm_Ge+Q(zzktt!e}bpM zdmzm}f#g)L4tyCrQ;pvP-^U&k)%a@^e+uK@g3p3KRry=B|8J1;9K$BV{eiUKTD%?u zUjb=dtQvQM_^|=JNdFK>K3E{l9|!ScdAum!3`l-1fiHkJLCW_t_#*f_Nc+17(!5hJ zm-KLu^1cDS2EGkaz9Eo~5XTa>$MJ?Gp?9?)X`uB~Yp-F8;n|X2@($LpQ+VhcsF6R^ zDF0p~O{9;`0MbJ5NjEjpNq2)9X@n%k-Z6cV)lEAq>>TfPgw4&Qw0SZkr6*jTG7U?n zYudsv8jT*E-!DAjR~Gn^r^JYnv;3MiOBgQiLK@b}@g6bLIoBAr1hK^7 z!h?M83R}2_#V(j{az=V|)-8-N!D(8zOpfw_q$`BYdTma%Ta&&yX8IDK)!u8;j&LjQ8k*=@xcxf}GozJB`Eg^ND@qNeBV=>Q{u85ANL{z%zm=mjS ztZz7bwka0r>(%rcEcAsZ-_V4Yw;$np^3+v^tT$%#GB&rNVnnnTEaDK&oYn; z1-lJ9oioxxO9&%-DAxI?jP!K%bR3AQkH#Zy5?8=R4)~yRUwrJx9Lq56W?W6f#kFf0 zOmu4J4(3rUxTkg4NtrV3w9d~Bn||b?R=EYCh(0Ok#xx@TMXeHO=M7IdhM&=SG}33` zqFP#~bhDn$Z6^%9milI1`D}?dN0`bN%2!tD3aN#>THR4UEONCoRodMuFU_;^d_K6o zQu=;3SSxZhvtGV7jS;54nJsM>)z*&))K{}y-I*_KO|sx-G5E5;4=-ZqSIaxWXIlqf zJlL9JSQ*^ftzQ4&#(XfnbF^Cd^If$u7YaL6jj7eU!PX+gP6byN$_tAszpIw#@sHS- zue0Dte3AMcYa+J7FcO}QeBxQmBFpsrQ4gq hY_V=nshTR1#~b-0e)7shrY>))n1)?b6C;0@tIspT+$h z?&omt-i1G0--8|S2QUKv1|I=mxLb&O!7g|Kd;`1>9Dt93!^M6A-h=%ico8hYC&5p_ z$H6Za=ih+A??><{@E7nB_!oE{JaZ30?&+LJX93 zc0G($&?n@2XmR@Bf+)Stjn?WO!!gRM^$F{sXV5s*eR_qSg1$(1c7-~`b>+E;l`dFU zv{$kwl^9LQ%oxX(QYCYft@P_{yWPIiexDut#=#p(c`B>iuk>@4mUa+E^wN~@WLwUS zMItBqtUcQWXkxrKh1hBw#UNFldS#ibM0#bk3klz4%~s|j#EZqAre2;?FY#)wyh22r zjAu;!%38!eeR3@JxiE94sWrt?{)3r0q8TSm*D88o~bltz1pmpBnoVfNG>%aM%Em1;-j53`hcxNgE90C3PAhTK9|P& zXy`JPM(_Q`G0P&RvwciDZw+^bgWD~wwY#mp!E4sYbzGtt&mZ|tnMuvYftNa!5(ap=A#x#Kb~NE5wzry`y*%TB5$!BFhPVtffe@kyZxX=Z@u{rC|nKv3~cEeD6zU6!nA>|wS3e%rP@} z#%Vy5G*pr3ktiss@&{1S@ed$KK}A7H$#-_o50Dt$+-GO@H^0YsfAj0*x%&d+CCoQ4 zf5LndQ$K<~jNiZ(_&b<@mmaO{Zh_BZ{V8}6EWu~M06q?W1vbF1!56{%v;7~y3t0aM zUIHJ0uYf;;F^7k<{lCF@uJM=->x50Vv z1#k_#0^SAR1-}4il44cY9(9VbqmFSrTSK6fDmO?_#YQQWX3=jP&tXO_Vm)y@jTyC% zc_Yl}hhR&AfQrR2XBic0o-5H+bN<-y*5S5vh1J<6Dp>SkLD}!iz#~!*;&+(8EFT>Wp z8L2#Hvrs=VNhDZrkvvz7=sA19Sx7eX zo6P3Q6e%qYRA}5y>Mvg<+p`>d<2wBJG@4E)8`hN`DU7S7Us+tH`f=r|p@kLdTw894 zEyefPJpA%|(NkHlg_9*s*&V5aJbpc~9WF^;8kNp; diff --git a/com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo b/com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo deleted file mode 100644 index f090af26eb81f2b19a84bd0a4bba38b11e9bf32c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1631 zcmZ9M&u<$=6vqb$KVk}nmY)(oUJvB}S=)(<6fM6RoRmf(jg>l7LL3FaXcoE5u{q4)_50A@~T`2Ok6r@Copf`T7fR0qd{9 z`@wI)$HDKwr@P3{$%FOsKuY3aOq68m8<^IV zb?{(+oHOg@!Sy|X$@w7sG+$s^XK`M8m4@1+$`rJdDMLE4hN6MBxpEY1nb`h9Yr3r0 z>v!Als$BWm1#c-v=({2uf2v_>~sc-T7`26aQmbZyDGK& zih9nb$3$En*pfEQ|95(~RZ>s8+>5DMBD*TdNgMK|r9>M~Xa(+Ej_QvqKg6U^5QhQ!YmxLOcT( z3QttqRhe}@*v|Vp4&E;MdC;*T4ZP3tu+iviKPbBO$fgY$4^-5cUfjmTt@Vvsdnedc z`(Z-`R+=j-LGxVDe3h1);ko83&E;mZ_O8r*&~eh_iS*WmwB^QCKK8apTh_@g zy*>i6EI)4xpIAHMfN$cO=@+uEf{v1DNJs0CvZS`XxxH~GpXGY9*0N{?gFq-%rZ7ujun||j7*ghJ-^sM% zFgyL5*ZHV5Rve5Q6X9eiE=ekL)XI-E8bFSGRT?`vh_pmp975>i#^KdS4UZq<@r%i4 zG(Ik}ZAWr)gUaK3m*g-*rX^*w!+B0z>% diff --git a/com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo b/com.github.adhec.DittoMenu/contents/locale/pl/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo deleted file mode 100644 index 6cfe3a311697304f139823a8aa88cf9ef13067ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1723 zcmZ9M%WoS+9LE<3(3(dfyb+Hd2TsY_PAFBoJQU-kZ4~lQ>QIT>cz0}%y*sm-oz1d7 zqJ~Nci3>fT@E0J&fn0j%EwMNvp`JK!f*TTNZvFmjCrub>{MmW@Uf=z#|D2t<<6*pl z`3B~F%(pSWc?3Tg=N|RE8h9S`!7Cu&>w?dLx4|Iy$ z?JB3>7CWt;q-Jg{0vw-|-nLB4uB47N$*Cl6^h`mk`u{tf<1DG8Z05Z2wOF)eoRQMx z3PZ8dh<2mQpeSuw*^!7BVyjiAl2Eqfax;h%_K36J(LEJKQol2Kk|dD$WQ)Y9O1&L^ z71vE7y)A3{GIaiGnotn=5iu8RCm@^0q0Oh7&7(k!UeGH0x; z4kB4Kwp&YU3-2u~Ub=LpR@vJ0x8<&4Z~n4yGN8r!;-X)_=-1z;g?ezYK389;*DIfj z%=s-VbQTNv3TVv^%WUXOht>?b%R6~<|3^U!$MOXSQDUyIr)&Zq) zWqoyhLX`RwRc9 zg|}=X(Wl5z9_MXnRE9k`9PL{Z4PdY3+0{I0f!nc!VS;P$kLE31-amF)a!Q-s!vj8Q z4kahX{fpE@;B5#hGU)0C3Vk95t}L_}?T1PrE)G%D=-$y@DEp@m(Iffj77b4)xn%}o zbdQSDdmEykLY0Ej$>Fpnbk<~@nkZFS38SbuJU{~I>T%?q%!xut)+QUbxG7LL?heW2 zPW0zVv|)yR$Oq!+_E`048S~6TTB7ZzkE(xCvZQ=qONVa(U;03Ved(1$ diff --git a/com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo b/com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo deleted file mode 100644 index 66e473a0190817e515779f6469476dedfbd92899..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1945 zcmZ9MJ&YSg6vroE2r*wt_zaL}Xd*?hb`VY219Y47-kpVgKKTOyLPF!+u|2Rmvo|w) zmlIS-lprWlQbZIqNE8TB0&+n~MF}kuLP}4?|E>3M$jGbTzPB^)d;G`w#!ZHG5zljY z8mAb$0{#us`urZo+Ta&p0R9Y~1#g27fb3qz?g!3*4})jH)8HlWaqu#D2HdFiG1!3I z2k!%i_4l{H2O&>EvZKLs;78yi;Age`CHNHNZ^0+PUuymDAo;ruJ`FbD8$ z{MaisH$k$$15*9=LCR0mbRgOJ1bh;_36kG$K+5w+kn;Ntq(1!xQXZ!f#53UKnh{8G zybC@H&OoyFF<7@0Qq{J~AK9XKC}vt0R;X;ydGbw*dPDJ6JtqYg)rWfZ5FUz^7R7>6 zR*ULL3!$>d@K78Wn`+jmM@>AmC@+M!TARwtJXAWDy5xgGYOWHad9pCZNy}3uGBa;% zRbs2vV*lGelur890dIIJXQIq}V=I%w@-EDPu<;mENl%eW{C$F`*Q($?Tp zgR%_+Vp@#+vq5H2+1h2&eMwTSoR%P||u+`!+= zn*5IBMhkPqyZUa;>?C_WQ`UJ_ZOg<|W{xY({gL6B((pDqc4!9Qw{j-oFM(=&Tu8ov zL}hfSYqF@aoalv0Q>mY4)tlr3fv;3l-~S57Ce+1UlS{U5&HFO(K{pNFl-8jlA=*oI zN0pjGSs3eszMHEwxL(d(Fg77ycwe}%-JUDID5tH&j{Wys%-qhZh=1f7WQ4#Ix-g?9#fakD3!55`t#mkDod$hRlG9^Z@lF@H7gN8R3L z)aeZ4(dcz-)$>x!WiXZ^4|y-z+nGc=*w^cAW~ycEe7z^+g@5n*u-WhS<8^8;wXQa| z42Dd@C#o27FK_sEkqMAOMOObQvl!kW1ixmXRnHPygdgTBL!GM4R&)Gog=)yTsP z998>IrX99+s#zao%UhWC+V4mxTg|~(W&#(FPcw5+N@dtSrhWM}Eb`QF>MRYpghy${7#JC@niWkBP vUPy;`SM^3xAgN(}<2<^Bo3OeFhj4@jW*)(Il$Cz@9g0t8C$3!H!aMsH2G{5b diff --git a/com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo b/com.github.adhec.DittoMenu/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo deleted file mode 100644 index 20eb7030e29f0eca78231e07e8b755096ad57a89..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2054 zcmZ9MONb*y7{|-q@fBA`$Mvy3%Yz4TJ8=}oHM%lAlgvyYnGAU-K0qqnm89HGRc}@G zJn$%ZTM%SD>}eN4K~NMQum?}^;>C;LQS{(h@FIBf|8;sM;}qTbRaIAg?=QbCEnH<7 zPvU(H@7Y@zdj>pn3O^WMffev;FaZAm>D=OJ#_k2rgLi-z!P~$M@NTdL-VVM6mcR%+ z3u^FA@crWZ6>tITtKhBRwc`7A@Gh)B2T9)d;C-FAB>QlX|70`8k8Gnswjs3nAU|n9b?yVjh05+6Ub6WNUK(T{#fI|8R+X2N zs?rmwGu}?6<|;CpM`L50v^-WKF{6d`d|57+|9`$Co%FK{-tbrsMV9!5^+XEG8xX@n zj^CjgWmXIl$rF+3XbiEWjfHW{acx8F8Vf5N3zLM4G<9rUYA# z*mgDJ{4D=1HnH=-8 zJ2rc~p-=7%4+Fu6$~w>TV~H5Z#Brs$-!nW>8rr%C4oTxXRt_cfMcC>cq>>}Dk|OF5 z|7e_h+1Fzg$5KDV@|olUhR?Pr)JK71eaiNhnMk%{&AT%4K_d=clhz?3Rg?jx08uJ+ zWNNGrT5hD`U@aTDpl7Ol?0xF0m5TGm%JQXHmW>@%(#rA+%g?W@yi_Uew1bY^RU|E_ z2`{Vsje6J#TJ4|~@~w8Y)p+*J_IAD06wU`dE3``lWL5b_zuDy5VXMwxskg#Lb2Y5h zI`wY%RUFl$OpIjElVVck&2W3OA8z7Yv$>imGGKnD%2WT&TBp=%wCZ!OmdnqT)(uKc zLni`QPf&ufaGV}$kXXbh&}}haVV0pSXU&2C7XH%b3D;ECJu)GcwRs)Ib6u8{vgTR_mqp5EBwFvw#n#8PKqWEs(N67BJTMGCOnF9XmT`nVAKN zK2V6Fp#iV4F)7uU_~L`x6$)J_#zf=m86SMp=)1B1fDe9uXP1jD@g&1%&+Yg7eZRlM z@6Ao0GK}N+p2XL58)MIae}ObUxSg>!@I%l5e*lkwH^93=b_Zj30f)i+z$4%x@C5iU z*a{v7I~(h1unF@Fcqf=`?7s@$gLw|5I6n9w_%?VyxYU?m0w2ZvTkt6Ob7TECkn-IC zkAY1{(hMF4>3lm#b@YQLz-(ha37&%1w?N9bjiSg41-62JgHM1*Au<7WfaFsbNO8}C zt>7d``7VNV?i-Nmz6#z8{?wTN0zQuUpCHBk2Yebl2GgDbyTA_cb?{km32X(gHTVbk z0_KNc{)?aqwt$mhJNPk3I(`H@!Cyhj(+u&AmSU#c#vTAk3-yzFLF2JHv{zbpV@|!H zxCpm9NI&(8^pSQNqzzW;LHcPxB6|qmBlz%aw7=9N@`(oZ4YKN^+l@rgbp4|6%Y3*b zeD2!P=XOELPz2m@El=i~dh|4zOtSx+&x%k)^$U^Yj+n5@Uewg%2`k_O2*Xm2!?APP znvww$g)HTH+$xnq)+78#1P$<_Bqv; zvLkm2S5Pii#tMS>l!E~E?(EF4tSCz4n+RlapSaP2oaO`m%_|c->iL8lgb~xnJS!)> zkh?yQrX}}WAK6A{LNtSq1Y$xUpN*xlnUdfI%*e(NzS;$?a@;StjwAdQrhf@;q44?= z`MYZz8>cSz%c5W-fqX;Qkul&HuZSRoBPQBQzQd(NR+MBA8JRHeI>xDTJ~YOp$qP|b z3eC2*yc-qDxuh+NZI)9IcALIP_MYiYCq{;iteA2sq|s|d!sKVusjQJ1HhNRMf7r|n zJono0P&zSag^@89SbpePkqk_pcBZYs;b*J>w|JM()8sil?VhocLHT7|^7CaYFN`r^ z6-_>v8tNNQ^`&{&;9$4sCS{P{J7e;ooX8Ah(t8R!lI@8eiMQq>HOw@5B;JhLN}lEV zop|O}fG7OY_}FRVOp z%Luv#Yc5c@6>i(V+~o?cT7gdZ}xVp-b!+? z0(}+TPKe!i>wrhHf>QCCAhv?{pY@ zP4OaLAKk)TJYc#_>owY^c$@KZy*k{W3iVro&pXxP{VcW|q?)=wnQD|0i5IEc2R?B6 TAK5~Y?;+N5JzWLw8_C$eq8O2> diff --git a/com.github.adhec.DittoMenu/contents/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo b/com.github.adhec.DittoMenu/contents/locale/ru/LC_MESSAGES/plasma_applet_org.kde.plasma.dittomenu.mo deleted file mode 100644 index 5928c476b35a6ed29a28a949d98bc79484d72036..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2485 zcmaKr+ix316vn3zZl)0Eg-f|~B19#iYd1j(#cfbb;#^caiE=?Ih=+}LY;UvPv3A!< z^VT+kf>IJdRM1GIMMyj#Avqyw66bo=#*abcYroo56 z_rM640S|#L_y{;v+y4Y?!2Bxs0616MzX3jq`S&3Cy9quC{sKM@{#Kj+1wM`WKj2}o z5zff&Wsu^%0X_q!zyqKF$^JY@d3*}K2+q~!YhW8RxCN4*eJJV$@E~{+YzB{k=fLN{ z&p@j02at4G1CtDgIH2LiQ~n)zJp-2UE5AS?~zvd64{1fiHpALF&;h zuo?Uld=)$l@yUOCjXAId^BJ%e{26QlZ-XbmBPg2cIs={p-v=qqH4tU*49KbNNE^x< z>FYtZG^jVE3)M<_QI8Jdft#H{bvELmI;j^lNFzwA2i+eUC`I><`cK#HSv;fx=|bZv zJV;;nk+s`_D8y~IAlwq~FAA628R_y&UP@nh+_Fta<{CQmG#ZWGX+J1@5mXNZl3OBc zmYkrW!x5&(d*Oy9INn)1SMtnJM{vh1xtToNQZ$yZERJJc=D75bh0hX>!_8vRXC1-~ zgjWL}l|dj2th4H#b=sKnG?3a+b7MaS9%MF++4}b31e88g*ZpHoQu%VG0p>VK8O_^({@kcPcS{)^0txT zF5_g~j#7mBM$*kl%XV{desa_fB20ZAPOF9Rf+~lX!Yg#q)O>hZt%euFOL$|As};40 z?aOLQRhar3pV*@lYE>=by{tB{wakHKwHeNE^%Hhi)jC#h(h|PcnEC?K1(+{xyIthi zSg8hw(Iz>ed@ho&JubporoPhw5SyuQwA+<%3Z`m{haYZlg;Pvjr zm-M~HUK!PsBo*YcE1u5w4z21+GBt+->o{;3F{mSps0b)Vt^JSbxAn`T+qt)=KdP;2jTJ;) z*%leizgydlYFA0YGU_Yq&Z5{|r|xlI=8-Bc79=g>w$)pRWhjk$DS5Pr*CkP_lu%h8 zL9^*Hhtt@H&ZIG93a4=q=@ic5C!o``UZH*Rw;s+`v%?9>P~R2kyqzt6gXyMwRZU%> dNEHf+z|;SE*XeiJK$0K9*K9Rh8CM;_*uSuj%ozXx diff --git a/com.github.adhec.DittoMenu/contents/locale/tr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo b/com.github.adhec.DittoMenu/contents/locale/tr/LC_MESSAGES/plasma_applet_com.github.adhec.DittoMenu.mo deleted file mode 100644 index 5f68b1c1f3ab8563d181ea6ab7f7842c08530822..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1665 zcmZ9LJ&fZ-6vqeH<0Bk!9N!WgZwo4La!13;%b_)iHyd5DS>@vd*TBS{*hB1bG#=;3 z3Xl*5HAqk(Br0?g6=|S3i6SYHDCp_vD4?R{KTh^`mr?AW=gpgW|M%wQkIP$MF^p&N zyol#lJTKw-=svtK{swE{KcE9{-_O`3unRs2z7IYIM&LtW0X_|WyqSLqZejincmezl zd=mT~d=C5>d2QNOr*k$k)(E9IykAO$u74X((J_kRA#?QbC>=zL1 z3GfnV;}K|eybeALz5zZ8?tw3WZ4f^;#><|cfHt2QXybnZT0LKYR^JccQ{XQf`|se( znEwUZco$KeZSV?c>$Ha#flbh!6N8Xj4ttKRsr9qktZqAOUF|?hrB;-rjBRZ;7pu#T z$MM*lt!_KY_@LDfIpy5~Wu4icG$M7SN`)$@I~9s#kSPk{EX#$aQ1T>;w(8}yTCJY< z?}=QP^#+qsD8{@<%vL=STvH3jFfR-VEBkzwX#~nyT__{;1~kfy$x_x>Z)AQb4SCaP zA_Hz@rg9swDU{GWVF&UxV)js%brpF@LSA6xOd5$}VHw1N>V?(_aI!LIJ&|TJL1Uez zXGHYl>^8O3|1IMal{A(*H>`9^_(&uw7(?({&mi9dzAJ>(yJ`L%-7Ixp4-Xt32T*(=P1~+ig1ZIzGMWcf3}6&ucV# ze!u?~Tvb%?NH_z*Q@l}w8QbjK9jHIa?B?Y>~+0S&EyQHS&G{1gr zm)4)xukKdfaZcnSl74T{gQcGpIuK_T>J`=(%R8x<*!%0tG!k=31Ch$(M6h)yCqm;+ z$)CW|)rOZZT&-a@p_$KDi-apSoJU2%Q=V|WT2Nzo_gJVzob+_UIzq>M#L?FM)sG0{ zvcd9hO1_y$l}Mb8AaI%mg}G;><+sN|qYKX~S$@7+Ot?O4q~`J`w5evxuhF5jZf=|@ zDcUUfMoxq&O>!bB=VrCgA-}iYmt~s|gbrkE-I%A5&V=Oh4*m}#6nxHU&W~3MwOSmP n{oX{CXbpuL24{Q+SO9+qPlI<3 z{r`eX=pTDfh=;%v;8Wm9@Hy}-_zd{^p}z|9{Hq{q^x!G*bCAb>13m)&1ilFVa@hY1 z{1`d>1G0`Df;|D|Am{T5$Z>xFSW`{%;s|5 zY^;}SwJ_Gl#&Ov=FWwW*gN^fNop zLnqrtk�i_pmHS6H$^7rftZ*%t1vi)|K_j9fI1K_gN}R^HoJjqf1quSWdL3XfQB3 zmR@HzXJMPlDkqKD(yx%<;Gw8lij1Ks_IgiyjR^2Gdy3YF&LP&~&q&l&n(Zm-xGX)Q zr_sx<(YF1+r?U`D9qn>2X2XnZE0dG9kL=^)1`eNuuoX{7aF9@VSfRkxWI4cV#O}mDqLJ2P*c#b`o4xE=L_gY!}xIH7eBA zAag#b=3SixZx6e9(9A;Wc|XX*VlnrbQ!D*Mtz@oS928eyTYdHX`8SG%-C9srdzx1Z zO46&4u9TyCP^|@}h_-5Bb^GP_YCGjZMdm(eI%#twu~tYMtxAPTNrA)L)le9Q^_=>O0=`tiZ(H>Qdu*a1>74GQlYwCE#FIMb>&=PJ;SlE2#4B* zxu9n8A< zrPYfx|GaeWV&UCjAs3O{)n*-@MmBV@I`U(^AR20NBUOFgx`s}>YNV;DQoV1KxFQGB zv5_{Jjvarrwb72++~m!#QLgDYo{sqnOb+tNfta6vqa3!M%6+U*b6(C~I0ar@Mvihc zTk_~7XpOoGVlYZr~QRu~#EWBe_2v+v#|Jc1t! * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -import QtQuick 2.0 -import QtQuick.Controls 1.0 -import QtQuick.Dialogs 1.2 -import QtQuick.Layouts 1.0 - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents - -import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons -import org.kde.draganddrop 2.0 as DragDrop - -import org.kde.kirigami 2.4 as Kirigami - - -Kirigami.FormLayout { - id: configGeneral - - - property string cfg_icon: plasmoid.configuration.icon - property bool cfg_useCustomButtonImage: plasmoid.configuration.useCustomButtonImage - property string cfg_customButtonImage: plasmoid.configuration.customButtonImage - - //property alias cfg_appNameFormat: appNameFormat.currentIndex - //property alias cfg_switchCategoriesOnHover: switchCategoriesOnHover.checked - - //property alias cfg_useExtraRunners: useExtraRunners.checked - - property alias cfg_numberColumns: numberColumns.value - property alias cfg_numberRows: numberRows.value - property alias cfg_showFavoritesFirst: showFavoritesFirst.checked - - - property alias cfg_labels2lines: labels2lines.checked - property alias cfg_displayPosition: displayPosition.currentIndex - - - RowLayout { - spacing: PlasmaCore.Units.smallSpacing - Kirigami.FormData.label: i18n("Icon:") - - - Button { - id: iconButton - Layout.minimumWidth: previewFrame.width + PlasmaCore.Units.smallSpacing * 2 - Layout.maximumWidth: Layout.minimumWidth - Layout.minimumHeight: previewFrame.height + PlasmaCore.Units.smallSpacing * 2 - Layout.maximumHeight: Layout.minimumWidth - - DragDrop.DropArea { - id: dropArea - - property bool containsAcceptableDrag: false - - anchors.fill: parent - - onDragEnter: { - // Cannot use string operations (e.g. indexOf()) on "url" basic type. - var urlString = event.mimeData.url.toString(); - - // This list is also hardcoded in KIconDialog. - var extensions = [".png", ".xpm", ".svg", ".svgz"]; - containsAcceptableDrag = urlString.indexOf("file:///") === 0 && extensions.some(function (extension) { - return urlString.indexOf(extension) === urlString.length - extension.length; // "endsWith" - }); - - if (!containsAcceptableDrag) { - event.ignore(); - } - } - onDragLeave: containsAcceptableDrag = false - - onDrop: { - if (containsAcceptableDrag) { - // Strip file:// prefix, we already verified in onDragEnter that we have only local URLs. - iconDialog.setCustomButtonImage(event.mimeData.url.toString().substr("file://".length)); - } - containsAcceptableDrag = false; - } - } - - KQuickAddons.IconDialog { - id: iconDialog - - function setCustomButtonImage(image) { - cfg_customButtonImage = image || cfg_icon || "start-here-kde" - cfg_useCustomButtonImage = true; - } - - onIconNameChanged: setCustomButtonImage(iconName); - } - - // just to provide some visual feedback, cannot have checked without checkable enabled - checkable: true - checked: dropArea.containsAcceptableDrag - onClicked: { - checked = Qt.binding(function() { // never actually allow it being checked - return iconMenu.status === PlasmaComponents.DialogStatus.Open || dropArea.containsAcceptableDrag; - }) - - iconMenu.open(0, height) - } - - PlasmaCore.FrameSvgItem { - id: previewFrame - anchors.centerIn: parent - imagePath: plasmoid.location === PlasmaCore.Types.Vertical || plasmoid.location === PlasmaCore.Types.Horizontal - ? "widgets/panel-background" : "widgets/background" - width: PlasmaCore.Units.iconSizes.large + fixedMargins.left + fixedMargins.right - height: PlasmaCore.Units.iconSizes.large + fixedMargins.top + fixedMargins.bottom - - PlasmaCore.IconItem { - anchors.centerIn: parent - width: PlasmaCore.Units.iconSizes.large - height: width - source: cfg_useCustomButtonImage ? cfg_customButtonImage : cfg_icon - } - } - } - - // QQC Menu can only be opened at cursor position, not a random one - PlasmaComponents.ContextMenu { - id: iconMenu - visualParent: iconButton - - PlasmaComponents.MenuItem { - text: i18nc("@item:inmenu Open icon chooser dialog", "Choose...") - icon: "document-open-folder" - onClicked: iconDialog.open() - } - PlasmaComponents.MenuItem { - text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") - icon: "edit-clear" - onClicked: { - cfg_useCustomButtonImage = false; - } - } - } - } - - - CheckBox { - id: showFavoritesFirst - Kirigami.FormData.label: i18n("Show favorites first") - } - - ComboBox { - Kirigami.FormData.label: i18n("Menu position") - id: displayPosition - model: [ - i18n("Default"), - i18n("Center"), - i18n("Center bottom"), - ] - onActivated: cfg_displayPosition = currentIndex - } - - - CheckBox { - id: labels2lines - text: i18n("Show labels in two lines") - } - - SpinBox{ - id: numberColumns - minimumValue: 4 - maximumValue: 10 - Kirigami.FormData.label: i18n("Number of columns") - - } - - SpinBox{ - id: numberRows - minimumValue: 1 - maximumValue: 10 - Kirigami.FormData.label: i18n("Number of rows") - } - - RowLayout{ - - //Layout.fillWidth: true - Button { - text: i18n("Unhide all hidden applications") - onClicked: { - plasmoid.configuration.hiddenApplications = [""]; - unhideAllAppsPopup.text = i18n("Unhidden!"); - } - } - Label { - id: unhideAllAppsPopup - } - } - -} diff --git a/com.github.adhec.DittoMenu/contents/ui/ItemGridDelegate.qml b/com.github.adhec.DittoMenu/contents/ui/ItemGridDelegate.qml deleted file mode 100644 index 533f25c..0000000 --- a/com.github.adhec.DittoMenu/contents/ui/ItemGridDelegate.qml +++ /dev/null @@ -1,118 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Eike Hein * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -import QtQuick 2.0 - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents - -import "../code/tools.js" as Tools - -Item { - id: item - - width: GridView.view.cellWidth - height: GridView.view.cellHeight - - property bool showLabel: true - - property int itemIndex: model.index - property string favoriteId: model.favoriteId !== undefined ? model.favoriteId : "" - property url url: model.url !== undefined ? model.url : "" - property variant icon: model.decoration !== undefined ? model.decoration : "" - property var m: model - property bool hasActionList: ((model.favoriteId !== null) - || (("hasActionList" in model) && (model.hasActionList === true))) - - Accessible.role: Accessible.MenuItem - Accessible.name: model.display - - function openActionMenu(x, y) { - var actionList = hasActionList ? model.actionList : []; - Tools.fillActionMenu(i18n, actionMenu, actionList, GridView.view.model.favoritesModel, model.favoriteId); - actionMenu.visualParent = item; - actionMenu.open(x, y); - } - - function actionTriggered(actionId, actionArgument) { - var close = (Tools.triggerAction(plasmoid, GridView.view.model, model.index, actionId, actionArgument) === true); - if (close) root.toggle(); - } - - Item{ - height: iconSize + PlasmaCore.Units.gridUnit * 2 + PlasmaCore.Units.smallSpacing - width: parent.width - anchors.centerIn: parent - - PlasmaCore.IconItem { - id: icon - anchors{ - top: parent.top - horizontalCenter: parent.horizontalCenter - } - width: root.iconSize - height: width - colorGroup: PlasmaCore.Theme.ComplementaryColorGroup - animated: false - usesPlasmaTheme: item.GridView.view.usesPlasmaTheme - source: model.decoration - } - - PlasmaComponents.Label { - id: label - visible: showLabel - anchors { - top: icon.bottom - topMargin: PlasmaCore.Units.smallSpacing - horizontalCenter: parent.horizontalCenter - } - maximumLineCount: plasmoid.configuration.labels2lines ? 2 : 1 - horizontalAlignment: Text.AlignHCenter - width: parent.width - PlasmaCore.Units.largeSpacing - height: PlasmaCore.Units.gridUnit * 2 - elide: Text.ElideRight - wrapMode: Text.Wrap - color: theme.textColor - text: ("name" in model ? model.name : model.display) - } - } - PlasmaCore.ToolTipArea { - id: toolTip - property string text: model.display - anchors.fill: parent - active: root.visible && label.truncated - mainItem: toolTipDelegate - onContainsMouseChanged: item.GridView.view.itemContainsMouseChanged(containsMouse) - } - - Keys.onPressed: { - if (event.key === Qt.Key_Menu && hasActionList) { - event.accepted = true; - openActionMenu(item); - } else if ((event.key === Qt.Key_Enter || event.key === Qt.Key_Return)) { - event.accepted = true; - if ("trigger" in GridView.view.model) { - GridView.view.model.trigger(index, "", null); - root.toggle(); - } - - itemGrid.itemActivated(index, "", null); - } - } -} diff --git a/com.github.adhec.DittoMenu/contents/ui/ItemGridView.qml b/com.github.adhec.DittoMenu/contents/ui/ItemGridView.qml deleted file mode 100644 index aefb9e9..0000000 --- a/com.github.adhec.DittoMenu/contents/ui/ItemGridView.qml +++ /dev/null @@ -1,485 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Eike Hein * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -import QtQuick 2.4 - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.extras 2.0 as PlasmaExtras -import org.kde.kquickcontrolsaddons 2.0 -import org.kde.draganddrop 2.0 -import QtQuick.Controls 2.12 - -FocusScope { - id: itemGrid - - signal keyNavLeft - signal keyNavRight - signal keyNavUp - signal keyNavDown - - signal itemActivated(int index, string actionId, string argument) - - property bool dragEnabled: false - property bool dropEnabled: false - property bool showLabels: true - property alias usesPlasmaTheme: gridView.usesPlasmaTheme - - property alias currentIndex: gridView.currentIndex - property alias currentItem: gridView.currentItem - property alias contentItem: gridView.contentItem - property alias count: gridView.count - property alias model: gridView.model - - property alias cellWidth: gridView.cellWidth - property alias cellHeight: gridView.cellHeight - property alias iconSize: gridView.iconSize - property alias scrollBar: scrollArea - - //<>property alias horizontalScrollBarPolicy: scrollArea.horizontalScrollBarPolicy - //<>property alias verticalScrollBarPolicy: scrollArea.verticalScrollBarPolicy - - onDropEnabledChanged: { - if (!dropEnabled && "dropPlaceHolderIndex" in model) { - model.dropPlaceHolderIndex = -1; - } - } - - onFocusChanged: { - if (!focus) { - currentIndex = -1; - } - } - - function currentRow() { - if (currentIndex == -1) { - return -1; - } - - return Math.floor(currentIndex / Math.floor(width / itemGrid.cellWidth)); - } - - function currentCol() { - if (currentIndex == -1) { - return -1; - } - - return currentIndex - (currentRow() * Math.floor(width / itemGrid.cellWidth)); - } - - function lastRow() { - var columns = Math.floor(width / itemGrid.cellWidth); - return Math.ceil(count / columns) - 1; - } - - function tryActivate(row, col) { - if (count) { - var columns = Math.floor(width / itemGrid.cellWidth); - var rows = Math.ceil(count / columns); - row = Math.min(row, rows - 1); - col = Math.min(col, columns - 1); - currentIndex = Math.min(row ? ((Math.max(1, row) * columns) + col) - : col, - count - 1); - - focus = true; - } - } - - function forceLayout() { - gridView.forceLayout(); - } - - ActionMenu { - id: actionMenu - - onActionClicked: { - visualParent.actionTriggered(actionId, actionArgument); - } - } - - DropArea { - id: dropArea - - anchors.fill: parent - - onDragMove: { - if (!itemGrid.dropEnabled || gridView.animating || !kicker.dragSource) { - return; - } - - var x = Math.max(0, event.x - (width % itemGrid.cellWidth)); - var cPos = mapToItem(gridView.contentItem, x, event.y); - var item = gridView.itemAt(cPos.x, cPos.y); - - if (item) { - if (kicker.dragSource.parent === gridView.contentItem) { - if (item !== kicker.dragSource) { - item.GridView.view.model.moveRow(dragSource.itemIndex, item.itemIndex); - } - } else if (kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model - && !itemGrid.model.isFavorite(kicker.dragSource.favoriteId)) { - var hasPlaceholder = (itemGrid.model.dropPlaceholderIndex !== -1); - - itemGrid.model.dropPlaceholderIndex = item.itemIndex; - - if (!hasPlaceholder) { - gridView.currentIndex = (item.itemIndex - 1); - } - } - } else if (kicker.dragSource.parent !== gridView.contentItem - && kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model - && !itemGrid.model.isFavorite(kicker.dragSource.favoriteId)) { - var hasPlaceholder = (itemGrid.model.dropPlaceholderIndex !== -1); - - itemGrid.model.dropPlaceholderIndex = hasPlaceholder ? itemGrid.model.count - 1 : itemGrid.model.count; - - if (!hasPlaceholder) { - gridView.currentIndex = (itemGrid.model.count - 1); - } - } else { - itemGrid.model.dropPlaceholderIndex = -1; - gridView.currentIndex = -1; - } - } - - onDragLeave: { - if ("dropPlaceholderIndex" in itemGrid.model) { - itemGrid.model.dropPlaceholderIndex = -1; - gridView.currentIndex = -1; - } - } - - onDrop: { - if (kicker.dragSource && kicker.dragSource.parent !== gridView.contentItem && kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model) { - itemGrid.model.addFavorite(kicker.dragSource.favoriteId, itemGrid.model.dropPlaceholderIndex); - gridView.currentIndex = -1; - } - } - - Timer { - id: resetAnimationDurationTimer - - interval: 120 - repeat: false - - onTriggered: { - gridView.animationDuration = interval - 20; - } - } - - //PlasmaExtras.ScrollArea - Flickable{ - id: scrollArea - - clip: true - anchors.fill: parent - boundsBehavior: Flickable.StopAtBounds - interactive: false - focus: true - - GridView { - id: gridView - width: itemGrid.width - height: itemGrid.height - - signal itemContainsMouseChanged(bool containsMouse) - - property bool usesPlasmaTheme: false - - property int iconSize: PlasmaCore.Units.iconSizes.huge - - property bool animating: false - property int animationDuration: itemGrid.dropEnabled ? resetAnimationDurationTimer.interval : 0 - - focus: true - snapMode: GridView.SnapToRow - - ScrollBar.vertical: ScrollBar { - visible: true - active: true - policy: ScrollBar.AlwaysOn; - } - - currentIndex: -1 - - move: Transition { - enabled: itemGrid.dropEnabled - - SequentialAnimation { - PropertyAction { target: gridView; property: "animating"; value: true } - - NumberAnimation { - duration: gridView.animationDuration - properties: "x, y" - easing.type: Easing.OutQuad - } - - PropertyAction { target: gridView; property: "animating"; value: false } - } - } - - moveDisplaced: Transition { - enabled: itemGrid.dropEnabled - - SequentialAnimation { - PropertyAction { target: gridView; property: "animating"; value: true } - - NumberAnimation { - duration: gridView.animationDuration - properties: "x, y" - easing.type: Easing.OutQuad - } - - PropertyAction { target: gridView; property: "animating"; value: false } - } - } - - keyNavigationWraps: false - boundsBehavior: Flickable.StopAtBounds - - delegate: ItemGridDelegate { - showLabel: itemGrid.showLabels - } - - highlight: Item { - property bool isDropPlaceHolder: "dropPlaceholderIndex" in itemGrid.model && itemGrid.currentIndex === itemGrid.model.dropPlaceholderIndex - - PlasmaComponents.Highlight { - visible: gridView.currentItem && !isDropPlaceHolder - - anchors.fill: parent - } - - PlasmaCore.FrameSvgItem { - visible: gridView.currentItem && isDropPlaceHolder - - anchors.fill: parent - - imagePath: "widgets/viewitem" - prefix: "selected" - - opacity: 0.5 - - PlasmaCore.IconItem { - anchors { - right: parent.right - rightMargin: parent.margins.right - bottom: parent.bottom - bottomMargin: parent.margins.bottom - } - - width: PlasmaCore.Units.iconSizes.smallMedium - height: width - - source: "list-add" - active: false - } - } - } - - highlightFollowsCurrentItem: true - highlightMoveDuration: 0 - - onCurrentIndexChanged: { - if (currentIndex != -1) { - hoverArea.hoverEnabled = false - focus = true; - } - } - - onCountChanged: { - animationDuration = 0; - resetAnimationDurationTimer.start(); - } - - onModelChanged: { - currentIndex = -1; - } - - Keys.onLeftPressed: { - if (itemGrid.currentCol() !== 0) { - event.accepted = true; - moveCurrentIndexLeft(); - } else { - itemGrid.keyNavLeft(); - } - } - - Keys.onRightPressed: { - var columns = Math.floor(width / cellWidth); - - if (itemGrid.currentCol() !== columns - 1 && currentIndex != count -1) { - event.accepted = true; - moveCurrentIndexRight(); - } else { - itemGrid.keyNavRight(); - } - } - - Keys.onUpPressed: { - if (itemGrid.currentRow() !== 0) { - event.accepted = true; - moveCurrentIndexUp(); - positionViewAtIndex(currentIndex, GridView.Contain); - } else { - itemGrid.keyNavUp(); - } - } - - Keys.onDownPressed: { - if (itemGrid.currentRow() < itemGrid.lastRow()) { - // Fix moveCurrentIndexDown()'s lack of proper spatial nav down - // into partial columns. - event.accepted = true; - var columns = Math.floor(width / cellWidth); - var newIndex = currentIndex + columns; - currentIndex = Math.min(newIndex, count - 1); - positionViewAtIndex(currentIndex, GridView.Contain); - } else { - itemGrid.keyNavDown(); - } - } - - onItemContainsMouseChanged: { - if (!containsMouse) { - if (!actionMenu.opened) { - gridView.currentIndex = -1; - } - - hoverArea.pressX = -1; - hoverArea.pressY = -1; - hoverArea.lastX = -1; - hoverArea.lastY = -1; - hoverArea.pressedItem = null; - hoverArea.hoverEnabled = true; - } - } - } - } - - MouseArea { - id: hoverArea - - //anchors.fill: parent - width: itemGrid.width - PlasmaCore.Units.largeSpacing - height: itemGrid.height - - - property int pressX: -1 - property int pressY: -1 - property int lastX: -1 - property int lastY: -1 - property Item pressedItem: null - - acceptedButtons: Qt.LeftButton | Qt.RightButton - - hoverEnabled: true - - function updatePositionProperties(x, y) { - // Prevent hover event synthesis in QQuickWindow interfering - // with keyboard navigation by ignoring repeated events with - // identical coordinates. As the work done here would be re- - // dundant in any case, these are safe to ignore. - if (lastX === x && lastY === y) { - return; - } - - lastX = x; - lastY = y; - - var cPos = mapToItem(gridView.contentItem, x, y); - var item = gridView.itemAt(cPos.x, cPos.y); - - if (!item) { - gridView.currentIndex = -1; - pressedItem = null; - } else { - gridView.currentIndex = item.itemIndex; - itemGrid.focus = (itemGrid.currentIndex != -1) - } - - return item; - } - - onPressed: mouse => { - mouse.accepted = true; - - updatePositionProperties(mouse.x, mouse.y); - - pressX = mouse.x; - pressY = mouse.y; - - if (mouse.button == Qt.RightButton) { - if (gridView.currentItem) { - if (gridView.currentItem.hasActionList) { - var mapped = mapToItem(gridView.currentItem, mouse.x, mouse.y); - gridView.currentItem.openActionMenu(mapped.x, mapped.y); - } - } else { - var mapped = mapToItem(rootItem, mouse.x, mouse.y); - contextMenu.open(mapped.x, mapped.y); - } - } else { - pressedItem = gridView.currentItem; - } - } - - onReleased: mouse => { - mouse.accepted = true; - updatePositionProperties(mouse.x, mouse.y); - - if (gridView.currentItem && gridView.currentItem == pressedItem) { - if ("trigger" in gridView.model) { - gridView.model.trigger(pressedItem.itemIndex, "", null); - root.toggle(); - } - - itemGrid.itemActivated(pressedItem.itemIndex, "", null); - } else if (!dragHelper.dragging && !pressedItem && mouse.button == Qt.LeftButton) { - root.toggle(); - } - - pressX = -1; - pressY = -1; - pressedItem = null; - } - - onPositionChanged: mouse => { - var item = pressedItem? pressedItem : updatePositionProperties(mouse.x, mouse.y); - - if (gridView.currentIndex != -1) { - if (itemGrid.dragEnabled && pressX != -1 && dragHelper.isDrag(pressX, pressY, mouse.x, mouse.y)) { - if ("pluginName" in item.m) { - dragHelper.startDrag(kicker, item.url, item.icon, - "text/x-plasmoidservicename", item.m.pluginName); - } else { - dragHelper.startDrag(kicker, item.url, item.icon); - } - - kicker.dragSource = item; - - pressX = -1; - pressY = -1; - } - } - } - } - } -} diff --git a/com.github.adhec.DittoMenu/contents/ui/ItemMultiGridView.qml b/com.github.adhec.DittoMenu/contents/ui/ItemMultiGridView.qml deleted file mode 100644 index 7bbeb3c..0000000 --- a/com.github.adhec.DittoMenu/contents/ui/ItemMultiGridView.qml +++ /dev/null @@ -1,210 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2015 by Eike Hein * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ - -import QtQuick 2.4 - -import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.extras 2.0 as PlasmaExtras - -import org.kde.plasma.private.kicker 0.1 as Kicker - -PlasmaExtras.ScrollArea { - id: itemMultiGrid - - //anchors { - // top: parent.top - //} - anchors.fill: parent - - //width: parent.width - - implicitHeight: itemColumn.implicitHeight - - signal keyNavLeft(int subGridIndex) - signal keyNavRight(int subGridIndex) - signal keyNavUp() - signal keyNavDown() - - property bool grabFocus: false - - property alias model: repeater.model - property alias count: repeater.count - - property int aCellHeight - property int aCellWidth - - verticalScrollBarPolicy: Qt.ScrollBarAsNeeded - horizontalScrollBarPolicy: Qt.ScrollBarAlwaysOff - - flickableItem.flickableDirection: Flickable.VerticalFlick - - onFocusChanged: { - if (!focus) { - for (var i = 0; i < repeater.count; i++) { - subGridAt(i).focus = false; - } - } - } - - function subGridAt(index) { - return repeater.itemAt(index).itemGrid; - } - - function tryActivate(row, col) { // FIXME TODO: Cleanup messy algo. - if (flickableItem.contentY > 0) { - row = 0; - } - - var target = null; - var rows = 0; - - for (var i = 0; i < repeater.count; i++) { - var grid = subGridAt(i); - - if (rows <= row) { - target = grid; - rows += grid.lastRow() + 2; // Header counts as one. - } else { - break; - } - } - - if (target) { - rows -= (target.lastRow() + 2); - target.tryActivate(row - rows, col); - } - } - - Column { - id: itemColumn - - width: itemMultiGrid.width //- PlasmaCore.Units.gridUnit - - Repeater { - id: repeater - - delegate: Item { - width: itemColumn.width - //height: gridViewLabel.height + gridView.height + (index == repeater.count - 1 ? 0 : PlasmaCore.Units.smallSpacing) - height: gridView.height - //visible: gridView.count > 0 - - property Item itemGrid: gridView - - - - MouseArea { - width: parent.width - height: parent.height - onClicked: root.toggle() - } - - ItemGridView { - id: gridView - - anchors { - top: parent.top - } - - width: parent.width - height: Math.ceil(count / plasmoid.configuration.numberColumns) * root.cellSize - cellWidth: root.cellSize - cellHeight: root.cellSize - iconSize: root.iconSize - //<> verticalScrollBarPolicy: Qt.ScrollBarAlwaysOff - - model: repeater.model.modelForRow(index) - - onFocusChanged: { - if (focus) { - itemMultiGrid.focus = true; - } - } - - onCountChanged: { - if (itemMultiGrid.grabFocus && index == 0 && count > 0) { - currentIndex = 0; - focus = true; - } - } - - onCurrentItemChanged: { - if (!currentItem) { - return; - } - - if (index == 0 && currentRow() === 0) { - itemMultiGrid.flickableItem.contentY = 0; - return; - } - - var y = currentItem.y; - y = contentItem.mapToItem(itemMultiGrid.flickableItem.contentItem, 0, y).y; - - if (y < itemMultiGrid.flickableItem.contentY) { - itemMultiGrid.flickableItem.contentY = y; - } else { - y += root.cellSize; - y -= itemMultiGrid.flickableItem.contentY; - y -= itemMultiGrid.viewport.height; - - if (y > 0) { - itemMultiGrid.flickableItem.contentY += y; - } - } - } - - onKeyNavLeft: { - itemMultiGrid.keyNavLeft(index); - } - - onKeyNavRight: { - itemMultiGrid.keyNavRight(index); - } - - onKeyNavUp: { - if (index > 0) { - var prevGrid = subGridAt(index - 1); - prevGrid.tryActivate(prevGrid.lastRow(), currentCol()); - } else { - itemMultiGrid.keyNavUp(); - } - } - - onKeyNavDown: { - if (index < repeater.count - 1) { - subGridAt(index + 1).tryActivate(0, currentCol()); - } else { - itemMultiGrid.keyNavDown(); - } - } - } - - // HACK: Steal wheel events from the nested grid view and forward them to - // the ScrollView's internal WheelArea. - Kicker.WheelInterceptor { - anchors.fill: gridView - z: 1 - - destination: findWheelArea(itemMultiGrid.flickableItem) - } - } - } - } -} diff --git a/com.github.adhec.DittoMenu/metadata.json b/com.github.adhec.DittoMenu/metadata.json deleted file mode 100644 index aa0f111..0000000 --- a/com.github.adhec.DittoMenu/metadata.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "KPlugin": { - "Authors": [ - { - "Email": "adhemarks@gmail.com", - "Name": "adhe" - } - ], - "Category": "Application Launchers", - "Description": "A configurable launcher menu", - "Description[x-test]": "xxA configurable launcher menuxx", - "EnabledByDefault": true, - "Icon": "start-here-kde", - "Id": "com.github.adhec.DittoMenu", - "License": "GPL-2.0+", - "Name": "Ditto Menu", - "Name[x-test]": "xxDitto Menuxx", - "ServiceTypes": [ - "Plasma/Applet" - ], - "Version": "0.30", - "Website": "" - }, - "X-Plasma-API": "declarativeappletscript", - "X-Plasma-MainScript": "ui/main.qml", - "X-Plasma-Provides": [ - "org.kde.plasma.launchermenu" - ] -} diff --git a/com.github.adhec.DittoMenu/contents/config/config.qml b/com.github.adhec.MenuDitto/contents/config/config.qml similarity index 100% rename from com.github.adhec.DittoMenu/contents/config/config.qml rename to com.github.adhec.MenuDitto/contents/config/config.qml diff --git a/com.github.adhec.DittoMenu/contents/config/main.xml b/com.github.adhec.MenuDitto/contents/config/main.xml similarity index 89% rename from com.github.adhec.DittoMenu/contents/config/main.xml rename to com.github.adhec.MenuDitto/contents/config/main.xml index ba663f8..a4478e9 100644 --- a/com.github.adhec.DittoMenu/contents/config/main.xml +++ b/com.github.adhec.MenuDitto/contents/config/main.xml @@ -6,14 +6,13 @@ + + + 0 + - - - - - - - 2 + + 0 @@ -38,7 +37,7 @@ - 7 + 6 @@ -49,7 +48,8 @@ org.kde.dolphin.desktop,systemsettings.desktop,org.manjaro.pamac.manager.desktop,ar.com.softwareperonista.Pace.desktop,melawy-welcome.desktop,firefoxdeveloperedition.desktop,firefox.desktop,org.kde.kate.desktop,skypeforlinux.desktop,org.telegram.desktop.desktop,discord.desktop,Zoom.desktop,brave-browser.desktop,google-chrome.desktop,gimp.desktop,org.inkscape.Inkscape.desktop,com.obsproject.Studio.desktop,code.desktop,org.kde.kleopatra.desktop,org.kde.konsole.desktop,org.kde.kcalc.desktop,blender.desktop,gparted.desktop,org.kde.partitionmanager.desktop,org.kde.kinfocenter.desktop - logout,lock-screen,reboot,shutdown + + logout,lock-screen,reboot,shutdown @@ -77,7 +77,7 @@ true - + true @@ -86,8 +86,9 @@ true - + true + diff --git a/com.github.adhec.MenuDitto/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo b/com.github.adhec.MenuDitto/contents/locale/fr/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo new file mode 100644 index 0000000000000000000000000000000000000000..57c3b52f435773568138003b2e96f99f7b33df85 GIT binary patch literal 1641 zcmY+D%WfP+6o!jnZo@SJ0uhK*Bv2xSo=H}O=AsOqiEYVakH&T)Sb%D}&&*U(UDZ@o z+wl(Z0BjJ51q;L~v&ahe2+b1l1`ytW1y8_#+U<-}QqAXcy8G0BPW^sxX5~A9^*Z*O z*neTagZ<-U_`$kzN{9r!3cdt>0X_|u;FI7X_&oR(_!RgJ_zd`c6aNIRAif7a0p16n z1%CngyWham;Gf_N;6F|LFZe2A@wgDL0B1qgco{qc_Q2P`TOgn3z_-A|CjJ4ugdTnd z`Taj2;$`pw$lv`3vi=rCv5wOq>p$P{BFJ?+P5getF35T|K%U3vAlG+I{55zE@wXtK zcOQHM{2hE7{2M$Ap2FeW@41GT!1IXT19={|z~%}NK_@mwQfp=Xd`do5*$YR1kyMa#l;W`%ohj}lh`oSD)?Gnj=-q9~VzQAZH^~P) zO=YfmTeb~;lXXVti!xuR2g6^ZT?lxx-DvGuq{ zYq*_^XkT;Lq=z?B`Dwp9N(S3WuPfKL)4|5&&$hSvtxXkTvg?%%Mn&gS=?Y~X(so*@ zDJ8q4id1fPx7PN$Ykm3Q=H_*y+s;ove)vv`DYph2gZ{FQtL-bTRR<$j6vxO?8R>59 zltyX$fy`#g!(Sim?cPYPE#G4i7>Am{sb-XFYqbw$o-5x0uuNT_y+g{m;xUL-vJ*5M>=*I z?1DWFJ_vpYJ_fqrQBZ;=_h;ZU;1%!%a2q@Z{sKM^{sx-3|A4Q6|90%-4>0xtw7mvC z4gV)d_8fQ#H1;*nocj?pI`4u;_pjjN;O`y#Z_wyzf(h`yjz0m>=G;;6IQS~~BG?BS zof**d#RpBEPeF6O489It2F>|8*lB62t|Ran9cGyNjaD;^CY09d5stKa2QZY^(r5mk z#56ffK64i)zsX_xe{h(7vUi2zzAXZu2Su9T5mzK!8IY2c<+D!FQ(Z$IcS0J4mknmK zW@W^gmmv;DY|!(_DHI|$!~?~{4roRyC4DyBj==W!zsCa}IvzVK-Xdl~+H6d^b2RCO zoCoY&Kqlg#tHiue0tqI#FXuVUhSEQfb}}!|)9juKniXNBSj*`-Gu(?vpn~&~JP{zq z9hGGu4+$ zCB~dcS((rYBF|AWMCLIk$Q7L&w=&%E57;)%$;9~R_?dl`J;_vJNaEfC#6UxAQv74p zUGN+c^pl%+LOh3osmzFVYJZ=}g*IAe0#{~5khAI3j8KVbt9`XC5ow8X6rDu;X{&8m zr=5rw9F?~znMiv@JOXP(hJIvIP-vOaKue|n+^_4}^x0V~V1r~o_jW2IfbGa0MTWQ>`#~W1!zh2*szp3s2QCwSMI2qrl zABx2E)jM%*6&cI%#g*pDsxH;_`Z8YVJqk5mJZKq1{67+8w#d`}_)L(5iFCs{3OK+~Q#?FHN;!E=`;~O^{ lH@D-(>WMuCx?DA_xL!I`Hnlf0{rR?D|4wf#Qgf}${s&1S(+mIr literal 0 HcmV?d00001 diff --git a/com.github.adhec.MenuDitto/contents/locale/nl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo b/com.github.adhec.MenuDitto/contents/locale/nl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo new file mode 100644 index 0000000000000000000000000000000000000000..62e2106e7d93bbab124b9aa9c31f8d11c081287d GIT binary patch literal 1317 zcmZ9K%WfMt6o%QvO%pY(QzyOTg5Ve^TD!qSvbssfb`Zyx#()hAwi0AZ%^ZzrbI1Wn z$+cH~h!zF<1l{!simtlsD*K?Dyh0YqCO>DCOGAkINY1(ZhdfW`W_}eIvzRw9f5H3` z^Wq2i!x(`HsK86$Z{Rub5AYN4Pw*q~uPOflKg9lD@H6lU_&N9tyaK)izXC6v5n>Kp z1TTOq;7xD~JcSK|(eJ;rjs0`*W9(;Vg!lry4o1H&cph8eC|&*PUZIk66oUaYeT?53cB4Z)UTqj3~J zvSBB+h_0#FGqk2Ptz|(?R8Vl<=h9A?hR&AngghA8V;a8BKtttx5cQ#!1J<4t)E!&W z${@zUiAMp{b3A0nCd1J~Gg5iZX1-Z5Nu+I#NLH0rnGDJrFM7@%au$;9JbA><<1D3I z#S(BCt$nVn3(2l8RG!=)7e49Rltv*`K5e%P6-ML1?aY?#%E`cdRC2Cldl#-7F-EJm zm+bRI#jwc+EK=%ry4|F+gddh^=Z9OJrB0`{BYjBvP8zReur8$stRR36f*lTHy(($eB`OY~G0Y~f@{6L!byFprNX`j#h_3luMwlQch|IF4Lo7IC=P-&xs)(i(*>6duQy51d{yiMv_jK;jOH~0kN!F}jZs9?bald} z!{ZW7Jz*2|1Z&{56Pqybkq=RN&Kf4LaOg>9a!{|QUCE^~XikkrMM;pQ*;D1}vP=1` ir&D!k2wo1WY!n7iKVO^0$OG%*Mf~4>YDJ|yLc~{jJZE|U literal 0 HcmV?d00001 diff --git a/com.github.adhec.MenuDitto/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo b/com.github.adhec.MenuDitto/contents/locale/pl/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo new file mode 100644 index 0000000000000000000000000000000000000000..2cc6c5de382223b84364948ee6375280eb63e935 GIT binary patch literal 1384 zcmY+Czi%8x6vr2EfE5fhoTilfqRQRU zR?foEE=GgRH1#t##aJ6`w80iD$7TWQY3FniY|l3apR!^j@?b}Y*-~2 z>NX|Q5Runw(Lge!cDo&%sG&?#R#)eLOagM|LnO*Fmx*vvD;u0xHngJ)4i1eTapJ<= zH2j>6#cWKe^qu0&T1Q-J#*+ zvyZLYK1b{DAUxu+^l8IwtcYnXT3ZXF^)UK?R-<@5dM{dyqSj}^y0B}6vbk{D#I$E7 zjh#5%r#)>%k2W%(EbVn&xm@ea7yTI9)Swar4!bOhm>$J3m3eD_cmKxYo>tpYYfIxk z6$;__VsiYY>y){W>O)F~!r*m$bke;UUVFUG3&Np?H&miisRl7!>q*xNZa2xKnVz2A zC7Ee;_I6gjcg^edX2uX{_3O39|CQfFfN+rueb^*k#zS2;0SA<@G&+)I^-v%CJm-ChV|Dvcf( vQ8Z-FzNT8HI+-ZOJ6!zA(W54qs?0PFj}s3v6Um5!J>f*I2RM>K*G=#r@cM8U literal 0 HcmV?d00001 diff --git a/com.github.adhec.MenuDitto/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo b/com.github.adhec.MenuDitto/contents/locale/pt_BR/LC_MESSAGES/plasma_applet_com.github.adhec.MenuDitto.mo new file mode 100644 index 0000000000000000000000000000000000000000..cdcd91296290706d7b87e7df68ec860bc8734844 GIT binary patch literal 1658 zcmYk6Pmdcl7{(1Ol!pHW3W5q55T`QPR$Qtng-tiJ*%iqq${$dqHurbWTIU>FR0*MnRB)&nPH=A_V8qY8G*sq`W^|Slexs9&{+Uw{S z(Emh#5BIjeh_)F#ZL668sf> z2D}gQzTd!?z(2s}!M|7I|G-x<7EcKA3UD4|jTgalU=w@|{0!vtEch09v>Ja4evBM` z1Uc?M5W(yJ2YLTlh++K~z!$)GLDv5P$nma%ctnC1ulr=hKFD>r0kZB}D}DiToV(z8 z@OzN;KLEL|zk{srU+@j^41zM>0r|XZ;G19zd8H=_}Z_7dIh>Ym4iqd)=G)~*EiZMB9Co;8pRTzJ2#@Pcex<;~qMjG@S zTcD>;g`Ja}I9r@jIhff4Ia!OA6YYEu%gJ1gDfdz%;R7pkZ4hH{>=BdR>gnOlKLHw~v33RFHE##bwELsyGubMjnam+JZ#S*;|x`XfKOC zCFk)qmYL>qA@^FJO6x+@@l%~e*Q=?IhBlV75K13!ZccTWRpWYUi_OxhKyU zTa#nddfli`bIoC+CRW7qM$+g`@$lY$-*}M38cR#7Ml@HO-DdTe$tc&H&sNI(P zjZPvzOgfFd_Ew|W>?ec4M_6j6m6}pCBvr(+-Pmu98ZE4Ax3_X#w{Ci}CYEKmdA(oj z>~)fp^e)#g)wV7CVQ?lY8OuP2VYAGYHdkdjQx3MfHX80kS5DTkHq<{#OlmW2rm?&- z)}e+Q#$xz!@fF-daHLL=EGCro>npdoF`HqGr*wAeRH2S7>g>{@&f>}uU0Wx5DszjU z?AoN*+ge(*n=kIcq^om=lq>v2$Z>A(RHUuw!KI6zu~BAL^4+mH34yVQ?P_r1$;?FO z7$*h%lPNFxVb5kNdt_RNKz{8~s7MaS8s>kLlv^gF3(`m;In=AK2FCFce$6UGg@b3D zsx=cmt(=0w2lxz$1I?~hqN(8`81+u2WvQH!C3*bz%AvHxVKXZ_)(59h)0KtiINPT9 XX8>JI?Iz`}?IR&Q zxrv}fjT)Y6RiU&Mq7o7a*VM#ylW^m}X_gyB;sB};2M!c@s+y@}#wFHvRUw~w14ZIz^ z+}!^a+>ZI*&G{B2L+3d77}yIw0=^FRfF+RPs(?GdA3*Z|Z*#o|Nj{7D%OKTx5hVRq zL5lBt@Con=*bQz%uw*v@QvN2m2lPRT<4X|oFlr-w>Opo|gKYEW1R-1oRDC~uTi52T?7%A*HqPI=IvI@6$j zpj;lMNo(x215rrYZb7&qA1(@)+ga)IY+g!Vc-*p0N9MZv^z`S_IrhKvqrw+K<3b?0 zC8o^K3A*|mVS0QJW?0IyICl1#)6#<@pQRj!o5iBf`h*(@uL(XWgFqHof5QSxTXw)x z#iCfKLThK1 zjf#St7JSN+g^qm3@^XexwbJKPw&w>-FWT<4#~gD~I6lWlFeABRyYQxuhNuL-!oZR< zE*mSDj>E=g>>!)x6MAdbM-lmmC#D2~%HrPmY*Fw$W+cCldf;q49%mD7-nJ~^b~nBR zhb`V%qPkoaoRMKZAPa(xc=8RA4U9p{cu9CZWJ{tgs9umVHY$qJ3yh4Pvn}I=Fy|ZN zGRgBnQ1p|DM9vQK;bc533yGp<20|PxpbTb$s?bk1Vk5)GsF=3NtkI7XN&ZSYHELvr zjs6rL7*1vepL%upKsq*L`hhX-nXd1cf%K9*ZOxdT#a}eZF7Fk38b7F~duPqK7e0?m zZZ0%)!Wb83A<2hQ2lh{-_NRI8(9mATj!Q4sK9l5L7|RT1((NpJ;yYt~5`F5zH3Uua zK)e|wijHZ!d+sbsO)W?BII7lo^mc12nrG^?S~H?~wSwE1;J&QyA7|su0t$gyV3}MU4J^Klh;SMgpl8Xa|C-@M_EzTXbw+TEvc`tum;DJ%tdlo#{CuS zm)dI7$uCnU5Y<(2-qWEjL`Ol~JAr%Wb@p{+-VrDg$CR?5^l=iYcB(|u!5#b~-BWt6 z1_i3RDisK&$UDipiXW=7-WfWqonjyMxvEf2)CxY}lmx`*1sGj~j#Ws!K-LygJXI&8{gT zSzbbr=trbkMu#=cQK9B=yM|0DLll;`#Za||+}b+o+wL7$A`zBBy{JV&ztR(_W9vAT zKv%5F)WgoU>#>vijE;VT%s3;@x&cuz!jyz6E zR$MqB1b2Gk!UYZ>)Lb}mLCJ|T;s}2N+_>`fWZPYypWpl1et%xs`kKM6V7!j; zBgPvTx1PWU_7DufC3qS93w#><2fPUW3qAv0cyhyw;1>R`f)~Koz?VP*uY&J@FN25R ztKi3=uRRA}0lx&F1HT2|1b;aF{|)>cwSEUL!G8xueBOJYulFfF&w`(U&x2oqzWxKy z=lcfqI==&by`Mm@<5$q@_yc?k{2TOnFJbdGxDERA)-E~bK5zbBD;U1+dGos1o^&D)rOt((QCAegkxYyxXDAgT zK2vV1t^~K#gqKBW>R0yp+*oWZSY2o*>?vqyoHIFVY&Nn3p@rp&9m;FO{Qi)2G(}2L zlsGw;P9j5B@ycbwRtxWE#9T%Zi|HLK-_aEy7wYlWsg4Ruhxgrj|P) zCb>u@ueGtY;d4}uJ3&{>rB53)5E0TxanudkouCoXVJB=i-@em1iYqN%xS(&jE);jh zhO|Fuwdg2n$8;-hN6pq=)M#|$UhiFm>TJd{5%dMmLuy4w2ZQJUajn*#l2v1~vzU-7 z?PfbZJK2ru^-A5~RW-`t5<_z06IYumF7*y2V{XwSyMz9IaPutA%fi(Mu}(}Xbr#ai zp>&mFHN*P{`^M%)NP1fS7P~igXfxftzEk-ycqA8AGS=0lEN?5!UnS;+dUUvi4w zL~13G0jd6R1{Kd0Fun<;El+^(08bAK>X UINN%ez!zywJ-!(6V!dSl0lc1eGXMYp literal 0 HcmV?d00001 diff --git a/com.github.adhec.DittoMenu/contents/ui/ActionMenu.qml b/com.github.adhec.MenuDitto/contents/ui/ActionMenu.qml similarity index 51% rename from com.github.adhec.DittoMenu/contents/ui/ActionMenu.qml rename to com.github.adhec.MenuDitto/contents/ui/ActionMenu.qml index 5109aef..be10f70 100644 --- a/com.github.adhec.DittoMenu/contents/ui/ActionMenu.qml +++ b/com.github.adhec.MenuDitto/contents/ui/ActionMenu.qml @@ -1,26 +1,13 @@ -/*************************************************************************** - * Copyright (C) 2013 by Aurélien Gâteau * - * Copyright (C) 2014-2015 by Eike Hein * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * - ***************************************************************************/ +/* + SPDX-FileCopyrightText: 2013 Aurélien Gâteau + SPDX-FileCopyrightText: 2014-2015 Eike Hein -import QtQuick 2.0 + SPDX-License-Identifier: GPL-2.0-or-later +*/ -import org.kde.plasma.components 2.0 as PlasmaComponents +import QtQuick 2.15 + +import org.kde.plasma.extras 2.0 as PlasmaExtras Item { id: root @@ -28,7 +15,7 @@ Item { property QtObject menu property Item visualParent property variant actionList - property bool opened: menu ? (menu.status != PlasmaComponents.DialogStatus.Closed) : false + property bool opened: menu ? (menu.status !== PlasmaExtras.Menu.Closed) : false signal actionClicked(string actionId, variant actionArgument) signal closed @@ -91,7 +78,7 @@ Item { Component { id: contextMenuComponent - PlasmaComponents.ContextMenu { + PlasmaExtras.Menu { visualParent: root.visualParent } } @@ -99,7 +86,7 @@ Item { Component { id: contextSubmenuItemComponent - PlasmaComponents.MenuItem { + PlasmaExtras.MenuItem { id: submenuItem property variant actionItem @@ -107,10 +94,7 @@ Item { text: actionItem.text ? actionItem.text : "" icon: actionItem.icon ? actionItem.icon : null - property variant submenu : submenu_ - - PlasmaComponents.ContextMenu { - id: submenu_ + property PlasmaExtras.Menu submenu: PlasmaExtras.Menu { visualParent: submenuItem.action } } @@ -119,19 +103,19 @@ Item { Component { id: contextMenuItemComponent - PlasmaComponents.MenuItem { + PlasmaExtras.MenuItem { property variant actionItem text : actionItem.text ? actionItem.text : "" - enabled : actionItem.type != "title" && ("enabled" in actionItem ? actionItem.enabled : true) - separator : actionItem.type == "separator" - section : actionItem.type == "title" + enabled : actionItem.type !== "title" && ("enabled" in actionItem ? actionItem.enabled : true) + separator : actionItem.type === "separator" + section : actionItem.type === "title" icon : actionItem.icon ? actionItem.icon : null checkable : actionItem.checkable ? actionItem.checkable : false checked : actionItem.checked ? actionItem.checked : false onClicked: { - actionClicked(actionItem.actionId, actionItem.actionArgument); + root.actionClicked(actionItem.actionId, actionItem.actionArgument); } } } diff --git a/com.github.adhec.DittoMenu/contents/ui/CompactRepresentation.qml b/com.github.adhec.MenuDitto/contents/ui/CompactRepresentation.qml similarity index 54% rename from com.github.adhec.DittoMenu/contents/ui/CompactRepresentation.qml rename to com.github.adhec.MenuDitto/contents/ui/CompactRepresentation.qml index eae3665..cc388de 100644 --- a/com.github.adhec.DittoMenu/contents/ui/CompactRepresentation.qml +++ b/com.github.adhec.MenuDitto/contents/ui/CompactRepresentation.qml @@ -20,8 +20,9 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import org.kde.plasma.plasmoid 2.0 +import org.kde.plasma.plasmoid import org.kde.plasma.core 2.0 as PlasmaCore +import org.kde.kirigami as Kirigami Item { id: root @@ -32,62 +33,18 @@ Item { || plasmoid.location == PlasmaCore.Types.BottomEdge || plasmoid.location == PlasmaCore.Types.LeftEdge) readonly property bool vertical: (plasmoid.formFactor == PlasmaCore.Types.Vertical) - readonly property bool useCustomButtonImage: (plasmoid.configuration.useCustomButtonImage - && plasmoid.configuration.customButtonImage.length != 0) + readonly property bool useCustomButtonImage: (Plasmoid.configuration.useCustomButtonImage + && Plasmoid.configuration.customButtonImage.length != 0) property QtObject dashWindow: null Plasmoid.status: dashWindow && dashWindow.visible ? PlasmaCore.Types.RequiresAttentionStatus : PlasmaCore.Types.PassiveStatus - - onWidthChanged: updateSizeHints() - onHeightChanged: updateSizeHints() - - function updateSizeHints() { - if (useCustomButtonImage) { - if (vertical) { - var scaledHeight = Math.floor(parent.width * (buttonIcon.implicitHeight / buttonIcon.implicitWidth)); - root.Layout.minimumHeight = scaledHeight; - root.Layout.maximumHeight = scaledHeight; - root.Layout.minimumWidth = PlasmaCore.Units.iconSizes.small; - root.Layout.maximumWidth = inPanel ? PlasmaCore.Units.iconSizeHints.panel : -1; - } else { - var scaledWidth = Math.floor(parent.height * (buttonIcon.implicitWidth / buttonIcon.implicitHeight)); - root.Layout.minimumWidth = scaledWidth; - root.Layout.maximumWidth = scaledWidth; - root.Layout.minimumHeight = PlasmaCore.Units.iconSizes.small; - root.Layout.maximumHeight = inPanel ? PlasmaCore.Units.iconSizeHints.panel : -1; - } - } else { - root.Layout.minimumWidth = PlasmaCore.Units.iconSizes.small; - root.Layout.maximumWidth = inPanel ? PlasmaCore.Units.iconSizeHints.panel : -1; - root.Layout.minimumHeight = PlasmaCore.Units.iconSizes.small - root.Layout.maximumHeight = inPanel ? PlasmaCore.Units.iconSizeHints.panel : -1; - } - } - - Connections { - target: PlasmaCore.Units.iconSizeHints - function onPanelChanged(){ updateSizeHints()} - } - - PlasmaCore.IconItem { + Kirigami.Icon { id: buttonIcon anchors.fill: parent - - readonly property double aspectRatio: (vertical ? implicitHeight / implicitWidth - : implicitWidth / implicitHeight) - - source: useCustomButtonImage ? plasmoid.configuration.customButtonImage : plasmoid.configuration.icon - + source: useCustomButtonImage ? Plasmoid.configuration.customButtonImage : Plasmoid.configuration.icon active: mouseArea.containsMouse - smooth: true - - // A custom icon could also be rectangular. However, if a square, custom, icon is given, assume it - // to be an icon and round it to the nearest icon size again to avoid scaling artefacts. - roundToIconSize: !useCustomButtonImage || aspectRatio === 1 - - onSourceChanged: updateSizeHints() } MouseArea diff --git a/com.github.adhec.MenuDitto/contents/ui/ConfigGeneral.qml b/com.github.adhec.MenuDitto/contents/ui/ConfigGeneral.qml new file mode 100644 index 0000000..f900612 --- /dev/null +++ b/com.github.adhec.MenuDitto/contents/ui/ConfigGeneral.qml @@ -0,0 +1,233 @@ +/*************************************************************************** + * Copyright (C) 2014 by Eike Hein * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA . * + ***************************************************************************/ + +//import QtQuick 2.15 +//import QtQuick.Controls 2.15 +//import QtQuick.Dialogs 1.2 +//import QtQuick.Layouts 1.0 +//import org.kde.plasma.core 2.0 as PlasmaCore +//import org.kde.plasma.components 2.0 as PlasmaComponents +//import org.kde.kquickcontrolsaddons 2.0 as KQuickAddons +//import org.kde.draganddrop 2.0 as DragDrop +//import org.kde.kirigami 2.4 as Kirigami + +import QtQuick 2.15 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.15 +import org.kde.draganddrop 2.0 as DragDrop +import org.kde.kirigami 2.5 as Kirigami +import org.kde.iconthemes as KIconThemes +import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami +import org.kde.ksvg 1.0 as KSvg +import org.kde.plasma.plasmoid 2.0 +import org.kde.kcmutils as KCM + + + +KCM.SimpleKCM { + id: configGeneral + + property string cfg_icon: plasmoid.configuration.icon + property bool cfg_useCustomButtonImage: plasmoid.configuration.useCustomButtonImage + property string cfg_customButtonImage: plasmoid.configuration.customButtonImage + property alias cfg_numberColumns: numberColumns.value + property alias cfg_numberRows: numberRows.value + property alias cfg_showFavoritesFirst: showFavoritesFirst.checked + + property alias cfg_labels2lines: labels2lines.checked + property alias cfg_displayPosition: displayPosition.currentIndex + + property alias cfg_appsIconSize: appsIconSize.currentIndex + property alias cfg_showInfoUser: showInfoUser.checked + + Kirigami.FormLayout { + anchors.left: parent.left + anchors.right: parent.right + + Button { + id: iconButton + + Kirigami.FormData.label: i18n("Icon:") + + implicitWidth: previewFrame.width + Kirigami.Units.smallSpacing * 2 + implicitHeight: previewFrame.height + Kirigami.Units.smallSpacing * 2 + + // Just to provide some visual feedback when dragging; + // cannot have checked without checkable enabled + checkable: true + checked: dropArea.containsAcceptableDrag + + onPressed: iconMenu.opened ? iconMenu.close() : iconMenu.open() + + DragDrop.DropArea { + id: dropArea + + property bool containsAcceptableDrag: false + + anchors.fill: parent + + onDragEnter: { + // Cannot use string operations (e.g. indexOf()) on "url" basic type. + var urlString = event.mimeData.url.toString(); + + // This list is also hardcoded in KIconDialog. + var extensions = [".png", ".xpm", ".svg", ".svgz"]; + containsAcceptableDrag = urlString.indexOf("file:///") === 0 && extensions.some(function (extension) { + return urlString.indexOf(extension) === urlString.length - extension.length; // "endsWith" + }); + + if (!containsAcceptableDrag) { + event.ignore(); + } + } + onDragLeave: containsAcceptableDrag = false + + onDrop: { + if (containsAcceptableDrag) { + // Strip file:// prefix, we already verified in onDragEnter that we have only local URLs. + iconDialog.setCustomButtonImage(event.mimeData.url.toString().substr("file://".length)); + } + containsAcceptableDrag = false; + } + } + + KIconThemes.IconDialog { + id: iconDialog + + function setCustomButtonImage(image) { + configGeneral.cfg_customButtonImage = image || configGeneral.cfg_icon || "start-here-kde-symbolic" + configGeneral.cfg_useCustomButtonImage = true; + } + + onIconNameChanged: setCustomButtonImage(iconName); + } + + KSvg.FrameSvgItem { + id: previewFrame + anchors.centerIn: parent + imagePath: Plasmoid.location === PlasmaCore.Types.Vertical || Plasmoid.location === PlasmaCore.Types.Horizontal + ? "widgets/panel-background" : "widgets/background" + width: Kirigami.Units.iconSizes.large + fixedMargins.left + fixedMargins.right + height: Kirigami.Units.iconSizes.large + fixedMargins.top + fixedMargins.bottom + + Kirigami.Icon { + anchors.centerIn: parent + width: Kirigami.Units.iconSizes.large + height: width + source: configGeneral.cfg_useCustomButtonImage ? configGeneral.cfg_customButtonImage : configGeneral.cfg_icon + } + } + + Menu { + id: iconMenu + + // Appear below the button + y: +parent.height + + onClosed: iconButton.checked = false; + + MenuItem { + text: i18nc("@item:inmenu Open icon chooser dialog", "Choose…") + icon.name: "document-open-folder" + onClicked: iconDialog.open() + } + MenuItem { + text: i18nc("@item:inmenu Reset icon to default", "Clear Icon") + icon.name: "edit-clear" + onClicked: { + configGeneral.cfg_icon = "start-here-kde-symbolic" + configGeneral.cfg_useCustomButtonImage = false + } + } + } + } + + Item { + Kirigami.FormData.isSection: true + } + + ComboBox { + id: appsIconSize + Kirigami.FormData.label: i18n("Icon size:") + Layout.fillWidth: true + model: [i18n("Small"),i18n("Medium"),i18n("Large"), i18n("Huge")] + } + + CheckBox { + id: showFavoritesFirst + Kirigami.FormData.label: i18n("Show favorites first") + } + + ComboBox { + + Kirigami.FormData.label: i18n("Menu position") + id: displayPosition + model: [ + i18n("Default"), + i18n("Center"), + i18n("Center bottom"), + ] + } + + + CheckBox { + id: labels2lines + text: i18n("Show labels in two lines") + visible: false // TODO + } + + SpinBox{ + id: numberColumns + + from: 3 + to: 15 + Kirigami.FormData.label: i18n("Number of columns") + + } + + SpinBox{ + id: numberRows + from: 1 + to: 15 + Kirigami.FormData.label: i18n("Number of rows") + } + + CheckBox { + id: showInfoUser + Kirigami.FormData.label: i18n("Show user") + } + + RowLayout{ + + visible: false + Button { + text: i18n("Unhide all hidden applications") + onClicked: { + plasmoid.configuration.hiddenApplications = [""]; + unhideAllAppsPopup.text = i18n("Unhidden!"); + } + } + Label { + id: unhideAllAppsPopup + } + } + + } +} diff --git a/com.github.adhec.MenuDitto/contents/ui/ItemGridDelegate.qml b/com.github.adhec.MenuDitto/contents/ui/ItemGridDelegate.qml new file mode 100644 index 0000000..320216f --- /dev/null +++ b/com.github.adhec.MenuDitto/contents/ui/ItemGridDelegate.qml @@ -0,0 +1,121 @@ +/* + SPDX-FileCopyrightText: 2015 Eike Hein + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +import QtQuick 2.15 + +import org.kde.plasma.components 3.0 as PlasmaComponents3 +import org.kde.plasma.core as PlasmaCore +import org.kde.kirigami 2.20 as Kirigami + +import "code/tools.js" as Tools + +Item { + id: item + + width: GridView.view.cellWidth + height: GridView.view.cellHeight + + enabled: !model.disabled + + property bool showLabel: true + + property int itemIndex: model.index + property string favoriteId: model.favoriteId !== undefined ? model.favoriteId : "" + property url url: model.url !== undefined ? model.url : "" + property variant icon: model.decoration !== undefined ? model.decoration : "" + property var m: model + property bool hasActionList: ((model.favoriteId !== null) + || (("hasActionList" in model) && (model.hasActionList === true))) + + Accessible.role: Accessible.MenuItem + Accessible.name: model.display + + function openActionMenu(x, y) { + var actionList = hasActionList ? model.actionList : []; + Tools.fillActionMenu(i18n, actionMenu, actionList, GridView.view.model.favoritesModel, model.favoriteId); + actionMenu.visualParent = item; + actionMenu.open(x, y); + } + + function actionTriggered(actionId, actionArgument) { + var close = (Tools.triggerAction(GridView.view.model, model.index, actionId, actionArgument) === true); + + if (close) { + root.toggle(); + } + } + + Kirigami.Icon { + id: icon + + y: item.showLabel ? (2 * highlightItemSvg.margins.top) : undefined + + anchors.horizontalCenter: parent.horizontalCenter + anchors.verticalCenter: item.showLabel ? undefined : parent.verticalCenter + + width: iconSize + height: width + + animated: false + + source: model.decoration + } + + PlasmaComponents3.Label { + id: label + + visible: item.showLabel + + anchors { + top: icon.bottom + topMargin: Kirigami.Units.smallSpacing + left: parent.left + leftMargin: highlightItemSvg.margins.left + right: parent.right + rightMargin: highlightItemSvg.margins.right + } + + horizontalAlignment: Text.AlignHCenter + + maximumLineCount: 2 + elide: Text.ElideMiddle + wrapMode: Text.Wrap + + color: Kirigami.Theme.textColor + + font.pointSize: Kirigami.Theme.defaultFont.pointSize + 0.5 + text: ("name" in model ? model.name : model.display) + textFormat: Text.PlainText + } + + PlasmaCore.ToolTipArea { + id: toolTip + + property string text: model.display + + anchors.fill: parent + active: root.visible && label.truncated + mainItem: toolTipDelegate + + onContainsMouseChanged: item.GridView.view.itemContainsMouseChanged(containsMouse) + } + + Keys.onPressed: event => { + if (event.key === Qt.Key_Menu && hasActionList) { + event.accepted = true; + openActionMenu(item); + } else if ((event.key === Qt.Key_Enter || event.key === Qt.Key_Return)) { + event.accepted = true; + + if ("trigger" in GridView.view.model) { + GridView.view.model.trigger(index, "", null); + root.toggle(); + } + + itemGrid.itemActivated(index, "", null); + } + } +} diff --git a/com.github.adhec.MenuDitto/contents/ui/ItemGridView.qml b/com.github.adhec.MenuDitto/contents/ui/ItemGridView.qml new file mode 100644 index 0000000..e842de3 --- /dev/null +++ b/com.github.adhec.MenuDitto/contents/ui/ItemGridView.qml @@ -0,0 +1,469 @@ +/* + SPDX-FileCopyrightText: 2015 Eike Hein + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +import QtQuick 2.15 + +import org.kde.kquickcontrolsaddons 2.0 +import org.kde.ksvg 1.0 as KSvg +import org.kde.plasma.components as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.kirigami 2.20 as Kirigami + +FocusScope { + id: itemGrid + + signal keyNavLeft + signal keyNavRight + signal keyNavUp + signal keyNavDown + + signal itemActivated(int index, string actionId, string argument) + + property bool dragEnabled: true + property bool dropEnabled: false + property bool showLabels: true + + property alias currentIndex: gridView.currentIndex + property alias currentItem: gridView.currentItem + property alias contentItem: gridView.contentItem + property alias count: gridView.count + property alias model: gridView.model + + property alias cellWidth: gridView.cellWidth + property alias cellHeight: gridView.cellHeight + property alias iconSize: gridView.iconSize + + property var horizontalScrollBarPolicy: PlasmaComponents.ScrollBar.AlwaysOff + property var verticalScrollBarPolicy: PlasmaComponents.ScrollBar.AlwaysOn + + onDropEnabledChanged: { + if (!dropEnabled && "dropPlaceHolderIndex" in model) { + model.dropPlaceHolderIndex = -1; + } + } + + onFocusChanged: { + //if (!focus && !root.keyEventProxy.activeFocus) { + if (!focus) { + currentIndex = -1; + } + } + + function currentRow() { + if (currentIndex === -1) { + return -1; + } + + return Math.floor(currentIndex / Math.floor(width / itemGrid.cellWidth)); + } + + function currentCol() { + if (currentIndex === -1) { + return -1; + } + + return currentIndex - (currentRow() * Math.floor(width / itemGrid.cellWidth)); + } + + function lastRow() { + var columns = Math.floor(width / itemGrid.cellWidth); + return Math.ceil(count / columns) - 1; + } + + function tryActivate(row, col) { + if (count) { + var columns = Math.floor(width / itemGrid.cellWidth); + var rows = Math.ceil(count / columns); + row = Math.min(row, rows - 1); + col = Math.min(col, columns - 1); + currentIndex = Math.min(row ? ((Math.max(1, row) * columns) + col) + : col, + count - 1); + + focus = true; + } + } + + function forceLayout() { + gridView.forceLayout(); + } + + ActionMenu { + id: actionMenu + + onActionClicked: { + visualParent.actionTriggered(actionId, actionArgument); + } + } + + DropArea { + id: dropArea + + //Rectangle { + //color: "red" + // anchors.fill: parent + //} + + anchors.fill: parent + + onPositionChanged: event => { + if (!itemGrid.dropEnabled || gridView.animating || !kicker.dragSource) { + return; + } + + var x = Math.max(0, event.x - (width % itemGrid.cellWidth)); + var cPos = mapToItem(gridView.contentItem, x, event.y); + var item = gridView.itemAt(cPos.x, cPos.y); + + if (item) { + if (kicker.dragSource.parent === gridView.contentItem) { + if (item !== kicker.dragSource) { + item.GridView.view.model.moveRow(dragSource.itemIndex, item.itemIndex); + } + } else if (kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model + && !itemGrid.model.isFavorite(kicker.dragSource.favoriteId)) { + var hasPlaceholder = (itemGrid.model.dropPlaceholderIndex !== -1); + + itemGrid.model.dropPlaceholderIndex = item.itemIndex; + + if (!hasPlaceholder) { + gridView.currentIndex = (item.itemIndex - 1); + } + } + } else if (kicker.dragSource.parent !== gridView.contentItem + && kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model + && !itemGrid.model.isFavorite(kicker.dragSource.favoriteId)) { + var hasPlaceholder = (itemGrid.model.dropPlaceholderIndex !== -1); + + itemGrid.model.dropPlaceholderIndex = hasPlaceholder ? itemGrid.model.count - 1 : itemGrid.model.count; + + if (!hasPlaceholder) { + gridView.currentIndex = (itemGrid.model.count - 1); + } + } else { + itemGrid.model.dropPlaceholderIndex = -1; + gridView.currentIndex = -1; + } + } + + onExited: { + if ("dropPlaceholderIndex" in itemGrid.model) { + itemGrid.model.dropPlaceholderIndex = -1; + gridView.currentIndex = -1; + } + } + + onDropped: { + if (kicker.dragSource && kicker.dragSource.parent !== gridView.contentItem && kicker.dragSource.GridView.view.model.favoritesModel === itemGrid.model) { + itemGrid.model.addFavorite(kicker.dragSource.favoriteId, itemGrid.model.dropPlaceholderIndex); + gridView.currentIndex = -1; + } + } + + Timer { + id: resetAnimationDurationTimer + + interval: 120 + repeat: false + + onTriggered: { + gridView.animationDuration = interval - 20; + } + } + + PlasmaComponents.ScrollView { + id: scrollArea + + anchors.fill: parent + + + focus: true + + PlasmaComponents.ScrollBar.horizontal.policy: itemGrid.horizontalScrollBarPolicy + PlasmaComponents.ScrollBar.vertical.policy: itemGrid.verticalScrollBarPolicy + + GridView { + id: gridView + + width: itemGrid.width + height: itemGrid.height + + signal itemContainsMouseChanged(bool containsMouse) + + property int iconSize: Kirigami.Units.iconSizes.huge + + property bool animating: false + property int animationDuration: itemGrid.dropEnabled ? resetAnimationDurationTimer.interval : 0 + + focus: true + + currentIndex: -1 + + move: Transition { + enabled: itemGrid.dropEnabled + + SequentialAnimation { + PropertyAction { target: gridView; property: "animating"; value: true } + + NumberAnimation { + duration: gridView.animationDuration + properties: "x, y" + easing.type: Easing.OutQuad + } + + PropertyAction { target: gridView; property: "animating"; value: false } + } + } + + moveDisplaced: Transition { + enabled: itemGrid.dropEnabled + + SequentialAnimation { + PropertyAction { target: gridView; property: "animating"; value: true } + + NumberAnimation { + duration: gridView.animationDuration + properties: "x, y" + easing.type: Easing.OutQuad + } + + PropertyAction { target: gridView; property: "animating"; value: false } + } + } + + keyNavigationWraps: false + boundsBehavior: Flickable.StopAtBounds + + delegate: ItemGridDelegate { + showLabel: itemGrid.showLabels + } + + highlight: Item { + property bool isDropPlaceHolder: "dropPlaceholderIndex" in itemGrid.model && itemGrid.currentIndex === itemGrid.model.dropPlaceholderIndex + + PlasmaExtras.Highlight { + visible: gridView.currentItem && !isDropPlaceHolder + hovered: true + pressed: hoverArea.pressed + + anchors.fill: parent + } + + KSvg.FrameSvgItem { + visible: gridView.currentItem && isDropPlaceHolder + + anchors.fill: parent + + imagePath: "widgets/viewitem" + prefix: "selected" + + opacity: 0.5 + + Kirigami.Icon { + anchors { + right: parent.right + rightMargin: parent.margins.right + bottom: parent.bottom + bottomMargin: parent.margins.bottom + } + + width: Kirigami.Units.iconSizes.smallMedium + height: width + + source: "list-add" + active: false + } + } + } + + highlightFollowsCurrentItem: true + highlightMoveDuration: 0 + + onCurrentIndexChanged: { + if (currentIndex !== -1) { + hoverArea.hoverEnabled = false + focus = true; + } + } + + onCountChanged: { + animationDuration = 0; + resetAnimationDurationTimer.start(); + } + + onModelChanged: { + currentIndex = -1; + } + + Keys.onLeftPressed: event => { + if (itemGrid.currentCol() !== 0) { + event.accepted = true; + moveCurrentIndexLeft(); + } else { + itemGrid.keyNavLeft(); + } + } + + Keys.onRightPressed: event => { + var columns = Math.floor(width / cellWidth); + + if (itemGrid.currentCol() !== columns - 1 && currentIndex !== count -1) { + event.accepted = true; + moveCurrentIndexRight(); + } else { + itemGrid.keyNavRight(); + } + } + + Keys.onUpPressed: event => { + if (itemGrid.currentRow() !== 0) { + event.accepted = true; + moveCurrentIndexUp(); + positionViewAtIndex(currentIndex, GridView.Contain); + } else { + itemGrid.keyNavUp(); + } + } + + Keys.onDownPressed: event => { + if (itemGrid.currentRow() < itemGrid.lastRow()) { + // Fix moveCurrentIndexDown()'s lack of proper spatial nav down + // into partial columns. + event.accepted = true; + var columns = Math.floor(width / cellWidth); + var newIndex = currentIndex + columns; + currentIndex = Math.min(newIndex, count - 1); + positionViewAtIndex(currentIndex, GridView.Contain); + } else { + itemGrid.keyNavDown(); + } + } + + onItemContainsMouseChanged: containsMouse => { + if (!containsMouse) { + //if (!actionMenu.opened) { + // gridView.currentIndex = -1; + //} + + hoverArea.pressX = -1; + hoverArea.pressY = -1; + hoverArea.lastX = -1; + hoverArea.lastY = -1; + hoverArea.pressedItem = null; + hoverArea.hoverEnabled = true; + } + } + } + } + + MouseArea { + id: hoverArea + + //anchors.fill: parent + width: itemGrid.width - Kirigami.Units.gridUnit + height: itemGrid.height + + property int pressX: -1 + property int pressY: -1 + property int lastX: -1 + property int lastY: -1 + property Item pressedItem: null + + acceptedButtons: Qt.LeftButton | Qt.RightButton + + hoverEnabled: true + + function updatePositionProperties(x, y) { + // Prevent hover event synthesis in QQuickWindow interfering + // with keyboard navigation by ignoring repeated events with + // identical coordinates. As the work done here would be re- + // dundant in any case, these are safe to ignore. + if (lastX === x && lastY === y) { + return; + } + + lastX = x; + lastY = y; + + var cPos = mapToItem(gridView.contentItem, x, y); + var item = gridView.itemAt(cPos.x, cPos.y); + + if (!item) { + gridView.currentIndex = -1; + pressedItem = null; + } else { + itemGrid.focus = (item.itemIndex !== -1) + gridView.currentIndex = item.itemIndex; + } + + return item; + } + + onPressed: mouse => { + mouse.accepted = true; + + updatePositionProperties(mouse.x, mouse.y); + + pressX = mouse.x; + pressY = mouse.y; + + if (mouse.button === Qt.RightButton) { + if (gridView.currentItem) { + if (gridView.currentItem.hasActionList) { + var mapped = mapToItem(gridView.currentItem, mouse.x, mouse.y); + gridView.currentItem.openActionMenu(mapped.x, mapped.y); + } + } else { + var mapped = mapToItem(rootItem, mouse.x, mouse.y); + contextMenu.open(mapped.x, mapped.y); + } + } else { + pressedItem = gridView.currentItem; + } + } + + onReleased: mouse => { + mouse.accepted = true; + updatePositionProperties(mouse.x, mouse.y); + + if (!dragHelper.dragging) { + if (pressedItem) { + if ("trigger" in gridView.model) { + gridView.model.trigger(pressedItem.itemIndex, "", null); + root.toggle(); + } + + itemGrid.itemActivated(pressedItem.itemIndex, "", null); + } else if (mouse.button === Qt.LeftButton) { + root.toggle(); + } + } + + pressX = pressY = -1; + pressedItem = null; + } + + onPositionChanged: mouse => { + var item = pressedItem? pressedItem : updatePositionProperties(mouse.x, mouse.y); + + if (gridView.currentIndex !== -1) { + if (itemGrid.dragEnabled && pressX !== -1 && dragHelper.isDrag(pressX, pressY, mouse.x, mouse.y)) { + if ("pluginName" in item.m) { + dragHelper.startDrag(kicker, item.url, item.icon, + "text/x-plasmoidservicename", item.m.pluginName); + } else { + // dragHelper.startDrag(kicker, item.url, item.icon); + dragHelper.startDrag(kicker,item.url); + } + kicker.dragSource = item; + pressX = -1; + pressY = -1; + } + } + } + } + } +} diff --git a/com.github.adhec.MenuDitto/contents/ui/ItemMultiGridView.qml b/com.github.adhec.MenuDitto/contents/ui/ItemMultiGridView.qml new file mode 100644 index 0000000..dc273d5 --- /dev/null +++ b/com.github.adhec.MenuDitto/contents/ui/ItemMultiGridView.qml @@ -0,0 +1,257 @@ +/* + SPDX-FileCopyrightText: 2015 Eike Hein + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +import QtQuick + +import org.kde.ksvg 1.0 as KSvg +import org.kde.plasma.components as PlasmaComponents +import org.kde.plasma.extras 2.0 as PlasmaExtras +import org.kde.kirigami 2.20 as Kirigami +import org.kde.plasma.private.kicker 0.1 as Kicker +import org.kde.plasma.plasmoid + +PlasmaComponents.ScrollView { + id: itemMultiGrid + + anchors { + top: parent.top + } + + width: parent.width + + implicitHeight: itemColumn.implicitHeight + + signal keyNavLeft(int subGridIndex) + signal keyNavRight(int subGridIndex) + signal keyNavUp() + signal keyNavDown() + + property bool grabFocus: false + + property alias model: repeater.model + property alias count: repeater.count + property alias flickableItem: flickable + + property int cellWidth + property int cellHeight + + function subGridAt(index) { + return repeater.itemAt(index).itemGrid; + } + + function tryActivate(row, col) { // FIXME TODO: Cleanup messy algo. + if (flickable.contentY > 0) { + row = 0; + } + + var target = null; + var rows = 0; + + for (var i = 0; i < repeater.count; i++) { + var grid = subGridAt(i); + if(grid.count > 0 ){ + if (rows <= row) { + target = grid; + rows += grid.lastRow() + 2; // Header counts as one. + } else { + break; + } + } + } + + if (target) { + rows -= (target.lastRow() + 2); + target.tryActivate(row - rows, col); + } + } + + onFocusChanged: { + if (!focus) { + for (var i = 0; i < repeater.count; i++) { + subGridAt(i).focus = false; + } + } + } + + Flickable { + id: flickable + + flickableDirection: Flickable.VerticalFlick + contentHeight: itemColumn.implicitHeight + //focusPolicy: Qt.NoFocus + + Column { + id: itemColumn + + width: itemMultiGrid.width - Kirigami.Units.gridUnit + + Repeater { + id: repeater + + delegate: Item { + width: itemColumn.width + height: gridView.height + gridViewLabel.height + Kirigami.Units.largeSpacing * 2 + visible: gridView.count > 0 + + property Item itemGrid: gridView + + Kirigami.Heading { + id: gridViewLabel + + anchors.top: parent.top + + x: Kirigami.Units.smallSpacing + width: parent.width - x + height: dummyHeading.height + + elide: Text.ElideRight + wrapMode: Text.NoWrap + opacity: 0.8 + + color: Kirigami.Theme.textColor + + level: 3 + font.bold: true + font.weight: Font.DemiBold + + text: repeater.model.modelForRow(index).description + textFormat: Text.PlainText + } + + Rectangle{ + anchors.right: parent.right + anchors.left: gridViewLabel.right + anchors.leftMargin: Kirigami.Units.largeSpacing + anchors.rightMargin: Kirigami.Units.largeSpacing + anchors.verticalCenter: gridViewLabel.verticalCenter + height: 1 + color: Kirigami.Theme.textColor + opacity: 0.15 + } + + MouseArea { + width: parent.width + height: parent.height + onClicked: root.toggle() + } + + ItemGridView { + id: gridView + + anchors { + top: gridViewLabel.bottom + topMargin: Kirigami.Units.largeSpacing + } + + width: parent.width + height: Math.ceil(count / Plasmoid.configuration.numberColumns) * itemMultiGrid.cellHeight + cellWidth: itemMultiGrid.cellWidth + cellHeight: itemMultiGrid.cellHeight + iconSize: root.iconSize + + verticalScrollBarPolicy: PlasmaComponents.ScrollBar.AlwaysOff + + model: repeater.model.modelForRow(index) + + onFocusChanged: { + if (focus) { + itemMultiGrid.focus = true; + } + } + + onCountChanged: { + if (itemMultiGrid.grabFocus && index == 0 && count > 0) { + currentIndex = 0; + focus = true; + } + } + + onCurrentItemChanged: { + if (!currentItem) { + return; + } + + if (index == 0 && currentRow() === 0) { + flickable.contentY = 0; + return; + } + + var y = currentItem.y; + y = contentItem.mapToItem(flickable.contentItem, 0, y).y; + + if (y < flickable.contentY) { + flickable.contentY = y; + } else { + y += itemMultiGrid.cellHeight; + y -= flickable.contentY; + y -= itemMultiGrid.height; + + if (y > 0) { + flickable.contentY += y; + } + } + } + + onKeyNavLeft: { + itemMultiGrid.keyNavLeft(index); + } + + onKeyNavRight: { + itemMultiGrid.keyNavRight(index); + } + + onKeyNavUp: { + if (index > 0) { + var i; + for (i = index; i > 0 ; i--) { + var prevGrid = subGridAt(i-1); + if(prevGrid.count > 0 ){ + prevGrid.tryActivate(prevGrid.lastRow(), currentCol()); + break; + } + } + if(i === 0){ + itemMultiGrid.keyNavUp(); + } + // var prevGrid = subGridAt(index - 1); + // prevGrid.tryActivate(prevGrid.lastRow(), currentCol()); + } else { + itemMultiGrid.keyNavUp(); + } + } + + onKeyNavDown: { + if (index < repeater.count - 1) { + var i; + for (i = index; i < repeater.count - 1 ; i++) { + var grid = subGridAt(i+1); + if(grid.count > 0 ){ + grid.tryActivate(0, currentCol()); + break; + } + } + if(i === repeater.count){ + itemMultiGrid.keyNavDown(); + } + // subGridAt(index + 1).tryActivate(0, currentCol()); + } else { + itemMultiGrid.keyNavDown(); + } + } + } + + // HACK: Steal wheel events from the nested grid view and forward them to + // the ScrollView's internal WheelArea. + Kicker.WheelInterceptor { + anchors.fill: gridView + z: 1 + destination: findWheelArea(itemMultiGrid) + } + } + } + } + } +} diff --git a/com.github.adhec.DittoMenu/contents/ui/MenuRepresentation.qml b/com.github.adhec.MenuDitto/contents/ui/MenuRepresentation.qml similarity index 55% rename from com.github.adhec.DittoMenu/contents/ui/MenuRepresentation.qml rename to com.github.adhec.MenuDitto/contents/ui/MenuRepresentation.qml index 2c5a1bf..5cfa82b 100644 --- a/com.github.adhec.DittoMenu/contents/ui/MenuRepresentation.qml +++ b/com.github.adhec.MenuDitto/contents/ui/MenuRepresentation.qml @@ -20,63 +20,96 @@ import QtQuick 2.4 import QtQuick.Layouts 1.1 +import QtQuick.Controls 2.12 + import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents -import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.extras 2.0 as PlasmaExtras import org.kde.plasma.private.kicker 0.1 as Kicker -import org.kde.kcoreaddons 1.0 as KCoreAddons // kuser +import org.kde.coreaddons 1.0 as KCoreAddons // kuser import org.kde.plasma.private.shell 2.0 import org.kde.kwindowsystem 1.0 -import QtGraphicalEffects 1.0 +import Qt5Compat.GraphicalEffects import org.kde.kquickcontrolsaddons 2.0 + +import org.kde.plasma.components 3.0 as PlasmaComponents3 import org.kde.plasma.private.quicklaunch 1.0 -import QtQuick.Controls 2.12 + +import org.kde.kirigami as Kirigami +import org.kde.plasma.plasma5support 2.0 as P5Support + +import org.kde.plasma.private.sessions as Sessions + +import org.kde.ksvg 1.0 as KSvg +import org.kde.kcmutils as KCM +import org.kde.plasma.plasmoid 2.0 + Item{ - id: main - property int sizeImage: PlasmaCore.Units.iconSizes.large * 2 + property int sizeImage: Kirigami.Units.iconSizes.large * 2.5 onVisibleChanged: { root.visible = !root.visible } + PlasmaExtras.Menu { + id: contextMenu + + PlasmaExtras.MenuItem { + action: Plasmoid.internalAction("configure") + } + } + + PlasmaCore.Dialog { id: root objectName: "popupWindow" - //flags: Qt.Window - flags: Qt.WindowStaysOnTopHint - location: PlasmaCore.Types.Floating + //flags: Qt.WindowStaysOnTopHint + flags: Qt.Dialog | Qt.FramelessWindowHint + location:{ + if (Plasmoid.configuration.displayPosition === 1) + return PlasmaCore.Types.Floating + else if (Plasmoid.configuration.displayPosition === 2) + return PlasmaCore.Types.BottomEdge + else + return Plasmoid.location + } hideOnWindowDeactivate: true - property int iconSize: PlasmaCore.Units.iconSizes.large - property int cellSize: iconSize - + PlasmaCore.Units.gridUnit * 2 - + (2 * Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, - highlightItemSvg.margins.left + highlightItemSvg.margins.right)) + property int iconSize:{ switch(Plasmoid.configuration.appsIconSize){ + case 0: return Kirigami.Units.iconSizes.smallMedium; + case 1: return Kirigami.Units.iconSizes.medium; + case 2: return Kirigami.Units.iconSizes.large; + case 3: return Kirigami.Units.iconSizes.huge; + default: return 64 + } + } + + property int cellSizeHeight: iconSize + + Kirigami.Units.gridUnit * 2 + + (2 * Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, + highlightItemSvg.margins.left + highlightItemSvg.margins.right)) + property int cellSizeWidth: cellSizeHeight + Kirigami.Units.gridUnit + property bool searching: (searchField.text != "") property bool showFavorites onVisibleChanged: { - if (visible) { - root.showFavorites = plasmoid.configuration.showFavoritesFirst + root.showFavorites = Plasmoid.configuration.showFavoritesFirst var pos = popupPosition(width, height); x = pos.x; y = pos.y; - requestActivate(); reset(); - animation1.start() - + //animation1.start() }else{ - rootItem.opacity = 0 + //rootItem.opacity = 0 } } @@ -96,6 +129,7 @@ Item{ main.visible = !main.visible } + function reset() { searchField.text = ""; @@ -108,16 +142,15 @@ Item{ } function popupPosition(width, height) { - var screenAvail = plasmoid.availableScreenRect; - var screenGeom = plasmoid.screenGeometry; - + var screenAvail = kicker.availableScreenRect; + var screenGeom = kicker.screenGeometry; var screen = Qt.rect(screenAvail.x + screenGeom.x, screenAvail.y + screenGeom.y, screenAvail.width, screenAvail.height); - var offset = PlasmaCore.Units.smallSpacing + var offset = Kirigami.Units.smallSpacing; // Fall back to bottom-left of screen area when the applet is on the desktop or floating. var x = offset; @@ -127,62 +160,65 @@ Item{ var vertMidPoint; - if (plasmoid.configuration.displayPosition === 1) { + if (Plasmoid.configuration.displayPosition === 1) { horizMidPoint = screen.x + (screen.width / 2); vertMidPoint = screen.y + (screen.height / 2); x = horizMidPoint - width / 2; y = vertMidPoint - height / 2; - } else if (plasmoid.configuration.displayPosition === 2) { + } else if (Plasmoid.configuration.displayPosition === 2) { horizMidPoint = screen.x + (screen.width / 2); vertMidPoint = screen.y + (screen.height / 2); x = horizMidPoint - width / 2; y = screen.y + screen.height - height - offset - panelSvg.margins.top; - } else if (plasmoid.location === PlasmaCore.Types.BottomEdge) { + } else if (Plasmoid.location === PlasmaCore.Types.BottomEdge) { horizMidPoint = screen.x + (screen.width / 2); appletTopLeft = parent.mapToGlobal(0, 0); x = (appletTopLeft.x < horizMidPoint) ? screen.x + offset : (screen.x + screen.width) - width - offset; y = screen.y + screen.height - height - offset - panelSvg.margins.top; - } else if (plasmoid.location === PlasmaCore.Types.TopEdge) { + } else if (Plasmoid.location === PlasmaCore.Types.TopEdge) { horizMidPoint = screen.x + (screen.width / 2); var appletBottomLeft = parent.mapToGlobal(0, parent.height); x = (appletBottomLeft.x < horizMidPoint) ? screen.x + offset : (screen.x + screen.width) - width - offset; - y = parent.height + panelSvg.margins.bottom + offset; - y = screen.y + y + (plasmoid.configuration.viewUser ? main.sizeImage*0.5 : 0); - } else if (plasmoid.location === PlasmaCore.Types.LeftEdge) { + //y = screen.y + parent.height + panelSvg.margins.bottom + offset; + y = screen.y + panelSvg.margins.bottom + offset; + } else if (Plasmoid.location === PlasmaCore.Types.LeftEdge) { vertMidPoint = screen.y + (screen.height / 2); appletTopLeft = parent.mapToGlobal(0, 0); - x = parent.width + panelSvg.margins.right + offset; - y = (appletTopLeft.y < vertMidPoint) ? screen.y + offset : (screen.y + screen.height) - height - offset; - y = screen.y + y + (plasmoid.configuration.viewUser ? main.sizeImage*0.5 : 0); - } else if (plasmoid.location === PlasmaCore.Types.RightEdge) { + x = appletTopLeft.x*2 + parent.width + panelSvg.margins.right + offset; + y = screen.y + (appletTopLeft.y < vertMidPoint) ? screen.y + offset : (screen.y + screen.height) - height - offset; + } else if (Plasmoid.location === PlasmaCore.Types.RightEdge) { vertMidPoint = screen.y + (screen.height / 2); appletTopLeft = parent.mapToGlobal(0, 0); x = appletTopLeft.x - panelSvg.margins.left - offset - width; - y = (appletTopLeft.y < vertMidPoint) ? screen.y + offset : (screen.y + screen.height) - height - offset; - y = screen.y + y + (plasmoid.configuration.viewUser ? main.sizeImage*0.5 : 0); + y = screen.y + (appletTopLeft.y < vertMidPoint) ? screen.y + offset : (screen.y + screen.height) - height - offset; } return Qt.point(x, y); } FocusScope { - id: rootItem - Layout.minimumWidth: (root.cellSize * plasmoid.configuration.numberColumns)+ PlasmaCore.Units.largeSpacing - Layout.maximumWidth: (root.cellSize * plasmoid.configuration.numberColumns)+ PlasmaCore.Units.largeSpacing - Layout.minimumHeight: (root.cellSize * plasmoid.configuration.numberRows) + searchField.implicitHeight + (plasmoid.configuration.viewUser ? main.sizeImage*0.5 : PlasmaCore.Units.largeSpacing * 1.5 ) + PlasmaCore.Units.largeSpacing * 6 - Layout.maximumHeight: (root.cellSize * plasmoid.configuration.numberRows) + searchField.implicitHeight + (plasmoid.configuration.viewUser ? main.sizeImage*0.5 : PlasmaCore.Units.largeSpacing * 1.5 ) + PlasmaCore.Units.largeSpacing * 6 - - + Layout.minimumWidth: (root.cellSizeWidth * Plasmoid.configuration.numberColumns)+ Kirigami.Units.gridUnit*1.5 + Layout.maximumWidth: (root.cellSizeWidth * Plasmoid.configuration.numberColumns)+ Kirigami.Units.gridUnit*1.5 + Layout.minimumHeight: (root.cellSizeHeight * Plasmoid.configuration.numberRows) + searchField.implicitHeight + (Plasmoid.configuration.showInfoUser ? main.sizeImage*0.5 : Kirigami.Units.gridUnit * 1.5 ) + Kirigami.Units.gridUnit * 5 + Layout.maximumHeight: (root.cellSizeHeight * Plasmoid.configuration.numberRows) + searchField.implicitHeight + (Plasmoid.configuration.showInfoUser ? main.sizeImage*0.5 : Kirigami.Units.gridUnit * 1.5 ) + Kirigami.Units.gridUnit * 5 focus: true - opacity: 0 + KCoreAddons.KUser { id: kuser } - Logic { id: logic } + Logic { id: logic } - OpacityAnimator { id: animation1; target: rootItem; from: 0; to: 1; } + OpacityAnimator { id: animation1; target: rootItem; from: 0; to: 1; easing.type: Easing.InOutQuad; } - PlasmaCore.DataSource { + Sessions.SessionManagement { + id: sm + } + + Sessions.SessionsModel { + id: sessionsModel + } + + P5Support.DataSource { id: pmEngine engine: "powermanagement" connectedSources: ["PowerDevil", "Sleep States"] @@ -193,7 +229,7 @@ Item{ } } - PlasmaCore.DataSource { + P5Support.DataSource { id: executable engine: "executable" connectedSources: [] @@ -213,13 +249,13 @@ Item{ signal exited(string cmd, int exitCode, int exitStatus, string stdout, string stderr) } - PlasmaComponents.Highlight { + PlasmaExtras.Highlight { id: delegateHighlight visible: false z: -1 // otherwise it shows ontop of the icon/label and tints them slightly } - PlasmaExtras.Heading { + Kirigami.Heading { id: dummyHeading visible: false width: 0 @@ -231,30 +267,14 @@ Item{ font: dummyHeading.font } - ActionMenu { - id: actionMenu - onActionClicked: visualParent.actionTriggered(actionId, actionArgument) - } - - PlasmaCore.FrameSvgItem { - id : headingSvg - width: parent.width + backgroundSvg.margins.right + backgroundSvg.margins.left - height: root.cellSize * plasmoid.configuration.numberRows + PlasmaCore.Units.largeSpacing * 2 + backgroundSvg.margins.bottom - 1 //<>+ paginationBar.height - y: globalFavoritesGrid.y - PlasmaCore.Units.largeSpacing - x: - backgroundSvg.margins.left - imagePath: "widgets/plasmoidheading" - prefix: "footer" - opacity: 0.7 - } - RowLayout{ id: rowTop anchors { left: parent.left right: parent.right top: parent.top - margins: PlasmaCore.Units.smallSpacing - topMargin: PlasmaCore.Units.largeSpacing / 2 + margins: Kirigami.Units.smallSpacing + topMargin: Kirigami.Units.largeSpacing } PlasmaComponents3.ToolButton { @@ -281,8 +301,9 @@ Item{ PlasmaComponents3.ToolButton { icon.name: "system-lock-screen" - onClicked: pmEngine.performOperation("lockScreen") - enabled: pmEngine.data["Sleep States"]["LockScreen"] + //onClicked: pmEngine.performOperation("lockScreen") + //enabled: pmEngine.data["Sleep States"]["LockScreen"] + onClicked: sm.lock() ToolTip.delay: 200 ToolTip.timeout: 1000 ToolTip.visible: hovered @@ -290,36 +311,46 @@ Item{ } PlasmaComponents3.ToolButton { - icon.name: "system-shutdown" - onClicked: pmEngine.performOperation("requestShutDown") + icon.name: "system-switch-user" + onClicked: sm.switchUser() ToolTip.delay: 200 ToolTip.timeout: 1000 ToolTip.visible: hovered - ToolTip.text: i18n("Leave ...") + ToolTip.text: i18n("Switch User") + } + + PlasmaComponents3.ToolButton { + icon.name: "system-shutdown" + // onClicked: sm.requestShutdown() + onClicked: sm.requestLogoutPrompt() + ToolTip.delay: 200 + ToolTip.timeout: 1000 + ToolTip.visible: hovered + ToolTip.text: i18n("Shutdown") } } - PlasmaExtras.Heading { + Kirigami.Heading { anchors { top: rowTop.bottom - topMargin: PlasmaCore.Units.largeSpacing + topMargin: Kirigami.Units.gridUnit horizontalCenter: parent.horizontalCenter } level: 1 - color: theme.textColor + color: Kirigami.Theme.textColor text: i18n("Hi, ")+ kuser.fullName - font.bold: true - visible: plasmoid.configuration.viewUser + font.weight: Font.Bold + visible: Plasmoid.configuration.showInfoUser } RowLayout { id: rowSearchField anchors{ - top: plasmoid.configuration.viewUser ? parent.top : rowTop.bottom - topMargin: plasmoid.configuration.viewUser ? PlasmaCore.Units.largeSpacing*3 + sizeImage/2 : PlasmaCore.Units.largeSpacing/2 + top: Plasmoid.configuration.showInfoUser ? parent.top : rowTop.bottom + topMargin: Plasmoid.configuration.showInfoUser ? Kirigami.Units.gridUnit*3 + sizeImage/2 : Kirigami.Units.gridUnit/2 left: parent.left right: parent.right - margins: PlasmaCore.Units.smallSpacing + margins: Kirigami.Units.smallSpacing } Item{ @@ -329,31 +360,39 @@ Item{ id: searchField Layout.fillWidth: true placeholderText: i18n("Type here to search ...") - leftPadding: PlasmaCore.Units.largeSpacing + PlasmaCore.Units.iconSizes.small + topPadding: 10 + bottomPadding: 10 + leftPadding: Kirigami.Units.gridUnit + Kirigami.Units.iconSizes.small text: "" - //clearButtonShown: true // TODO: kubuntu 20.04 + font.pointSize: Kirigami.Theme.defaultFont.pointSize + 2 + onTextChanged: { runnerModel.query = text; } - Keys.onPressed: { - if (event.key === Qt.Key_Escape) { - event.accepted = true; - if(root.searching){ - searchField.clear() - } else { - root.toggle() - } - } + Keys.onPressed: (event)=> { + if (event.key === Qt.Key_Escape) { + event.accepted = true; + if(root.searching){ + searchField.clear() + } else { + root.toggle() + } + } - if (event.key === Qt.Key_Down || event.key === Qt.Key_Tab || event.key === Qt.Key_Backtab) { - event.accepted = true; - if(root.showFavorites) - globalFavoritesGrid.tryActivate(0,0) - else - mainColumn.visibleGrid.tryActivate(0,0) - } - } + if (event.key === Qt.Key_Down || event.key === Qt.Key_Tab || event.key === Qt.Key_Backtab) { + event.accepted = true; + if(root.searching){ + runnerGrid.tryActivate(0,0) + } + else{ + if(root.showFavorites) + globalFavoritesGrid.tryActivate(0,0) + else + mainColumn.visibleGrid.tryActivate(0,0) + } + } + } function backspace() { if (!root.visible) { @@ -370,15 +409,15 @@ Item{ focus = true; text = text + newText; } - PlasmaCore.IconItem { + Kirigami.Icon { source: 'search' anchors { left: searchField.left verticalCenter: searchField.verticalCenter - leftMargin: PlasmaCore.Units.smallSpacing * 2 + leftMargin: Kirigami.Units.smallSpacing * 2 } - height: PlasmaCore.Units.iconSizes.small + height: Kirigami.Units.iconSizes.small width: height } @@ -425,35 +464,30 @@ Item{ ItemGridView { id: globalFavoritesGrid - visible: (plasmoid.configuration.showFavoritesFirst || root.showFavorites ) && !root.searching && root.showFavorites + visible: (Plasmoid.configuration.showFavoritesFirst || root.showFavorites ) && !root.searching && root.showFavorites anchors { top: rowSearchField.bottom - topMargin: PlasmaCore.Units.largeSpacing * 2 - left: parent.left - right: parent.right + topMargin: Kirigami.Units.gridUnit } - - width: root.cellSize * plasmoid.configuration.numberColumns + PlasmaCore.Units.largeSpacing - height: root.cellSize * plasmoid.configuration.numberRows - focus: true - cellWidth: root.cellSize - cellHeight: root.cellSize - iconSize: root.iconSize dragEnabled: true dropEnabled: true - usesPlasmaTheme: true - + width: rootItem.width + height: root.cellSizeHeight * Plasmoid.configuration.numberRows + focus: true + cellWidth: root.cellSizeWidth + cellHeight: root.cellSizeHeight + iconSize: root.iconSize onKeyNavUp: searchField.focus = true - Keys.onPressed: { - if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ - searchField.focus = true; - return - } - if (event.key === Qt.Key_Tab) { - event.accepted = true; - searchField.focus = true - } - } + Keys.onPressed:(event)=> { + if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ + searchField.focus = true; + return + } + if (event.key === Qt.Key_Tab) { + event.accepted = true; + searchField.focus = true + } + } } // @@ -464,22 +498,21 @@ Item{ Item{ id: mainGrids - visible: (!plasmoid.configuration.showFavoritesFirst && !root.showFavorites ) || root.searching || !root.showFavorites //TODO + visible: (!Plasmoid.configuration.showFavoritesFirst && !root.showFavorites ) || root.searching || !root.showFavorites //TODO anchors { top: rowSearchField.bottom - topMargin: PlasmaCore.Units.largeSpacing * 2 - left: parent.left - right: parent.right - + topMargin: Kirigami.Units.gridUnit } - width: root.cellSize * plasmoid.configuration.numberColumns + PlasmaCore.Units.largeSpacing - height: root.cellSize * plasmoid.configuration.numberRows + + width: rootItem.width + height: root.cellSizeHeight * Plasmoid.configuration.numberRows Item { id: mainColumn - width: root.cellSize * plasmoid.configuration.numberColumns + PlasmaCore.Units.largeSpacing - height: root.cellSize * plasmoid.configuration.numberRows + //width: root.cellSize * Plasmoid.configuration.numberColumns + Kirigami.Units.gridUnit + width: rootItem.width + height: root.cellSizeHeight * Plasmoid.configuration.numberRows property Item visibleGrid: allAppsGrid @@ -492,17 +525,17 @@ Item{ ItemGridView { id: allAppsGrid - width: root.cellSize * plasmoid.configuration.numberColumns + PlasmaCore.Units.largeSpacing - height: root.cellSize * plasmoid.configuration.numberRows - - cellWidth: root.cellSize - cellHeight: root.cellSize + //width: root.cellSize * Plasmoid.configuration.numberColumns + Kirigami.Units.gridUnit + width: rootItem.width + height: root.cellSizeHeight * Plasmoid.configuration.numberRows + cellWidth: root.cellSizeWidth + cellHeight: root.cellSizeHeight iconSize: root.iconSize enabled: (opacity == 1) ? 1 : 0 + z: enabled ? 5 : -1 dropEnabled: false dragEnabled: false opacity: root.searching ? 0 : 1 - onOpacityChanged: { if (opacity == 1) { //allAppsGrid.scrollBar.flickableItem.contentY = 0; @@ -514,12 +547,12 @@ Item{ ItemMultiGridView { id: runnerGrid - width: root.cellSize * plasmoid.configuration.numberColumns + PlasmaCore.Units.largeSpacing - height: root.cellSize * plasmoid.configuration.numberRows - z: (opacity == 1.0) ? 1 : 0 - aCellWidth: parent.width - PlasmaCore.Units.largeSpacing - aCellHeight: root.cellSize + width: rootItem.width + height: root.cellSizeHeight * Plasmoid.configuration.numberRows + cellWidth: root.cellSizeWidth + cellHeight: root.cellSizeHeight enabled: (opacity == 1.0) ? 1 : 0 + z: enabled ? 5 : -1 model: runnerModel grabFocus: true opacity: root.searching ? 1.0 : 0.0 @@ -531,65 +564,65 @@ Item{ onKeyNavUp: searchField.focus = true } - Keys.onPressed: { - if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ - searchField.focus = true; - return - } - if (event.key === Qt.Key_Tab) { - event.accepted = true; - searchField.focus = true - } else if (event.key === Qt.Key_Backspace) { - event.accepted = true; - if(root.searching) - searchField.backspace(); - else - searchField.focus = true - } else if (event.key === Qt.Key_Escape) { - event.accepted = true; - if(root.searching){ - searchField.clear() - } else { - root.toggle() + Keys.onPressed: (event)=> { + if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ + searchField.focus = true; + return + } + if (event.key === Qt.Key_Tab) { + event.accepted = true; + searchField.focus = true + } else if (event.key === Qt.Key_Backspace) { + event.accepted = true; + if(root.searching) + searchField.backspace(); + else + searchField.focus = true + } else if (event.key === Qt.Key_Escape) { + event.accepted = true; + if(root.searching){ + searchField.clear() + } else { + root.toggle() + } + } else if (event.text !== "") { + event.accepted = true; + searchField.appendText(event.text); + } + } + } + } + + + + + Keys.onPressed: (event)=> { + if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ + searchField.focus = true; + return + } + if (event.key === Qt.Key_Escape) { + event.accepted = true; + if (root.searching) { + reset(); + } else { + root.visible = false; + } + return; + } + + if (searchField.focus) { + return; + } + + if (event.key === Qt.Key_Backspace) { + event.accepted = true; + searchField.backspace(); + } else if (event.text !== "") { + event.accepted = true; + searchField.appendText(event.text); + } } - } else if (event.text !== "") { - event.accepted = true; - searchField.appendText(event.text); - } - } - } - } - - - - - Keys.onPressed: { - if(event.modifiers & Qt.ControlModifier ||event.modifiers & Qt.ShiftModifier){ - searchField.focus = true; - return - } - if (event.key === Qt.Key_Escape) { - event.accepted = true; - if (root.searching) { - reset(); - } else { - root.visible = false; - } - return; - } - - if (searchField.focus) { - return; - } - - if (event.key === Qt.Key_Backspace) { - event.accepted = true; - searchField.backspace(); - } else if (event.text !== "") { - event.accepted = true; - searchField.appendText(event.text); - } - } } @@ -633,22 +666,18 @@ Item{ Image { id: iconUser - //anchors.centerIn: parent - source: kuser.faceIconUrl.toString() || "user-identity" + source: kuser.faceIconUrl cache: false - visible: source !== "" && plasmoid.configuration.viewUser + visible: source !== "" && Plasmoid.configuration.showInfoUser sourceSize.width: main.sizeImage sourceSize.height: main.sizeImage - fillMode: Image.PreserveAspectFit - // Crop the avatar to fit in a circle, like the lock and login screens - // but don't on software rendering where this won't render - layer.enabled:true // iconUser.GraphicsInfo.api !== GraphicsInfo.Software + layer.enabled:true layer.effect: OpacityMask { // this Rectangle is a circle due to radius size maskSource: Rectangle { - width: main.sizeImage - height: width + width: iconUser.width + height: iconUser.height radius: height / 2 visible: false } @@ -658,22 +687,21 @@ Item{ State { name: "show" when: dialog.visible - PropertyChanges { target: iconUser; y: 0; opacity: 1; } + PropertyChanges { target: iconUser; opacity: 1; } }, State { name: "hide" when: !dialog.visible - PropertyChanges { target: iconUser; y: sizeImage/2 ; opacity: 0; } + PropertyChanges { target: iconUser; opacity: 0; } } ] transitions: Transition { - PropertyAnimation { properties: "opacity,y"; easing.type: Easing.InOutQuad; } + PropertyAnimation { properties: "opacity"; easing.type: Easing.InOutQuad; } } MouseArea { anchors.fill: parent acceptedButtons: Qt.LeftButton - onClicked: KCMShell.openSystemSettings("kcm_users") - visible: KCMShell.authorize("user_manager.desktop").length > 0 + onClicked: KCM.KCMLauncher.openSystemSettings("kcm_users") } } } diff --git a/com.github.adhec.MenuDitto/contents/ui/code/tools.js b/com.github.adhec.MenuDitto/contents/ui/code/tools.js new file mode 100644 index 0000000..fa1cbd3 --- /dev/null +++ b/com.github.adhec.MenuDitto/contents/ui/code/tools.js @@ -0,0 +1,181 @@ +/* + SPDX-FileCopyrightText: 2013 Aurélien Gâteau + SPDX-FileCopyrightText: 2013-2015 Eike Hein + SPDX-FileCopyrightText: 2017 Ivan Cukic + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +.pragma library + +function fillActionMenu(i18n, actionMenu, actionList, favoriteModel, favoriteId) { + // Accessing actionList can be a costly operation, so we don't + // access it until we need the menu. + + var actions = createFavoriteActions(i18n, favoriteModel, favoriteId); + + if (actions) { + if (actionList && actionList.length > 0) { + var actionListCopy = Array.from(actionList); + var separator = { "type": "separator" }; + actionListCopy.push(separator); + // actionList = actions.concat(actionList); // this crashes Qt O.o + actionListCopy.push.apply(actionListCopy, actions); + actionList = actionListCopy; + } else { + actionList = actions; + } + } + + actionMenu.actionList = actionList; +} + +function createFavoriteActions(i18n, favoriteModel, favoriteId) { + if (!favoriteModel || !favoriteModel.enabled || !favoriteId) { + return null; + } + + + if (favoriteModel.activities === undefined || + favoriteModel.activities.runningActivities.length <= 1) { + var action = {}; + + if (favoriteModel.isFavorite(favoriteId)) { + action.text = i18n("Remove from Favorites"); + action.icon = "bookmark-remove"; + action.actionId = "_kicker_favorite_remove"; + } else if (favoriteModel.maxFavorites === -1 || favoriteModel.count < favoriteModel.maxFavorites) { + action.text = i18n("Add to Favorites"); + action.icon = "bookmark-new"; + action.actionId = "_kicker_favorite_add"; + } else { + return null; + } + + action.actionArgument = { favoriteModel: favoriteModel, favoriteId: favoriteId }; + + return [action]; + + } else { + var actions = []; + + var linkedActivities = favoriteModel.linkedActivitiesFor(favoriteId); + + var activities = favoriteModel.activities.runningActivities; + + // Adding the item to link/unlink to all activities + + var linkedToAllActivities = + !(linkedActivities.indexOf(":global") === -1); + + actions.push({ + text : i18n("On All Activities"), + checkable : true, + + actionId : linkedToAllActivities ? + "_kicker_favorite_remove_from_activity" : + "_kicker_favorite_set_to_activity", + checked : linkedToAllActivities, + + actionArgument : { + favoriteModel: favoriteModel, + favoriteId: favoriteId, + favoriteActivity: "" + } + }); + + + // Adding items for each activity separately + + var addActivityItem = function(activityId, activityName) { + var linkedToThisActivity = + !(linkedActivities.indexOf(activityId) === -1); + + actions.push({ + text : activityName, + checkable : true, + checked : linkedToThisActivity && !linkedToAllActivities, + + actionId : + // If we are on all activities, and the user clicks just one + // specific activity, unlink from everything else + linkedToAllActivities ? "_kicker_favorite_set_to_activity" : + + // If we are linked to the current activity, just unlink from + // that single one + linkedToThisActivity ? "_kicker_favorite_remove_from_activity" : + + // Otherwise, link to this activity, but do not unlink from + // other ones + "_kicker_favorite_add_to_activity", + + actionArgument : { + favoriteModel : favoriteModel, + favoriteId : favoriteId, + favoriteActivity : activityId + } + }); + }; + + // Adding the item to link/unlink to the current activity + + addActivityItem(favoriteModel.activities.currentActivity, i18n("On the Current Activity")); + + actions.push({ + type: "separator", + actionId: "_kicker_favorite_separator" + }); + + // Adding the items for each activity + + activities.forEach(function(activityId) { + addActivityItem(activityId, favoriteModel.activityNameForId(activityId)); + }); + + return [{ + text : i18n("Show in Favorites"), + icon : "favorite", + subActions : actions + }]; + } +} + +function triggerAction(model, index, actionId, actionArgument) { + function startsWith(txt, needle) { + return txt.substr(0, needle.length) === needle; + } + + if (startsWith(actionId, "_kicker_favorite_")) { + handleFavoriteAction(actionId, actionArgument); + return; + } + + var closeRequested = model.trigger(index, actionId, actionArgument); + + if (closeRequested) { + return true; + } + + return false; +} + +function handleFavoriteAction(actionId, actionArgument) { + var favoriteId = actionArgument.favoriteId; + var favoriteModel = actionArgument.favoriteModel; + + if (favoriteModel === null || favoriteId === null) { + return null; + } + + if (actionId === "_kicker_favorite_remove") { + favoriteModel.removeFavorite(favoriteId); + } else if (actionId === "_kicker_favorite_add") { + favoriteModel.addFavorite(favoriteId); + } else if (actionId === "_kicker_favorite_remove_from_activity") { + favoriteModel.removeFavoriteFrom(favoriteId, actionArgument.favoriteActivity); + } else if (actionId === "_kicker_favorite_add_to_activity") { + favoriteModel.addFavoriteTo(favoriteId, actionArgument.favoriteActivity); + } else if (actionId === "_kicker_favorite_set_to_activity") { + favoriteModel.setFavoriteOn(favoriteId, actionArgument.favoriteActivity); + } +} diff --git a/com.github.adhec.DittoMenu/contents/ui/main.qml b/com.github.adhec.MenuDitto/contents/ui/main.qml similarity index 50% rename from com.github.adhec.DittoMenu/contents/ui/main.qml rename to com.github.adhec.MenuDitto/contents/ui/main.qml index 99fe435..a7f817b 100644 --- a/com.github.adhec.DittoMenu/contents/ui/main.qml +++ b/com.github.adhec.MenuDitto/contents/ui/main.qml @@ -19,32 +19,31 @@ import QtQuick 2.0 import QtQuick.Layouts 1.1 -import org.kde.plasma.plasmoid 2.0 + +import org.kde.plasma.plasmoid import org.kde.plasma.core 2.0 as PlasmaCore -import org.kde.plasma.components 2.0 as PlasmaComponents +import org.kde.plasma.components 3.0 as PC3 import org.kde.plasma.private.kicker 0.1 as Kicker +import org.kde.plasma.plasma5support 2.0 as P5Support +import org.kde.kirigami as Kirigami +import org.kde.ksvg 1.0 as KSvg + +PlasmoidItem { -Item { id: kicker anchors.fill: parent signal reset - property bool isDash: false - - Plasmoid.preferredRepresentation: Plasmoid.fullRepresentation - - Plasmoid.compactRepresentation: null - Plasmoid.fullRepresentation: compactRepresentation + preferredRepresentation: compactRepresentation + compactRepresentation: compactRepresentation + fullRepresentation: compactRepresentation property Item dragSource: null - property QtObject globalFavorites: rootModel.favoritesModel - property QtObject systemFavorites: rootModel.systemFavoritesModel - function action_menuedit() { processRunner.runMenuEditor(); } @@ -54,45 +53,60 @@ Item { CompactRepresentation {} } - Component { - id: menuRepresentation - MenuRepresentation {} + property QtObject globalFavorites: rootModel.favoritesModel + property QtObject systemFavorites: rootModel.systemFavoritesModel + + Plasmoid.icon: Plasmoid.configuration.useCustomButtonImage ? Plasmoid.configuration.customButtonImage : Plasmoid.configuration.icon + + onSystemFavoritesChanged: { + systemFavorites.favorites = Plasmoid.configuration.favoriteSystemActions; } - readonly property Kicker.RootModel rootModel: Kicker.RootModel { + Kicker.RootModel { id: rootModel autoPopulate: false - appNameFormat: plasmoid.configuration.appNameFormat + appNameFormat: 0 flat: true sorted: true showSeparators: false - appletInterface: plasmoid + appletInterface: kicker showAllApps: true showRecentApps: false showRecentDocs: false - showRecentContacts: false showPowerSession: false + onShowRecentAppsChanged: { + Plasmoid.configuration.showRecentApps = showRecentApps; + } + + onShowRecentDocsChanged: { + Plasmoid.configuration.showRecentDocs = showRecentDocs; + } + + onRecentOrderingChanged: { + Plasmoid.configuration.recentOrdering = recentOrdering; + } + Component.onCompleted: { + favoritesModel.initForClient("org.kde.plasma.kicker.favorites.instance-" + Plasmoid.id) - favoritesModel.initForClient("org.kde.plasma.kickoff.favorites.instance-" + plasmoid.id) - - if (!plasmoid.configuration.favoritesPortedToKAstats) { + if (!Plasmoid.configuration.favoritesPortedToKAstats) { if (favoritesModel.count < 1) { - favoritesModel.portOldFavorites(plasmoid.configuration.favorites); + favoritesModel.portOldFavorites(Plasmoid.configuration.favoriteApps); } - plasmoid.configuration.favoritesPortedToKAstats = true; + Plasmoid.configuration.favoritesPortedToKAstats = true; } } } + Connections { target: globalFavorites - function onFavoritesChanged () { - plasmoid.configuration.favoriteApps = target.favorites; + function onFavoritesChanged() { + Plasmoid.configuration.favoriteApps = target.favorites; } } @@ -100,19 +114,19 @@ Item { target: systemFavorites function onFavoritesChanged() { - plasmoid.configuration.favoriteSystemActions = target.favorites; + Plasmoid.configuration.favoriteSystemActions = target.favorites; } } Connections { - target: plasmoid.configuration + target: Plasmoid.configuration function onFavoriteAppsChanged () { - globalFavorites.favorites = plasmoid.configuration.favoriteApps; + globalFavorites.favorites = Plasmoid.configuration.favoriteApps; } function onFavoriteSystemActionsChanged () { - systemFavorites.favorites = plasmoid.configuration.favoriteSystemActions; + systemFavorites.favorites = Plasmoid.configuration.favoriteSystemActions; } function onHiddenApplicationsChanged(){ @@ -121,13 +135,28 @@ Item { } Kicker.RunnerModel { - id: runnerModel + id: runnerModel + + appletInterface: kicker + + favoritesModel: globalFavorites + + runners: { + const results = ["krunner_services", + "krunner_systemsettings", + "krunner_sessions", + "krunner_powerdevil", + "calculator", + "unitconverter"]; + + if (Plasmoid.configuration.useExtraRunners) { + results.push(...Plasmoid.configuration.extraRunners); + } + + return results; + } + } - appletInterface: plasmoid - favoritesModel: globalFavorites - deleteWhenEmpty: false - mergeResults: true - } Kicker.DragHelper { id: dragHelper @@ -137,7 +166,11 @@ Item { id: processRunner; } - PlasmaCore.FrameSvgItem { + Kicker.WindowSystem { + id: windowSystem + } + + KSvg.FrameSvgItem { id : highlightItemSvg visible: false @@ -146,7 +179,7 @@ Item { prefix: "hover" } - PlasmaCore.FrameSvgItem { + KSvg.FrameSvgItem { id : panelSvg visible: false @@ -154,7 +187,7 @@ Item { imagePath: "widgets/panel-background" } - PlasmaCore.FrameSvgItem { + KSvg.FrameSvgItem { id : scrollbarSvg visible: false @@ -162,7 +195,7 @@ Item { imagePath: "widgets/scrollbar" } - PlasmaCore.FrameSvgItem { + KSvg.FrameSvgItem { id : backgroundSvg visible: false @@ -171,25 +204,51 @@ Item { } - PlasmaComponents.Label { + PC3.Label { id: toolTipDelegate width: contentWidth - height: contentHeight + height: undefined property Item toolTip - text: (toolTip != null) ? toolTip.text : "" + text: toolTip ? toolTip.text : "" + textFormat: Text.PlainText } function resetDragSource() { dragSource = null; } - Component.onCompleted: { - plasmoid.setAction("menuedit", i18n("Edit Applications...")); + function enableHideOnWindowDeactivate() { + kicker.hideOnWindowDeactivate = true; + } + Plasmoid.contextualActions: [ + PlasmaCore.Action { + text: i18n("Edit Applications…") + icon.name: "kmenuedit" + visible: Plasmoid.immutability !== PlasmaCore.Types.SystemImmutable + onTriggered: processRunner.runMenuEditor() + } + ] + + Component.onCompleted: { + // plasmoid.setAction("menuedit", i18n("Edit Applications...")); + // //rootModel.refreshed.connect(reset); + // //dragHelper.dropped.connect(resetDragSource); + + if (Plasmoid.hasOwnProperty("activationTogglesExpanded")) { + Plasmoid.activationTogglesExpanded = !kicker.isDash + } + + windowSystem.focusIn.connect(enableHideOnWindowDeactivate); + kicker.hideOnWindowDeactivate = true; + + //updateSvgMetrics(); + //PlasmaCore.Theme.themeChanged.connect(updateSvgMetrics); //rootModel.refreshed.connect(reset); - //dragHelper.dropped.connect(resetDragSource); + dragHelper.dropped.connect(resetDragSource); + } } diff --git a/com.github.adhec.MenuDitto/metadata.json b/com.github.adhec.MenuDitto/metadata.json new file mode 100644 index 0000000..db85929 --- /dev/null +++ b/com.github.adhec.MenuDitto/metadata.json @@ -0,0 +1,25 @@ +{ + "KPackageStructure": "Plasma/Applet", + "KPlugin": { + "Authors": [ + { + "Email": "adhemarks@gmail.com", + "Name": "Ademir" + } + ], + "Category": "Application Launchers", + "Description": "Configurable grid of application icons", + "Description[x-test]": "xxConfigurable grid of application iconsxx", + "EnabledByDefault": true, + "Icon": "start-here-kde", + "Id": "com.github.adhec.MenuDitto", + "License": "GPL-2.0+", + "Name": "Menu Ditto", + "Name[x-test]": "xxMenu Dittoxx", + "Website": "https://kde.org/plasma-desktop" + }, + "X-Plasma-API-Minimum-Version": "6.0", + "X-Plasma-Provides": [ + "org.kde.plasma.launchermenu" + ] +} diff --git a/com.github.adhec.DittoMenu/translate/ReadMe.md b/com.github.adhec.MenuDitto/translate/ReadMe.md similarity index 74% rename from com.github.adhec.DittoMenu/translate/ReadMe.md rename to com.github.adhec.MenuDitto/translate/ReadMe.md index cd0a557..1eb94e3 100644 --- a/com.github.adhec.DittoMenu/translate/ReadMe.md +++ b/com.github.adhec.MenuDitto/translate/ReadMe.md @@ -4,11 +4,11 @@ With KDE Frameworks v5.37 and above, translations are bundled with the `*.plasmo ## Install Translations -Go to `~/.local/share/plasma/plasmoids/com.github.adhec.DittoMenu/translate/` and run `sh ./build --restartplasma`. +Go to `~/.local/share/plasma/plasmoids/com.github.adhec.MenuDitto/translate/` and run `sh ./build --restartplasma`. ## New Translations -1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/adhec/dittoMenuKDE/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop). +1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/prateekmedia/MenuDitto/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop). Or if you know how to make a pull request @@ -35,11 +35,11 @@ Or if you know how to make a pull request ## Status | Locale | Lines | % Done| |----------|---------|-------| -| Template | 28 | | -| fr | 27/28 | 96% | -| ko | 25/28 | 89% | -| nl | 18/28 | 64% | -| pl | 21/28 | 75% | -| pt_BR | 28/28 | 100% | -| ru | 28/28 | 100% | -| tr | 21/28 | 75% | +| Template | 35 | | +| fr | 23/35 | 65% | +| ko | 20/35 | 57% | +| nl | 14/35 | 40% | +| pl | 17/35 | 48% | +| pt_BR | 23/35 | 65% | +| ru | 35/35 | 100% | +| tr | 17/35 | 48% | diff --git a/com.github.adhec.DittoMenu/translate/build b/com.github.adhec.MenuDitto/translate/build similarity index 93% rename from com.github.adhec.DittoMenu/translate/build rename to com.github.adhec.MenuDitto/translate/build index 338bb05..2adca25 100755 --- a/com.github.adhec.DittoMenu/translate/build +++ b/com.github.adhec.MenuDitto/translate/build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # Version: 6 # This script will convert the *.po files to *.mo files, rebuilding the package/contents/locale folder. @@ -6,9 +6,9 @@ # Eg: contents/locale/fr_CA/LC_MESSAGES/plasma_applet_org.kde.plasma.eventcalendar.mo DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd` -plasmoidName=com.github.adhec.DittoMenu +plasmoidName=com.github.adhec.MenuDitto widgetName="${plasmoidName##*.}" # Strip namespace -website=https://github.com/adhec/dittoMenuKDE +website=https://github.com/prateekmedia/MenuDitto bugAddress="$website" packageRoot=".." # Root of translatable sources projectName="plasma_applet_${plasmoidName}" # project name diff --git a/com.github.adhec.DittoMenu/translate/fr.po b/com.github.adhec.MenuDitto/translate/fr.po similarity index 70% rename from com.github.adhec.DittoMenu/translate/fr.po rename to com.github.adhec.MenuDitto/translate/fr.po index ccffaa8..d273f4a 100644 --- a/com.github.adhec.DittoMenu/translate/fr.po +++ b/com.github.adhec.MenuDitto/translate/fr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: omano\n" "Language-Team: LANGUAGE \n" @@ -17,44 +17,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Enlever des Favoris" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Ajouter aux Favoris" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "Sur toutes les Activités" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "Sur l'Activité actuelle" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Voir dans les Favoris" - #: ../contents/config/config.qml msgid "General" msgstr "Général" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Enlever des Favoris" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Ajouter aux Favoris" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "Sur toutes les Activités" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Icône:" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Choisir..." +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Supprimer l'icône" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "Voir les Favoris en premier" @@ -87,6 +107,10 @@ msgstr "Nombre de colonnes" msgid "Number of rows" msgstr "Nombre de lignes" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Ne plus cacher les applications" @@ -96,7 +120,7 @@ msgid "Unhidden!" msgstr "Plus cachées!" #: ../contents/ui/main.qml -msgid "Edit Applications..." +msgid "Edit Applications…" msgstr "" #: ../contents/ui/MenuRepresentation.qml @@ -112,8 +136,12 @@ msgid "Lock Screen" msgstr "Verrouiller l'écran" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." -msgstr "Quitter ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "Hi, " @@ -136,3 +164,16 @@ msgstr "Toutes les applications" #~ msgid "A configurable launcher menu" #~ msgstr "Un menu de lancement configurable" + +#~ msgid "On The Current Activity" +#~ msgstr "Sur l'Activité actuelle" + +#~ msgid "Show In Favorites" +#~ msgstr "Voir dans les Favoris" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Choisir..." + +#~ msgid "Leave ..." +#~ msgstr "Quitter ..." diff --git a/com.github.adhec.DittoMenu/translate/ko.po b/com.github.adhec.MenuDitto/translate/ko.po similarity index 67% rename from com.github.adhec.DittoMenu/translate/ko.po rename to com.github.adhec.MenuDitto/translate/ko.po index 5e71c23..248059a 100644 --- a/com.github.adhec.DittoMenu/translate/ko.po +++ b/com.github.adhec.MenuDitto/translate/ko.po @@ -1,8 +1,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: 2021-09-29 09:43+0900\n" "Last-Translator: \n" "Language-Team: \n" @@ -14,44 +14,64 @@ msgstr "" "X-Poedit-Basepath: .\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "즐겨찾기에서 제거" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "즐겨찾기에 추가" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "모든 활동" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "현재 활동만" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "즐겨찾기에 표시" - #: ../contents/config/config.qml msgid "General" msgstr "일반" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "즐겨찾기에서 제거" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "즐겨찾기에 추가" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "모든 활동" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "아이콘:" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "선택..." +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "아이콘 초기화" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "즐겨찾기 먼저 표시" @@ -84,6 +104,10 @@ msgstr "" msgid "Number of rows" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "모든 숨겨진 프로그램 복구" @@ -93,8 +117,8 @@ msgid "Unhidden!" msgstr "복구됨!" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "프로그램 편집..." +msgid "Edit Applications…" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -109,8 +133,12 @@ msgid "Lock Screen" msgstr "잠금" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." -msgstr "떠나기..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "Hi, " @@ -133,3 +161,19 @@ msgstr "모든 프로그램" #~ msgid "A configurable launcher menu" #~ msgstr "프로그램 실행기" + +#~ msgid "On The Current Activity" +#~ msgstr "현재 활동만" + +#~ msgid "Show In Favorites" +#~ msgstr "즐겨찾기에 표시" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "선택..." + +#~ msgid "Edit Applications..." +#~ msgstr "프로그램 편집..." + +#~ msgid "Leave ..." +#~ msgstr "떠나기..." diff --git a/com.github.adhec.DittoMenu/translate/merge b/com.github.adhec.MenuDitto/translate/merge similarity index 98% rename from com.github.adhec.DittoMenu/translate/merge rename to com.github.adhec.MenuDitto/translate/merge index 633d0cb..feeb6ee 100755 --- a/com.github.adhec.DittoMenu/translate/merge +++ b/com.github.adhec.MenuDitto/translate/merge @@ -6,9 +6,9 @@ # https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/extract-messages.sh DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd` -plasmoidName=com.github.adhec.DittoMenu +plasmoidName=com.github.adhec.MenuDitto widgetName="${plasmoidName##*.}" # Strip namespace -website=https://github.com/adhec/dittoMenuKDE +website=https://github.com/prateekmedia/MenuDitto bugAddress="$website" packageRoot=".." # Root of translatable sources projectName="plasma_applet_${plasmoidName}" # project name diff --git a/com.github.adhec.DittoMenu/translate/nl.po b/com.github.adhec.MenuDitto/translate/nl.po similarity index 75% rename from com.github.adhec.DittoMenu/translate/nl.po rename to com.github.adhec.MenuDitto/translate/nl.po index 778c2f9..6f8f8ee 100644 --- a/com.github.adhec.DittoMenu/translate/nl.po +++ b/com.github.adhec.MenuDitto/translate/nl.po @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: 2022-01-01 20:09+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: \n" @@ -18,44 +18,64 @@ msgstr "" "X-Generator: Poedit 3.0\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Verwijderen uit favorieten" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Toevoegen aan favorieten" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "Op alle activiteiten" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "Op de huidige activiteit" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Toevoegen aan favorieten" - #: ../contents/config/config.qml msgid "General" msgstr "Algemeen" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Verwijderen uit favorieten" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Toevoegen aan favorieten" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "Op alle activiteiten" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Pictogram:" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Kiezen…" +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Pictogram verwijderen" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "Favorieten bovenaan tonen" @@ -88,6 +108,10 @@ msgstr "" msgid "Number of rows" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Alle verborgen programma's zichtbaar maken" @@ -97,8 +121,8 @@ msgid "Unhidden!" msgstr "Alles programma's zijn weer zichtbaar!" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "Programma's bewerken…" +msgid "Edit Applications…" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -113,7 +137,11 @@ msgid "Lock Screen" msgstr "" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" msgstr "" #: ../contents/ui/MenuRepresentation.qml @@ -138,6 +166,19 @@ msgstr "" #~ msgid "A configurable launcher menu" #~ msgstr "Een instelbare programmastarter" +#~ msgid "On The Current Activity" +#~ msgstr "Op de huidige activiteit" + +#~ msgid "Show In Favorites" +#~ msgstr "Toevoegen aan favorieten" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Kiezen…" + +#~ msgid "Edit Applications..." +#~ msgstr "Programma's bewerken…" + #~ msgctxt "@action" #~ msgid "Lock Screen" #~ msgstr "Scherm vergrendelen" diff --git a/com.github.adhec.DittoMenu/translate/pl.po b/com.github.adhec.MenuDitto/translate/pl.po similarity index 74% rename from com.github.adhec.DittoMenu/translate/pl.po rename to com.github.adhec.MenuDitto/translate/pl.po index d945f0c..d631c59 100644 --- a/com.github.adhec.DittoMenu/translate/pl.po +++ b/com.github.adhec.MenuDitto/translate/pl.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: 2022-04-05 10:40+0100\n" "Last-Translator: Krzysztof Korab \n" "Language-Team: \n" @@ -17,44 +17,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Usuń z ulubionych" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Dodaj do ulubionych" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "Na wszystkich aktywnościach" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "Na bieżącej aktywności" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Pokaż w ulubionych" - #: ../contents/config/config.qml msgid "General" msgstr "Ogólne" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Usuń z ulubionych" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Dodaj do ulubionych" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "Na wszystkich aktywnościach" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Ikona:" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Wybierz..." +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Wyczyść ikonę" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "Najpierw pokaż ulubione" @@ -87,6 +107,10 @@ msgstr "" msgid "Number of rows" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Uwidocznij wszystkie ukryte aplikacje" @@ -96,8 +120,8 @@ msgid "Unhidden!" msgstr "Wszystkie programy są widoczne!" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "Edytuj programy..." +msgid "Edit Applications…" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -112,7 +136,11 @@ msgid "Lock Screen" msgstr "" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" msgstr "" #: ../contents/ui/MenuRepresentation.qml @@ -134,6 +162,19 @@ msgstr "" #~ msgid "A configurable launcher menu" #~ msgstr "Konfigurowalne menu uruchamiania programów" +#~ msgid "On The Current Activity" +#~ msgstr "Na bieżącej aktywności" + +#~ msgid "Show In Favorites" +#~ msgstr "Pokaż w ulubionych" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Wybierz..." + +#~ msgid "Edit Applications..." +#~ msgstr "Edytuj programy..." + #~ msgctxt "@action" #~ msgid "Lock Screen" #~ msgstr "Zablokuj ekran" diff --git a/com.github.adhec.DittoMenu/translate/plasmoidlocaletest b/com.github.adhec.MenuDitto/translate/plasmoidlocaletest similarity index 100% rename from com.github.adhec.DittoMenu/translate/plasmoidlocaletest rename to com.github.adhec.MenuDitto/translate/plasmoidlocaletest diff --git a/com.github.adhec.DittoMenu/translate/pt_BR.po b/com.github.adhec.MenuDitto/translate/pt_BR.po similarity index 69% rename from com.github.adhec.DittoMenu/translate/pt_BR.po rename to com.github.adhec.MenuDitto/translate/pt_BR.po index 332c871..99b1a81 100644 --- a/com.github.adhec.DittoMenu/translate/pt_BR.po +++ b/com.github.adhec.MenuDitto/translate/pt_BR.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,44 +17,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Remover dos favoritos" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Adicionar aos Favoritos" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "Em todas as atividades" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "Na atividade atual" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Exibir nos favoritos" - #: ../contents/config/config.qml msgid "General" msgstr "Geral" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Remover dos favoritos" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Adicionar aos Favoritos" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "Em todas as atividades" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Ícone" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Procurar" +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Resetar Ícone" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "Exbir os Favoritros primeiro" @@ -87,6 +107,10 @@ msgstr "Numero de colunas" msgid "Number of rows" msgstr "Numero de filas" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Mostrar aplicativos ocultos" @@ -96,8 +120,8 @@ msgid "Unhidden!" msgstr "Reexibido" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "Editar Programa" +msgid "Edit Applications…" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -112,8 +136,12 @@ msgid "Lock Screen" msgstr "Tela de bloqueio" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." -msgstr "Sair ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "Hi, " @@ -136,3 +164,19 @@ msgstr "Todos os programas" #~ msgid "A configurable launcher menu" #~ msgstr "Configuração do Menu Iniciar" + +#~ msgid "On The Current Activity" +#~ msgstr "Na atividade atual" + +#~ msgid "Show In Favorites" +#~ msgstr "Exibir nos favoritos" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Procurar" + +#~ msgid "Edit Applications..." +#~ msgstr "Editar Programa" + +#~ msgid "Leave ..." +#~ msgstr "Sair ..." diff --git a/com.github.adhec.DittoMenu/translate/ru.po b/com.github.adhec.MenuDitto/translate/ru.po similarity index 67% rename from com.github.adhec.DittoMenu/translate/ru.po rename to com.github.adhec.MenuDitto/translate/ru.po index 66e6995..9c22a09 100644 --- a/com.github.adhec.DittoMenu/translate/ru.po +++ b/com.github.adhec.MenuDitto/translate/ru.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Edward Karate \n" "Language-Team: LANGUAGE \n" @@ -17,47 +17,67 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Убрать из избранного" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Добавить в избранное" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "По всем видам деятельности" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "О текущей деятельности" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Показать в Избранном" - #: ../contents/config/config.qml msgid "General" msgstr "Общие" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Убрать из избранных" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Добавить в избранные" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "По всем видам деятельности" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "В текущей активности" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "Показать в Избранных" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Значок" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Выбрать..." +msgid "Choose…" +msgstr "Выбрать…" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Очистить значок" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "Размер значков" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "Маленький" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "Средний" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "Большой" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "Огромный" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" -msgstr "Сначала показать избранное" +msgstr "Сначала показать избранные" #: ../contents/ui/ConfigGeneral.qml msgid "Menu position" @@ -65,7 +85,7 @@ msgstr "Положение меню" #: ../contents/ui/ConfigGeneral.qml msgid "Default" -msgstr "По умолчанию" +msgstr "По-умолчанию" #: ../contents/ui/ConfigGeneral.qml msgid "Center" @@ -87,6 +107,10 @@ msgstr "Количество колонок" msgid "Number of rows" msgstr "Количество строк" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "Показывать пользователя" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Показать все скрытые приложения" @@ -96,8 +120,8 @@ msgid "Unhidden!" msgstr "Показаны!" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "Редактировать меню..." +msgid "Edit Applications…" +msgstr "Редактировать приложения…" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -112,8 +136,12 @@ msgid "Lock Screen" msgstr "Заблокировать" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." -msgstr "Выход ..." +msgid "Switch User" +msgstr "Сменить пользователя" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" +msgstr "Выключение" #: ../contents/ui/MenuRepresentation.qml msgid "Hi, " @@ -121,11 +149,11 @@ msgstr "Привет, " #: ../contents/ui/MenuRepresentation.qml msgid "Type here to search ..." -msgstr "Введите текст для поиска..." +msgstr "Введите текст для поиска ..." #: ../contents/ui/MenuRepresentation.qml msgid "Favorites" -msgstr "Избранное" +msgstr "Избранные" #: ../contents/ui/MenuRepresentation.qml msgid "All apps" @@ -137,6 +165,22 @@ msgstr "Все приложения" #~ msgid "A configurable launcher menu" #~ msgstr "Настраиваемое меню приложений" +#~ msgid "On The Current Activity" +#~ msgstr "О текущей деятельности" + +#~ msgid "Show In Favorites" +#~ msgstr "Показать в Избранных" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Выбрать..." + +#~ msgid "Edit Applications..." +#~ msgstr "Редактировать меню..." + +#~ msgid "Leave ..." +#~ msgstr "Выход ..." + #~ msgctxt "@action" #~ msgid "Lock Screen" #~ msgstr "Заблокировать" diff --git a/com.github.adhec.DittoMenu/translate/template.pot b/com.github.adhec.MenuDitto/translate/template.pot similarity index 68% rename from com.github.adhec.DittoMenu/translate/template.pot rename to com.github.adhec.MenuDitto/translate/template.pot index bb4006b..630b8b9 100644 --- a/com.github.adhec.DittoMenu/translate/template.pot +++ b/com.github.adhec.MenuDitto/translate/template.pot @@ -1,14 +1,14 @@ -# Translation of DittoMenu in LANGUAGE +# Translation of MenuDitto in LANGUAGE # Copyright (C) 2024 -# This file is distributed under the same license as the DittoMenu package. +# This file is distributed under the same license as the MenuDitto package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: DittoMenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Project-Id-Version: MenuDitto\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,28 +17,28 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: ../contents/code/tools.js +#: ../contents/config/config.qml +msgid "General" +msgstr "" + +#: ../contents/ui/code/tools.js msgid "Remove from Favorites" msgstr "" -#: ../contents/code/tools.js +#: ../contents/ui/code/tools.js msgid "Add to Favorites" msgstr "" -#: ../contents/code/tools.js +#: ../contents/ui/code/tools.js msgid "On All Activities" msgstr "" -#: ../contents/code/tools.js -msgid "On The Current Activity" +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" msgstr "" -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "" - -#: ../contents/config/config.qml -msgid "General" +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" msgstr "" #: ../contents/ui/ConfigGeneral.qml @@ -47,7 +47,7 @@ msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." +msgid "Choose…" msgstr "" #: ../contents/ui/ConfigGeneral.qml @@ -55,6 +55,26 @@ msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "" @@ -87,6 +107,10 @@ msgstr "" msgid "Number of rows" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "" @@ -96,7 +120,7 @@ msgid "Unhidden!" msgstr "" #: ../contents/ui/main.qml -msgid "Edit Applications..." +msgid "Edit Applications…" msgstr "" #: ../contents/ui/MenuRepresentation.qml @@ -112,7 +136,11 @@ msgid "Lock Screen" msgstr "" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" msgstr "" #: ../contents/ui/MenuRepresentation.qml diff --git a/com.github.adhec.DittoMenu/translate/tr.po b/com.github.adhec.MenuDitto/translate/tr.po similarity index 75% rename from com.github.adhec.DittoMenu/translate/tr.po rename to com.github.adhec.MenuDitto/translate/tr.po index c827734..b83311c 100644 --- a/com.github.adhec.DittoMenu/translate/tr.po +++ b/com.github.adhec.MenuDitto/translate/tr.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: dittomenu\n" -"Report-Msgid-Bugs-To: https://github.com/adhec/dittoMenuKDE\n" -"POT-Creation-Date: 2024-01-03 17:25+0500\n" +"Report-Msgid-Bugs-To: https://github.com/prateekmedia/MenuDitto\n" +"POT-Creation-Date: 2024-10-07 22:12+0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,44 +20,64 @@ msgstr "" "X-Language: tr_TR\n" "X-Source-Language: C\n" -#: ../contents/code/tools.js -msgid "Remove from Favorites" -msgstr "Favorilerden Çıkar" - -#: ../contents/code/tools.js -msgid "Add to Favorites" -msgstr "Favorilerden Ekle" - -#: ../contents/code/tools.js -msgid "On All Activities" -msgstr "Tüm Etkinliklerde" - -#: ../contents/code/tools.js -msgid "On The Current Activity" -msgstr "Mevcut Etkinlik Üzerine" - -#: ../contents/code/tools.js -msgid "Show In Favorites" -msgstr "Favorilerde Göster" - #: ../contents/config/config.qml msgid "General" msgstr "Genel" +#: ../contents/ui/code/tools.js +msgid "Remove from Favorites" +msgstr "Favorilerden Çıkar" + +#: ../contents/ui/code/tools.js +msgid "Add to Favorites" +msgstr "Favorilerden Ekle" + +#: ../contents/ui/code/tools.js +msgid "On All Activities" +msgstr "Tüm Etkinliklerde" + +#: ../contents/ui/code/tools.js +msgid "On the Current Activity" +msgstr "" + +#: ../contents/ui/code/tools.js +msgid "Show in Favorites" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Icon:" msgstr "Sİmge:" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Open icon chooser dialog" -msgid "Choose..." -msgstr "Seçmek..." +msgid "Choose…" +msgstr "" #: ../contents/ui/ConfigGeneral.qml msgctxt "@item:inmenu Reset icon to default" msgid "Clear Icon" msgstr "Simgeyi Temizle" +#: ../contents/ui/ConfigGeneral.qml +msgid "Icon size:" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Small" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Medium" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Large" +msgstr "" + +#: ../contents/ui/ConfigGeneral.qml +msgid "Huge" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Show favorites first" msgstr "Önce favorileri göster" @@ -90,6 +110,10 @@ msgstr "" msgid "Number of rows" msgstr "" +#: ../contents/ui/ConfigGeneral.qml +msgid "Show user" +msgstr "" + #: ../contents/ui/ConfigGeneral.qml msgid "Unhide all hidden applications" msgstr "Tüm gizli uygulamaları göster" @@ -99,8 +123,8 @@ msgid "Unhidden!" msgstr "Gizli!" #: ../contents/ui/main.qml -msgid "Edit Applications..." -msgstr "Uygulamaları Düzenle..." +msgid "Edit Applications…" +msgstr "" #: ../contents/ui/MenuRepresentation.qml msgid "System Preferences" @@ -115,7 +139,11 @@ msgid "Lock Screen" msgstr "" #: ../contents/ui/MenuRepresentation.qml -msgid "Leave ..." +msgid "Switch User" +msgstr "" + +#: ../contents/ui/MenuRepresentation.qml +msgid "Shutdown" msgstr "" #: ../contents/ui/MenuRepresentation.qml @@ -140,6 +168,19 @@ msgstr "" #~ msgid "A configurable launcher menu" #~ msgstr "Yapılandırılabilir bir başlatıcı menüsü" +#~ msgid "On The Current Activity" +#~ msgstr "Mevcut Etkinlik Üzerine" + +#~ msgid "Show In Favorites" +#~ msgstr "Favorilerde Göster" + +#~ msgctxt "@item:inmenu Open icon chooser dialog" +#~ msgid "Choose..." +#~ msgstr "Seçmek..." + +#~ msgid "Edit Applications..." +#~ msgstr "Uygulamaları Düzenle..." + #~ msgctxt "@action" #~ msgid "Lock Screen" #~ msgstr "Kilit Ekranı" diff --git a/push.sh b/push.sh index 345883e..434d0f3 100755 --- a/push.sh +++ b/push.sh @@ -1,5 +1,6 @@ #!/bin/bash -git add . && git commit -m "Update" && git push +git add . && git commit -m "Update" +git push echo "Ready"