From c695f895ea6d580fa162a4e0bb4a9c4c1951a54f Mon Sep 17 00:00:00 2001 From: Ondrej Pokorny Date: Mon, 10 Jun 2024 13:51:55 +0200 Subject: [PATCH] ProjectGroups: open Drop-Down-Button --- .../projectgroups/images/pg_images_list.txt | 3 + .../projectgroups/images/pg_open_simple.png | Bin 0 -> 430 bytes .../images/pg_open_simple_150.png | Bin 0 -> 659 bytes .../images/pg_open_simple_200.png | Bin 0 -> 699 bytes .../languages/projectgroupstrconst.de.po | 11 ++ .../languages/projectgroupstrconst.fr.po | 11 ++ .../languages/projectgroupstrconst.hu.po | 11 ++ .../languages/projectgroupstrconst.it.po | 11 ++ .../languages/projectgroupstrconst.lt.po | 11 ++ .../languages/projectgroupstrconst.pot | 10 ++ .../languages/projectgroupstrconst.pt_BR.po | 11 ++ .../languages/projectgroupstrconst.ru.po | 11 ++ .../languages/projectgroupstrconst.sk.po | 11 ++ .../languages/projectgroupstrconst.tr.po | 11 ++ .../languages/projectgroupstrconst.uk.po | 11 ++ .../languages/projectgroupstrconst.zh_CN.po | 11 ++ components/projectgroups/pg_images.res | Bin 29353 -> 31341 bytes .../projectgroups/projectgroupeditor.lfm | 151 ++++++++++-------- .../projectgroups/projectgroupeditor.pas | 59 +++++++ .../projectgroups/projectgroupstrconst.pas | 2 + 20 files changed, 278 insertions(+), 68 deletions(-) create mode 100644 components/projectgroups/images/pg_open_simple.png create mode 100644 components/projectgroups/images/pg_open_simple_150.png create mode 100644 components/projectgroups/images/pg_open_simple_200.png diff --git a/components/projectgroups/images/pg_images_list.txt b/components/projectgroups/images/pg_images_list.txt index e9879ba64d..b313d089ee 100644 --- a/components/projectgroups/images/pg_images_list.txt +++ b/components/projectgroups/images/pg_images_list.txt @@ -15,6 +15,9 @@ pg_new_200.png pg_open.png pg_open_150.png pg_open_200.png +pg_open_simple.png +pg_open_simple_150.png +pg_open_simple_200.png pg_open_recent.png pg_open_recent_150.png pg_open_recent_200.png diff --git a/components/projectgroups/images/pg_open_simple.png b/components/projectgroups/images/pg_open_simple.png new file mode 100644 index 0000000000000000000000000000000000000000..f7dca8f3604bf76aecb75cf2e8b78fc2b5bcdb5e GIT binary patch literal 430 zcmV;f0a5;mP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10Xs=V zK~y-6#nZnpLs1mK@$Y@_7L|HyH$xXCV)7qI3``PAWX=z`7$i4R+gOY|co^)`Mn{$Tqxx=~lC=p?h@CMR=zTHc0I@ex9A`O7@tnVkc zvPn&NCq=K z&87#~9~d#TYZo1HogEEOubh+4tb(n6gZ*>!_0B~uI{0||$db?=m~t#^-fD=L&h(1h zXp~|!H69xymUg2g9_#~XPiaPm12B)j<8Fk_O2av~3!p_@RDL-5(|=GXUn%kc>fg8V Y9d4u8QeY{lJOBUy07*qoM6N<$g0_aW_W%F@ literal 0 HcmV?d00001 diff --git a/components/projectgroups/images/pg_open_simple_150.png b/components/projectgroups/images/pg_open_simple_150.png new file mode 100644 index 0000000000000000000000000000000000000000..e51c1b461d3120cf1212125947954ecec966527e GIT binary patch literal 659 zcmV;E0&M+>P)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10w765 zK~zYI?Um1K6G0Tmzi)Pv#tjzIphzjwqG%DtLyz9Pc`Vq2deVajLFm7ue}T}Wg;tM> z?Ztx;_aLEFE2U~M8F+TYB#D z1FoM?KzPOZ`__fU)gwW-vW;)=pB@hg@%7q@T8QT+SX;ud1}@IeEaCi>C(zOx3+_7~ z;5()HUZ0tI8Y7EymmZA;2Y_GY=kT3UpKtPA6c1QSl;13)9UPn*YOhh}>m}Mv1pL}Z zw1WfWi??7-&71M!nFwed;*2#5$lAyPj;c%G{bT~!H&^t2 zB0waN%bktVbKKPEZr8FxEA*Jb>#@%S5roL1Q7uJ_qlb03o4`H3;U-lGW)?b1Pe*_u tm1>&KZ##AK*hbh3tJq4W|9|?U>@TWaoKU^y7J>i(002ovPDHLkV1oWhB=P_N literal 0 HcmV?d00001 diff --git a/components/projectgroups/images/pg_open_simple_200.png b/components/projectgroups/images/pg_open_simple_200.png new file mode 100644 index 0000000000000000000000000000000000000000..ec49d6356d6c9982f36a2ffe800ae4773ed2e3d7 GIT binary patch literal 699 zcmV;s0!00ZP)pF8FWQhbW?9;ba!ELWdL_~cP?peYja~^aAhuUa%Y?FJQ@H10!T?j zK~z|U?U%i7(_j>aA3ISSS52gt5uO9th;u(tczZ0o&gZ2wQ2=8GzLiKK20g^G}Fvk;<&0s`DV$aLIdM68`MwF>A+&bWmXLeqJs; z0Jr~IdJSx2aB?3+5Hi{+v-ZvLQYgZ;G1Siw9Dqy?I!1r;&byp4c>mc`3K7~07`eC@YM$Zu#nC<_W!G@kiN!+H1#t_NZ4^V{Q%nH zZO{I=eI4SiG>np?uR8Yo02EYG+LCL3Tn9ofVniFHW6^F^!5zOofO+i}s$4;*6{D}i zx4~>w5s}{b^#N$wvcLL~+7SJ+WHxJ#{o>j01E^e_P`NmXOfaeFj$b!apf+_?FZR3R h*A3<7zu|um@E1sO@zF#_d)EK}002ovPDHLkV1gQ0KGy&M literal 0 HcmV?d00001 diff --git a/components/projectgroups/languages/projectgroupstrconst.de.po b/components/projectgroups/languages/projectgroupstrconst.de.po index dcb0c6ca6e..b64e9e7024 100644 --- a/components/projectgroups/languages/projectgroupstrconst.de.po +++ b/components/projectgroups/languages/projectgroupstrconst.de.po @@ -324,6 +324,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Neue Projektgruppe" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Öffnen" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Neu laden" @@ -499,6 +509,7 @@ msgid "Open Target" msgstr "Ziel öffnen" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Öffnen" diff --git a/components/projectgroups/languages/projectgroupstrconst.fr.po b/components/projectgroups/languages/projectgroupstrconst.fr.po index 9dfd9b875b..0978d23aed 100644 --- a/components/projectgroups/languages/projectgroupstrconst.fr.po +++ b/components/projectgroups/languages/projectgroupstrconst.fr.po @@ -311,6 +311,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Nouveau groupe de projets" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Ouvrir" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Recharger" @@ -484,6 +494,7 @@ msgid "Open Target" msgstr "Ouvrir la cible" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Ouvrir" diff --git a/components/projectgroups/languages/projectgroupstrconst.hu.po b/components/projectgroups/languages/projectgroupstrconst.hu.po index ae57dc6c16..5322ce35cc 100644 --- a/components/projectgroups/languages/projectgroupstrconst.hu.po +++ b/components/projectgroups/languages/projectgroupstrconst.hu.po @@ -311,6 +311,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Új projektcsoport" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Megnyitás" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Újratöltés" @@ -484,6 +494,7 @@ msgid "Open Target" msgstr "Cél megnyitása" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Megnyitás" diff --git a/components/projectgroups/languages/projectgroupstrconst.it.po b/components/projectgroups/languages/projectgroupstrconst.it.po index 3fd0b0a619..0eb1263c08 100644 --- a/components/projectgroups/languages/projectgroupstrconst.it.po +++ b/components/projectgroups/languages/projectgroupstrconst.it.po @@ -319,6 +319,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Nuovo gruppo di progetti" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Apri" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Ricarica" @@ -498,6 +508,7 @@ msgid "Open Target" msgstr "Apri destinazione" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Apri" diff --git a/components/projectgroups/languages/projectgroupstrconst.lt.po b/components/projectgroups/languages/projectgroupstrconst.lt.po index dc7d9b0d4d..3231a0787c 100644 --- a/components/projectgroups/languages/projectgroupstrconst.lt.po +++ b/components/projectgroups/languages/projectgroupstrconst.lt.po @@ -324,6 +324,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Nauja projekto grupė" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Atverti" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Įkelti iš naujo" @@ -499,6 +509,7 @@ msgid "Open Target" msgstr "Atverti tikslą" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Atverti" diff --git a/components/projectgroups/languages/projectgroupstrconst.pot b/components/projectgroups/languages/projectgroupstrconst.pot index ab0c8ec0d3..a40f54d231 100644 --- a/components/projectgroups/languages/projectgroupstrconst.pot +++ b/components/projectgroups/languages/projectgroupstrconst.pot @@ -296,6 +296,15 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "" +#: projectgroupstrconst.lisprojectgroupopencaption +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "" @@ -469,6 +478,7 @@ msgid "Open Target" msgstr "" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "" diff --git a/components/projectgroups/languages/projectgroupstrconst.pt_BR.po b/components/projectgroups/languages/projectgroupstrconst.pt_BR.po index 12e32dc399..34466ebd2a 100644 --- a/components/projectgroups/languages/projectgroupstrconst.pt_BR.po +++ b/components/projectgroups/languages/projectgroupstrconst.pt_BR.po @@ -311,6 +311,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Novo grupo de projeto" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Abrir" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Recarregar" @@ -484,6 +494,7 @@ msgid "Open Target" msgstr "Abrir Alvo" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Abrir" diff --git a/components/projectgroups/languages/projectgroupstrconst.ru.po b/components/projectgroups/languages/projectgroupstrconst.ru.po index 0288dcde7b..3a3ca2b22c 100644 --- a/components/projectgroups/languages/projectgroupstrconst.ru.po +++ b/components/projectgroups/languages/projectgroupstrconst.ru.po @@ -311,6 +311,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Новая группа проектов" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Открыть" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Перезагрузить" @@ -484,6 +494,7 @@ msgid "Open Target" msgstr "Открыть цель" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Открыть" diff --git a/components/projectgroups/languages/projectgroupstrconst.sk.po b/components/projectgroups/languages/projectgroupstrconst.sk.po index e4747f2292..3aaa53cbe8 100644 --- a/components/projectgroups/languages/projectgroupstrconst.sk.po +++ b/components/projectgroups/languages/projectgroupstrconst.sk.po @@ -309,6 +309,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Nová skupina projektov" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Otvoriť" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Znovu načítať" @@ -482,6 +492,7 @@ msgid "Open Target" msgstr "Otvoriť cieľ" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Otvoriť" diff --git a/components/projectgroups/languages/projectgroupstrconst.tr.po b/components/projectgroups/languages/projectgroupstrconst.tr.po index 3d573727bd..c5415d04e4 100644 --- a/components/projectgroups/languages/projectgroupstrconst.tr.po +++ b/components/projectgroups/languages/projectgroupstrconst.tr.po @@ -311,6 +311,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Yeni proje grubu" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Aç" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Tekrar yükle" @@ -484,6 +494,7 @@ msgid "Open Target" msgstr "Hedefi Aç" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Aç" diff --git a/components/projectgroups/languages/projectgroupstrconst.uk.po b/components/projectgroups/languages/projectgroupstrconst.uk.po index 7213be6026..1593b50e35 100644 --- a/components/projectgroups/languages/projectgroupstrconst.uk.po +++ b/components/projectgroups/languages/projectgroupstrconst.uk.po @@ -313,6 +313,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "Нова група проєктів" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "Відкрити" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "Перезавантажити" @@ -486,6 +496,7 @@ msgid "Open Target" msgstr "Відкрити ціль" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "Відкрити" diff --git a/components/projectgroups/languages/projectgroupstrconst.zh_CN.po b/components/projectgroups/languages/projectgroupstrconst.zh_CN.po index 5f92caf570..a58b7a8619 100644 --- a/components/projectgroups/languages/projectgroupstrconst.zh_CN.po +++ b/components/projectgroups/languages/projectgroupstrconst.zh_CN.po @@ -312,6 +312,16 @@ msgctxt "projectgroupstrconst.lisprojectgroupnewhint" msgid "New project group" msgstr "新建项目组" +#: projectgroupstrconst.lisprojectgroupopencaption +#, fuzzy +msgctxt "projectgroupstrconst.lisprojectgroupopencaption" +msgid "Open" +msgstr "打开" + +#: projectgroupstrconst.lisprojectgroupopenhint +msgid "Open project group" +msgstr "" + #: projectgroupstrconst.lisprojectgroupreload msgid "Reload" msgstr "重新加载" @@ -485,6 +495,7 @@ msgid "Open Target" msgstr "打开目标" #: projectgroupstrconst.listargetopencaption +msgctxt "projectgroupstrconst.listargetopencaption" msgid "Open" msgstr "打开" diff --git a/components/projectgroups/pg_images.res b/components/projectgroups/pg_images.res index ddd7639ea651b0b53675c8be7f87025803a88cb8..82d456fd8216378d89ae2e6253b77b5dd6dba396 100644 GIT binary patch delta 1586 zcmV-22F>}YMIE2A~o5g#r9Tz~uaCUkp$-~jT5Ys)D*2@)7rR{qS5LV7e1~Wa)rU%#`7%{YK7aeh(9Su;g zoRiM1f~|go{d4p6&P6Ud_;~xslF%NQax7MC-fD=L&h(1hXp~|!H69xymUg2g9_#~X zPiaPm12B)j<8Fk_O2av~3!p_@RDL-5(|=GXUn%kc>fg8V9d4u8QeY{lJOBUy07*qo zM6N<$f&c)M0+Sv(8k4YWg?|DdNklm}Mv1pL}Zw1WfWi??7-&71J0~_J{J-*>4RS0GlI!aGRfFYG?n$B-Kb@SLp*bA%JN~ZsR`lIYGs$HB= zz2+8z00000NkvXXu0mjf0J{Q{9y%J6%48aoY8PvN0!T?jK~z|U?U%i7(_j>aA3ISS zS52gt5uO9th;u(t zczY~=yw2yPGf@Cne0#vTEW-A>0>G<@0=Sj4y7`91m4~5+^zs2eKEJ>{J7ECV_9*ed zUiPS6OQSEa#q0NJBtu=Mx*m=CZUy<=1-p=a~0Z0S@uA09|B-6~zWx&?Ms~V{d z-hR9J2g@=5N_U^|)dv8ukj^>w|EsEyzQ%<#^)p9E*l{=g0NUbh&;Gc59pbJujFO|T zI`;bj6jV~$l52ll2SP4lL>r`I(QZ{}!5zOofO+i}s$4;*6{D}ix4~>w5s}{b^#N$w zvcLL~+7SJ+WHxJ#{o>j01E^e_P`NmXOfaeFj$b!apf+_?FZR3R*A3<7zu|um@E1sO k@zF#_d)EK}002ovPDHLkV1fYU0ssI!lOZ}IvmiH#JGKYy$N&HU delta 14 WcmaF+g>mIm#tlErHt(_9Xbk{B1PAE= diff --git a/components/projectgroups/projectgroupeditor.lfm b/components/projectgroups/projectgroupeditor.lfm index c028483e0c..baaca0bdcd 100644 --- a/components/projectgroups/projectgroupeditor.lfm +++ b/components/projectgroups/projectgroupeditor.lfm @@ -1,34 +1,40 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm - Left = 190 - Height = 448 - Top = 198 - Width = 808 + Left = 331 + Height = 358 + Top = 393 + Width = 646 BorderIcons = [biSystemMenu] Caption = 'ProjectGroupEditorForm' - ClientHeight = 448 - ClientWidth = 808 - DesignTimePPI = 120 + ClientHeight = 358 + ClientWidth = 646 + LCLVersion = '3.99.0.0' OnCloseQuery = FormCloseQuery OnCreate = FormCreate OnDestroy = FormDestroy - LCLVersion = '2.3.0.0' object TBProjectGroup: TToolBar Left = 0 - Height = 60 + Height = 48 Top = 0 - Width = 808 + Width = 646 AutoSize = True - ButtonHeight = 58 - ButtonWidth = 29 + ButtonHeight = 46 + ButtonWidth = 23 ShowCaptions = True TabOrder = 0 - object TBSave: TToolButton + object TBOpen: TToolButton Left = 1 Top = 2 + Action = AProjectGroupOpen + DropdownMenu = PopupMenuOpen + Style = tbsDropDown + end + object TBSave: TToolButton + Left = 50 + Top = 2 Action = AProjectGroupSave end object TBAdd: TToolButton - Left = 127 + Left = 150 Top = 2 Caption = 'Add' DropdownMenu = PopupMenuAdd @@ -36,101 +42,100 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm Style = tbsButtonDrop end object TBNewTarget: TToolButton - Left = 41 + Left = 82 Top = 2 Action = AProjectGroupAddNew Visible = False end object TBDelete: TToolButton - Left = 177 + Left = 190 Top = 2 Action = AProjectGroupDelete end object TBCompile: TToolButton - Left = 240 + Left = 241 Top = 2 Action = ATargetCompile end object TBCompileClean: TToolButton - Left = 305 + Left = 294 Top = 2 Action = ATargetCompileClean end object ToolButton1: TToolButton - Left = 411 - Height = 8 + Left = 380 + Height = 46 Top = 2 Caption = 'ToolButton1' Style = tbsSeparator end object TBTargetUp: TToolButton - Left = 484 + Left = 439 Top = 2 Action = ATargetEarlier end object TBTargetLater: TToolButton - Left = 535 + Left = 479 Top = 2 Action = ATargetLater end object TBMore: TToolButton - Left = 633 + Left = 557 Top = 2 Caption = 'More...' DropdownMenu = PopupMenuMore Style = tbsButtonDrop end object TBActivate: TToolButton - Left = 421 + Left = 388 Top = 2 Action = ATargetActivate Visible = False end object TBReload: TToolButton - Left = 577 + Left = 513 Top = 2 Action = AProjectGroupReload end end object TVPG: TTreeView Left = 0 - Height = 359 - Top = 60 - Width = 808 + Height = 287 + Top = 48 + Width = 646 Align = alClient HideSelection = False PopupMenu = PopupMenuTree ReadOnly = True RightClickSelect = True - ShowSeparators = False TabOrder = 1 + Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] OnAdvancedCustomDrawItem = TVPGAdvancedCustomDrawItem OnDblClick = TVPGDblClick OnKeyDown = TVPGKeyDown OnMouseDown = TVPGMouseDown OnSelectionChanged = TVPGSelectionChanged - Options = [tvoAutoItemHeight, tvoKeepCollapsedNodes, tvoReadOnly, tvoRightClickSelect, tvoShowButtons, tvoShowLines, tvoShowRoot, tvoToolTips, tvoThemedDraw] end object SBPG: TStatusBar Left = 0 - Height = 29 - Top = 419 - Width = 808 + Height = 23 + Top = 335 + Width = 646 Panels = < item Text = '0 targets' - Width = 106 + Width = 85 end item Text = 'Current target: ' - Width = 62 + Width = 50 end> SimplePanel = False end object PopupMenuMore: TPopupMenu OnPopup = PopupMenuMorePopup - Left = 260 - Top = 120 + Left = 208 + Top = 96 object PMINew: TMenuItem Action = AProjectGroupNew end @@ -187,29 +192,8 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm end end object ActionListMain: TActionList - Left = 60 - Top = 190 - object AProjectGroupSave: TAction - Category = 'ProjectGroupActions' - Caption = 'Save' - ImageIndex = 7 - OnExecute = AProjectGroupSaveExecute - OnUpdate = AProjectGroupSaveUpdate - end - object AProjectGroupSaveAs: TAction - Category = 'ProjectGroupActions' - Caption = 'Save As' - ImageIndex = 21 - OnExecute = AProjectGroupSaveAsExecute - OnUpdate = AProjectGroupSaveAsUpdate - end - object AProjectGroupAddExisting: TAction - Category = 'ProjectGroupActions' - Caption = 'Add from file' - ImageIndex = 8 - OnExecute = AProjectGroupAddExistingExecute - OnUpdate = AProjectGroupAddExistingUpdate - end + Left = 48 + Top = 152 object ATargetEarlier: TAction Category = 'TargetAction' Caption = 'Earlier' @@ -294,6 +278,32 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm Caption = 'Info' OnExecute = ATargetInfoExecute end + object AProjectGroupOpen: TAction + Category = 'ProjectGroupActions' + Caption = 'Open' + OnExecute = AProjectGroupOpenExecute + end + object AProjectGroupSave: TAction + Category = 'ProjectGroupActions' + Caption = 'Save' + ImageIndex = 7 + OnExecute = AProjectGroupSaveExecute + OnUpdate = AProjectGroupSaveUpdate + end + object AProjectGroupSaveAs: TAction + Category = 'ProjectGroupActions' + Caption = 'Save As' + ImageIndex = 21 + OnExecute = AProjectGroupSaveAsExecute + OnUpdate = AProjectGroupSaveAsUpdate + end + object AProjectGroupAddExisting: TAction + Category = 'ProjectGroupActions' + Caption = 'Add from file' + ImageIndex = 8 + OnExecute = AProjectGroupAddExistingExecute + OnUpdate = AProjectGroupAddExistingUpdate + end object AProjectGroupAddCurrent: TAction Category = 'ProjectGroupActions' Caption = 'Add current project' @@ -351,8 +361,8 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm end end object PopupMenuTree: TPopupMenu - Left = 260 - Top = 190 + Left = 208 + Top = 152 object PMICopyFilenameMenuItem: TMenuItem Action = ATargetCopyFilename end @@ -638,12 +648,12 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm end object OpenDialogTarget: TOpenDialog Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail] - Left = 60 - Top = 120 + Left = 48 + Top = 96 end object PopupMenuAdd: TPopupMenu - Left = 150 - Top = 66 + Left = 120 + Top = 53 object PMIAddExisting: TMenuItem Action = AProjectGroupAddExisting end @@ -656,7 +666,12 @@ object ProjectGroupEditorForm: TProjectGroupEditorForm end object SelectDirectoryDialog: TSelectDirectoryDialog Options = [ofAllowMultiSelect, ofFileMustExist, ofEnableSizing, ofViewDetail] - Left = 150 - Top = 250 + Left = 120 + Top = 200 + end + object PopupMenuOpen: TPopupMenu + OnPopup = PopupMenuOpenPopup + Left = 24 + Top = 64 end end diff --git a/components/projectgroups/projectgroupeditor.pas b/components/projectgroups/projectgroupeditor.pas index 6b84e4f086..3bda914b13 100644 --- a/components/projectgroups/projectgroupeditor.pas +++ b/components/projectgroups/projectgroupeditor.pas @@ -51,6 +51,7 @@ type { TProjectGroupEditorForm } TProjectGroupEditorForm = class(TForm) + AProjectGroupOpen: TAction; AProjectGroupAddAll: TAction; AProjectGroupNew: TAction; AProjectGroupAddCurrent: TAction; @@ -98,6 +99,7 @@ type PMICompile: TMenuItem; OpenDialogTarget: TOpenDialog; PopupMenuAdd: TPopupMenu; + PopupMenuOpen: TPopupMenu; PopupMenuMore: TPopupMenu; PopupMenuTree: TPopupMenu; SBPG: TStatusBar; @@ -109,6 +111,7 @@ type TBDelete: TToolButton; TBCompile: TToolButton; TBCompileClean: TToolButton; + TBOpen: TToolButton; ToolButton1: TToolButton; TBTargetUp: TToolButton; TBTargetLater: TToolButton; @@ -125,6 +128,7 @@ type procedure AProjectGroupDeleteExecute(Sender: TObject); procedure AProjectGroupDeleteUpdate(Sender: TObject); procedure AProjectGroupNewExecute(Sender: TObject); + procedure AProjectGroupOpenExecute(Sender: TObject); procedure AProjectGroupOptionsExecute(Sender: TObject); procedure AProjectGroupRedoExecute(Sender: TObject); procedure AProjectGroupRedoUpdate(Sender: TObject); @@ -164,6 +168,7 @@ type procedure FormCreate(Sender: TObject); procedure FormDestroy(Sender: TObject); procedure PopupMenuMorePopup(Sender: TObject); + procedure PopupMenuOpenPopup(Sender: TObject); procedure TVPGAdvancedCustomDrawItem(Sender: TCustomTreeView; Node: TTreeNode; {%H-}State: TCustomDrawState; Stage: TCustomDrawStage; var {%H-}PaintImages, {%H-}DefaultDraw: Boolean); @@ -256,6 +261,8 @@ type function SelectedNodeType: TPGCompileTarget; procedure UpdateIDEMenuCommandFromAction(Sender: TObject; Item: TIDEMenuCommand); procedure UpdateStatusBarTargetCount; + procedure UpdateRecentProjectGroupMenu; + procedure DoOpenRecentClick(Sender: TObject); protected procedure Localize; procedure ShowProjectGroup; @@ -418,6 +425,7 @@ procedure TProjectGroupEditorForm.Localize; end; begin + ConfigAction(AProjectGroupOpen,'pg_open_simple',lisProjectGroupOpenCaption,lisProjectGroupOpenHint,Nil); ConfigAction(AProjectGroupSave,'pg_save_simple',lisProjectGroupSaveCaption,lisProjectGroupSaveHint,Nil); ConfigAction(AProjectGroupSaveAs,'pg_save_as_simple',lisProjectGroupSaveAsCaption,lisProjectGroupSaveAsHint,Nil); ConfigAction(AProjectGroupNew,'pg_new',lisProjectGroupNewCaption,lisProjectGroupNewHint,Nil); @@ -659,6 +667,11 @@ begin PMIRunMenuItem.Visible:=taRun in AllowedActions; end; +procedure TProjectGroupEditorForm.PopupMenuOpenPopup(Sender: TObject); +begin + UpdateRecentProjectGroupMenu; +end; + procedure TProjectGroupEditorForm.TVPGAdvancedCustomDrawItem( Sender: TCustomTreeView; Node: TTreeNode; State: TCustomDrawState; Stage: TCustomDrawStage; var PaintImages, DefaultDraw: Boolean); @@ -766,6 +779,12 @@ begin TBTargetLater.Click; Key := 0; end; + Ord('O'): + if Shift=[ssCtrl] then + begin + TBOpen.Click; + Key := 0; + end; Ord('S'): begin if Shift=[ssCtrl] then @@ -1138,6 +1157,11 @@ begin IDEProjectGroupManager.DoNewClick(Sender); end; +procedure TProjectGroupEditorForm.AProjectGroupOpenExecute(Sender: TObject); +begin + IDEProjectGroupManager.DoOpenClick(Sender); +end; + procedure TProjectGroupEditorForm.AProjectGroupOptionsExecute(Sender: TObject); begin LazarusIDE.DoOpenIDEOptions(TProjGrpOptionsFrame); @@ -1582,6 +1606,17 @@ begin Result:=DisplayFileName(TNodeData(Node.Data)); end; +procedure TProjectGroupEditorForm.DoOpenRecentClick(Sender: TObject); +var + Item: TMenuItem; + aFilename: String; +begin + Item:=Sender as TMenuItem; + aFilename:=Item.Caption; + //debugln(['TProjectGroupEditorForm.DoOpenRecentClick ',aFilename]); + IDEProjectGroupManager.LoadProjectGroup(aFilename,[pgloBringToFront, pgloLoadRecursively]); +end; + function TProjectGroupEditorForm.DisplayFileName(NodeData: TNodeData): string; begin if NodeData=nil then exit(''); @@ -1709,6 +1744,30 @@ begin end; end; +procedure TProjectGroupEditorForm.UpdateRecentProjectGroupMenu; +var + i: Integer; + Item: TMenuItem; + aFilename: String; +begin + i:=0; + while i