IDEIntf/ImageListEditor: Hide unnecessary menu items when only a single resolution is available. Update German translation.

This commit is contained in:
wp_xyz 2024-07-03 12:30:58 +02:00
parent 80cf03723e
commit 5ab8254f9c
23 changed files with 204 additions and 20 deletions

View File

@ -149,8 +149,9 @@ type
protected
procedure DoDestroy; override;
procedure InternalAddImageToList(const Picture: TPicture; AddType: TAddType);
procedure UpdateCmds;
procedure UpdatePreviewImage;
procedure UpdateCmds; virtual;
procedure UpdateMenus; virtual;
procedure UpdatePreviewImage; virtual;
public
procedure LoadFromImageList(AImageList: TImageList);
procedure SaveToImageList;
@ -322,8 +323,8 @@ begin
tbRemove.ImageIndex := IDEImages.GetImageIndex('laz_delete', 16);
acDelete.ImageIndex := IDEImages.GetImageIndex('item_delete', 16);
acClear.ImageIndex := IDEImages.GetImageIndex('menu_clean', 16);
acMoveUp.ImageIndex := IDEImages.GetImageIndex('item_up', 16);
acMoveDown.ImageIndex := IDEImages.GetImageIndex('item_down', 16);
acMoveUp.ImageIndex := IDEImages.GetImageIndex('arrow_up', 16); //'item_up', 16);
acMoveDown.ImageIndex := IDEImages.GetImageIndex('arrow_down', 16); //'item_down', 16);
tbSave.ImageIndex := IDEImages.GetImageIndex('laz_save', 16);
acSave.ImageIndex := IDEImages.GetImageIndex('menu_saveas', 16);
acSaveAll.ImageIndex := IDEImages.GetImageIndex('menu_save_all', 16);
@ -353,6 +354,8 @@ begin
OpenDialog.Title := sccsILEdtOpenDialog;
SaveDialog.Title := sccsILEdtSaveDialog;
IDEDialogLayoutList.ApplyLayout(Self);
UpdateMenus;
end;
procedure TImageListEditorDlg.FormResize(Sender: TObject);
@ -530,7 +533,7 @@ begin
ImageList.DeleteResolution(RA[TD.SelectionRes]);
ImageListBox.Repaint;
UpdatePreviewImage;
// UpdateImagesGroupBoxWidth;
UpdateMenus;
end;
end;
@ -583,6 +586,7 @@ begin
RefreshItemHeight;
ImageListBox.Repaint;
// UpdateImagesGroupBoxWidth;
UpdateMenus;
end;
cInputQueryEditSizePercents := perc;
@ -853,6 +857,25 @@ begin
tbSave.Enabled := acSave.Enabled or acSaveAll.Enabled;
end;
procedure TImageListEditorDlg.UpdateMenus;
var
multipleRes: Boolean;
begin
multipleRes := ImageList.ResolutionCount > 1;
acAddMultiple.Visible := multipleRes;
acReplaceAll.Visible := multipleRes;
if multipleRes then
begin
acAddSingle.Caption := sccsILEdtAddSingleResolution;
acReplaceSingle.Caption := sccsILEdtReplaceSingleResolution;
end else
begin
acAddSingle.Caption := sccsILEdtAddImg;
acReplaceSingle.Caption := sccsILEdtReplaceImg;
end;
end;
procedure TImageListEditorDlg.UpdatePreviewImage;
procedure DisablePreview;
begin

View File

@ -1452,6 +1452,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Afegeix..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1583,6 +1587,10 @@ msgstr ""
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1414,6 +1414,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Přidat ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1555,6 +1559,10 @@ msgstr "&Nahradit"
msgid "Replace all resolutions of an image ..."
msgstr "Nahradit všechny rozlišení ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: 2024-07-02 13:08+0200\n"
"PO-Revision-Date: 2024-07-03 12:28+0200\n"
"Last-Translator: Swen Heinig <swen@heinig.email>\n"
"Language-Team: Deutsch <lazarus@miraclec.com>\n"
"Language: de\n"
@ -322,7 +322,7 @@ msgstr "Datenmenge erzeugen"
#: objinspstrconsts.lrsdatasetactive
msgid "Dataset is already active, close it first."
msgstr "Datenmenge ist bereits aktive. Zuerst schließen"
msgstr "Datenmenge ist bereits aktive. Zuerst schließen."
#: objinspstrconsts.lrsloadfromfile
msgid "Load data from file"
@ -330,7 +330,7 @@ msgstr "Daten aus Datei laden"
#: objinspstrconsts.lrsnodatasetsavailableforcopy
msgid "No dataset available to copy data from."
msgstr "Keine Datenmenge zum Kopieren verfügbar"
msgstr "Keine Datenmenge zum Kopieren verfügbar."
#: objinspstrconsts.lrsprovidedatafilename
msgid "Select a data file to save data to"
@ -1408,22 +1408,22 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Hinzufügen"
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr "Bild hinzufügen ..."
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add image from multiple resolutions ..."
msgid "Add image with multiple resolutions ..."
msgstr "Bild aus mehreren Auflösungen hinzufügen …"
msgstr "Bild in mehreren Auflösungen hinzufügen …"
#: objinspstrconsts.sccsiledtaddnewresolution
msgid "Register new resolution (image size) ..."
msgstr "Neue Auflösung (Bild-Größe) registrieren ..."
#: objinspstrconsts.sccsiledtaddsingleresolution
#, fuzzy
#| msgid "Add image(s) from single resolution..."
msgctxt "objinspstrconsts.sccsiledtaddsingleresolution"
msgid "Add image(s) with single resolution..."
msgstr "Bild(er) aus einzelner Auflösung hinzufügen ..."
msgstr "Bild(er) in einzelner Auflösung hinzufügen ..."
#: objinspstrconsts.sccsiledtaddsliced
msgid "Add sliced ..."
@ -1532,14 +1532,14 @@ msgid "Replace"
msgstr "Ersetzen"
#: objinspstrconsts.sccsiledtreplaceallresolutions
#, fuzzy
#| msgid "Replace image by all resolutions ..."
msgid "Replace all resolutions of an image ..."
msgstr "Bild durch alle Auflösungen ersetzen …"
msgstr "Alle Auflösungen eines Bildes ersetzen …"
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr "Bild ersetzen ..."
#: objinspstrconsts.sccsiledtreplacesingleresolution
#, fuzzy
#| msgid "Replace image by appropriate resolution ..."
msgid "Replace single resolution of an image ..."
msgstr "Bild durch passende Auflösung ersetzen ..."
@ -1905,4 +1905,3 @@ msgstr "Tab nach links bewegen"
#: objinspstrconsts.tccesmovetabright
msgid "Move tab right"
msgstr "Tab nach rechts bewegen"

View File

@ -1415,6 +1415,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Añadir ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1543,6 +1547,10 @@ msgstr "Reemplazar"
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1413,6 +1413,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Lisää ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1554,6 +1558,10 @@ msgstr "&Korvaa ..."
msgid "Replace all resolutions of an image ..."
msgstr "Korvaa kaikki tarkkuudet ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1410,6 +1410,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Ajouter..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1553,6 +1557,10 @@ msgstr "&Remplacer..."
msgid "Replace all resolutions of an image ..."
msgstr "Remplacer toutes les résolutions..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1458,6 +1458,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "הוסף ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1592,6 +1596,10 @@ msgstr "החלף"
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1413,6 +1413,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Hozzá&adás ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1556,6 +1560,10 @@ msgstr "Csere ..."
msgid "Replace all resolutions of an image ..."
msgstr "Az összes felbontás cseréléje ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1456,6 +1456,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Tambah..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1587,6 +1591,10 @@ msgstr ""
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1416,6 +1416,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Aggiungi..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1544,6 +1548,10 @@ msgstr "Sostituisci"
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1423,6 +1423,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "追加(&A) ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1551,6 +1555,10 @@ msgstr "置換"
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1415,6 +1415,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Pridėti…"
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1544,6 +1548,10 @@ msgstr "Pa&keisti…"
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1448,6 +1448,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Toevoegen..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1579,6 +1583,10 @@ msgstr ""
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1408,6 +1408,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Dodaj ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1537,6 +1541,10 @@ msgstr "Z&amień..."
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1398,6 +1398,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr ""
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr ""
@ -1521,6 +1525,10 @@ msgstr ""
msgid "Replace all resolutions of an image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1409,6 +1409,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Adicionar ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1552,6 +1556,10 @@ msgstr "S&ubstituir"
msgid "Replace all resolutions of an image ..."
msgstr "Substituir todas as resoluções ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1407,6 +1407,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Добавить"
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
msgid "Add image with multiple resolutions ..."
msgstr "Добавить изображение с несколькими разрешениями ..."
@ -1530,6 +1534,10 @@ msgstr "Заменить"
msgid "Replace all resolutions of an image ..."
msgstr "Заменить все разрешения изображения ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr "Заменить единственное разрешение изображения ..."

View File

@ -1423,6 +1423,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "Pridať..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1562,6 +1566,10 @@ msgstr "Nahradiť ..."
msgid "Replace all resolutions of an image ..."
msgstr "Nahradiť všetky rozlíšenia ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1409,6 +1409,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Ekle ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1552,6 +1556,10 @@ msgstr "&Değiştir ..."
msgid "Replace all resolutions of an image ..."
msgstr "Tüm çözünürlükleri değiştir ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1412,6 +1412,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "&Додати ..."
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1555,6 +1559,10 @@ msgstr "За&мінити ..."
msgid "Replace all resolutions of an image ..."
msgstr "Замінити всі роздільності ..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -1410,6 +1410,10 @@ msgctxt "objinspstrconsts.sccsiledtadd"
msgid "Add"
msgstr "添加...(&A)"
#: objinspstrconsts.sccsiledtaddimg
msgid "Add image ..."
msgstr ""
#: objinspstrconsts.sccsiledtaddmoreresolutions
#, fuzzy
#| msgid "Add more resolutions ..."
@ -1549,6 +1553,10 @@ msgstr "替换(&R) ..."
msgid "Replace all resolutions of an image ..."
msgstr "替换所有分辨率(resolution)..."
#: objinspstrconsts.sccsiledtreplaceimg
msgid "Replace image ..."
msgstr ""
#: objinspstrconsts.sccsiledtreplacesingleresolution
msgid "Replace single resolution of an image ..."
msgstr ""

View File

@ -142,10 +142,12 @@ resourcestring
sccsILEdtGrpLCaption = 'Images';
sccsILEdtGrpRCaption = 'Selected Image';
sccsILEdtAdd = 'Add';
sccsILEdtAddImg = 'Add image ...';
sccsILEdtAddSingleResolution = 'Add image(s) with single resolution...';
sccsILEdtAddMoreResolutions = 'Add image with multiple resolutions ...';
sccsILEdtAddSliced = 'Add sliced ...';
sccsILEdtReplace = 'Replace';
sccsILEdtReplaceImg = 'Replace image ...';
sccsILEdtReplaceSingleResolution = 'Replace single resolution of an image ...';
sccsILEdtReplaceAllResolutions = 'Replace all resolutions of an image ...';
sccsILEdtPasteFromClipboard = 'Paste image from clipboard';