TSelectDirectoryDialog ofFileMustExist now checks for directory from Vincent

git-svn-id: trunk@5100 -
This commit is contained in:
mattias 2004-01-24 16:25:35 +00:00
parent da43837f6c
commit aa765b0e3b
20 changed files with 138 additions and 11 deletions

View File

@ -586,6 +586,10 @@ msgstr "Noms de fitxers font de les unitats est
msgid "source is not unit" msgid "source is not unit"
msgstr "el codi font no és una unitat" msgstr "el codi font no és una unitat"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "trajectòria de codi font per les unitats compilades" msgstr "trajectòria de codi font per les unitats compilades"

View File

@ -586,6 +586,10 @@ msgstr ""
msgid "source is not unit" msgid "source is not unit"
msgstr "" msgstr ""
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "" msgstr ""

View File

@ -596,6 +596,10 @@ msgstr "Noms de fichiers sources pour les unit
msgid "source is not unit" msgid "source is not unit"
msgstr "la source n'est pas une unité" msgstr "la source n'est pas une unité"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "" msgstr ""

View File

@ -595,6 +595,10 @@ msgstr "Nome del file sorgente per la unit fpc standard"
msgid "source is not unit" msgid "source is not unit"
msgstr "il sorgente non è una unit" msgstr "il sorgente non è una unit"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "percorso sorgente per unit compilate" msgstr "percorso sorgente per unit compilate"

View File

@ -596,6 +596,10 @@ msgstr "Nazwa pliku
msgid "source is not unit" msgid "source is not unit"
msgstr "廝鏚堯 nie jest modu貫m" msgstr "廝鏚堯 nie jest modu貫m"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "軼ie磬a 廝鏚這wa dla kompilowanych modu堯w" msgstr "軼ie磬a 廝鏚這wa dla kompilowanych modu堯w"

View File

@ -222,6 +222,10 @@ msgstr ""
msgid "unit not found: %s" msgid "unit not found: %s"
msgstr "" msgstr ""
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctsidentifiernotfound #: codetoolsstrconsts:ctsidentifiernotfound
msgid "identifier not found: %s" msgid "identifier not found: %s"
msgstr "" msgstr ""

View File

@ -586,6 +586,10 @@ msgstr "
msgid "source is not unit" msgid "source is not unit"
msgstr "ÉÓÈÏÄÎÉË - ÎÅ ÍÏÄÕÌØ" msgstr "ÉÓÈÏÄÎÉË - ÎÅ ÍÏÄÕÌØ"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "ÐÕÔØ ÉÓÈÏÄÎÉËÏ× ÄÌÑ ÓÏÂÒÁÎÎÙÈ ÍÏÄÕÌÅÊ" msgstr "ÐÕÔØ ÉÓÈÏÄÎÉËÏ× ÄÌÑ ÓÏÂÒÁÎÎÙÈ ÍÏÄÕÌÅÊ"

View File

@ -586,6 +586,10 @@ msgstr "
msgid "source is not unit" msgid "source is not unit"
msgstr "èñõîäíèê - íå ìîäóëü" msgstr "èñõîäíèê - íå ìîäóëü"
#: codetoolsstrconsts:ctssourcenotfoundunit
msgid "source not found: unit %s"
msgstr ""
#: codetoolsstrconsts:ctssrcpathforcompiledunits #: codetoolsstrconsts:ctssrcpathforcompiledunits
msgid "src path for compiled units" msgid "src path for compiled units"
msgstr "ïóòü èñõîäíèêîâ äëÿ ñîáðàííûõ ìîäóëåé" msgstr "ïóòü èñõîäíèêîâ äëÿ ñîáðàííûõ ìîäóëåé"

View File

@ -204,6 +204,8 @@ type
{ TSelectDirectoryDialog } { TSelectDirectoryDialog }
TSelectDirectoryDialog = class(TOpenDialog) TSelectDirectoryDialog = class(TOpenDialog)
protected
function CheckFile(var AFilename: string): boolean; override;
public public
constructor Create(AOwner : TComponent); override; constructor Create(AOwner : TComponent); override;
end; end;
@ -403,6 +405,9 @@ end.
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.42 2004/01/24 16:25:35 mattias
TSelectDirectoryDialog ofFileMustExist now checks for directory from Vincent
Revision 1.41 2004/01/24 11:42:53 micha Revision 1.41 2004/01/24 11:42:53 micha
findinfiles uses tselectdirectorydialog; remove global SelectDirectory function (from vincent) findinfiles uses tselectdirectorydialog; remove global SelectDirectory function (from vincent)

View File

@ -261,10 +261,26 @@ begin
FTitle:= rsfdSelectDirectory; FTitle:= rsfdSelectDirectory;
end; end;
function TSelectDirectoryDialog.CheckFile(var AFilename: string): boolean;
begin
if (ofFileMustExist in Options)
and (not DirPathExists(AFilename)) then begin
Result:=false;
MessageDlg(rsfdDirectoryMustExist,
Format(rsfdDirectoryNotExist,[AFileName]),mtError,
[mbCancel],0);
exit;
end;
Result:=inherited CheckFile(AFilename);
end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.15 2004/01/24 16:25:35 mattias
TSelectDirectoryDialog ofFileMustExist now checks for directory from Vincent
Revision 1.14 2004/01/22 18:22:37 mattias Revision 1.14 2004/01/22 18:22:37 mattias
applied patch for dir dlgs from Vincent applied patch for dir dlgs from Vincent

View File

@ -154,6 +154,10 @@ msgstr "Error creant capturables gdb"
msgid "Custom" msgid "Custom"
msgstr "Personalitzar" msgstr "Personalitzar"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Menús duplicats" msgstr "Menús duplicats"
@ -350,6 +354,10 @@ msgstr ""
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "El sub-menú no és al menú" msgstr "El sub-menú no és al menú"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "El fitxer \"%s\" ja existeix. \015Sobre-escriure ?" msgstr "El fitxer \"%s\" ja existeix. \015Sobre-escriure ?"

View File

@ -160,6 +160,10 @@ msgstr ""
msgid "Custom" msgid "Custom"
msgstr "Spezial" msgstr "Spezial"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "" msgstr ""
@ -356,6 +360,10 @@ msgstr ""
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "" msgstr ""
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "" msgstr ""

View File

@ -164,6 +164,10 @@ msgstr "Creando un error capturable por gdb"
msgid "Custom" msgid "Custom"
msgstr "Personalizado" msgstr "Personalizado"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Duplicar menús" msgstr "Duplicar menús"
@ -360,6 +364,10 @@ msgstr "Escoja Directorio"
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "Sub-menu no está en el menú" msgstr "Sub-menu no está en el menú"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "Ya existe el archivo \"%s\" \015¿Sobreescribir?" msgstr "Ya existe el archivo \"%s\" \015¿Sobreescribir?"

View File

@ -164,6 +164,10 @@ msgstr ""
msgid "Custom" msgid "Custom"
msgstr "Personalisé" msgstr "Personalisé"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Menus doublons" msgstr "Menus doublons"
@ -360,6 +364,10 @@ msgstr ""
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "le Sous menu n'es pas dans le menu" msgstr "le Sous menu n'es pas dans le menu"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "Le ficher \"%s\" existe déjà. \015Ecraser ?" msgstr "Le ficher \"%s\" existe déjà. \015Ecraser ?"

View File

@ -162,6 +162,10 @@ msgstr "Creazione errore intercettabile gdb:"
msgid "Custom" msgid "Custom"
msgstr "Personalizza" msgstr "Personalizza"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Menu dupicati" msgstr "Menu dupicati"
@ -358,6 +362,10 @@ msgstr "Selezionare una directory"
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "Il sottomenu non è nel menu" msgstr "Il sottomenu non è nel menu"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "Il file \"%s\" esiste già.\015Sovrascrivere?" msgstr "Il file \"%s\" esiste già.\015Sovrascrivere?"

View File

@ -164,6 +164,10 @@ msgstr "B
msgid "Custom" msgid "Custom"
msgstr "Inny" msgstr "Inny"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Zdublowane menu" msgstr "Zdublowane menu"
@ -360,6 +364,10 @@ msgstr ""
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "Podmenu nie jest w menu" msgstr "Podmenu nie jest w menu"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "Plik \"%s\" ju¿ istnieje.\015Chcesz go nadpisaæ ?" msgstr "Plik \"%s\" ju¿ istnieje.\015Chcesz go nadpisaæ ?"

View File

@ -90,10 +90,18 @@ msgstr ""
msgid "File must exist" msgid "File must exist"
msgstr "" msgstr ""
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:rsfdfilenotexist #: lclstrconsts:rsfdfilenotexist
msgid "The file \"%s\" does not exist." msgid "The file \"%s\" does not exist."
msgstr "" msgstr ""
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilereadonlytitle #: lclstrconsts:rsfdfilereadonlytitle
msgid "File is not writable" msgid "File is not writable"
msgstr "" msgstr ""

View File

@ -154,6 +154,10 @@ msgstr "
msgid "Custom" msgid "Custom"
msgstr "ðÏÌØÚÏ×ÁÔÅÌØÓËÉÊ" msgstr "ðÏÌØÚÏ×ÁÔÅÌØÓËÉÊ"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "ðÏ×ÔÏÒÑÀÝÉÅÓÑ ÍÅÎÀ" msgstr "ðÏ×ÔÏÒÑÀÝÉÅÓÑ ÍÅÎÀ"
@ -350,6 +354,10 @@ msgstr "
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "ðÏÄÍÅÎÀ ÎÅ × ÍÅÎÀ" msgstr "ðÏÄÍÅÎÀ ÎÅ × ÍÅÎÀ"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "æÁÊÌ \"%s\" ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ.\015 ðÅÒÅÐÉÓÁÔØ ?" msgstr "æÁÊÌ \"%s\" ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ.\015 ðÅÒÅÐÉÓÁÔØ ?"

View File

@ -154,6 +154,10 @@ msgstr "
msgid "Custom" msgid "Custom"
msgstr "Ïîëüçîâàòåëüñêèé" msgstr "Ïîëüçîâàòåëüñêèé"
#: lclstrconsts:rsfddirectorymustexist
msgid "Directory must exist"
msgstr ""
#: lclstrconsts:sduplicatemenus #: lclstrconsts:sduplicatemenus
msgid "Duplicate menus" msgid "Duplicate menus"
msgstr "Ïîâòîðÿþùèåñÿ ìåíþ" msgstr "Ïîâòîðÿþùèåñÿ ìåíþ"
@ -350,6 +354,10 @@ msgstr "
msgid "Sub-menu is not in menu" msgid "Sub-menu is not in menu"
msgstr "Ïîäìåíþ íå â ìåíþ" msgstr "Ïîäìåíþ íå â ìåíþ"
#: lclstrconsts:rsfddirectorynotexist
msgid "The directory \"%s\" does not exist."
msgstr ""
#: lclstrconsts:rsfdfilealreadyexists #: lclstrconsts:rsfdfilealreadyexists
msgid "The file \"%s\" already exists.\015Overwrite ?" msgid "The file \"%s\" already exists.\015Overwrite ?"
msgstr "Ôàéë \"%s\" óæå ñóùåñòâóåò.\015 Ïåðåïèñàòü ?" msgstr "Ôàéë \"%s\" óæå ñóùåñòâóåò.\015 Ïåðåïèñàòü ?"

View File

@ -55,17 +55,19 @@ ResourceString
rsMtCustom = 'Custom'; rsMtCustom = 'Custom';
// file dialog // file dialog
rsfdOpenFile = 'Open existing file'; rsfdOpenFile = 'Open existing file';
rsfdOverwriteFile = 'Overwrite file ?'; rsfdOverwriteFile = 'Overwrite file ?';
rsfdFileAlreadyExists = 'The file "%s" already exists.'#13'Overwrite ?'; rsfdFileAlreadyExists = 'The file "%s" already exists.'#13'Overwrite ?';
rsfdPathMustExist = 'Path must exist'; rsfdPathMustExist = 'Path must exist';
rsfdPathNoExist = 'The path "%s" does not exist.'; rsfdPathNoExist = 'The path "%s" does not exist.';
rsfdFileMustExist = 'File must exist'; rsfdFileMustExist = 'File must exist';
rsfdFileNotExist = 'The file "%s" does not exist.'; rsfdDirectoryMustExist = 'Directory must exist';
rsfdFileReadOnlyTitle = 'File is not writable'; rsfdFileNotExist = 'The file "%s" does not exist.';
rsfdFileReadOnly = 'The file "%s" is not writable.'; rsfdDirectoryNotExist = 'The directory "%s" does not exist.';
rsfdFileSaveAs = 'Save file as'; rsfdFileReadOnlyTitle = 'File is not writable';
rsfdSelectDirectory = 'Select Directory'; rsfdFileReadOnly = 'The file "%s" is not writable.';
rsfdFileSaveAs = 'Save file as';
rsfdSelectDirectory = 'Select Directory';
// Select color dialog // Select color dialog
rsSelectcolorTitle = 'Select color'; rsSelectcolorTitle = 'Select color';