1
0
Эх сурвалжийг харах

Bug fix: The dialog box to enter new local directory name included useless permissions box.

Source commit: 94391ba34a33073c16b5f7572c4b32fbfcbab5cd
Martin Prikryl 9 жил өмнө
parent
commit
32be252d2e

+ 7 - 2
source/forms/CreateDirectory.cpp

@@ -23,7 +23,7 @@ bool __fastcall DoCreateDirectoryDialog(UnicodeString & Directory,
   TRemoteProperties * Properties, int AllowedChanges, bool & SaveSettings)
 {
   bool Result;
-  TCreateDirectoryDialog * Dialog = new TCreateDirectoryDialog(Application, AllowedChanges);
+  TCreateDirectoryDialog * Dialog = new TCreateDirectoryDialog(Application, AllowedChanges, (Properties != NULL));
   try
   {
     Result = Dialog->Execute(Directory, Properties, SaveSettings);
@@ -35,13 +35,18 @@ bool __fastcall DoCreateDirectoryDialog(UnicodeString & Directory,
   return Result;
 }
 //---------------------------------------------------------------------
-__fastcall TCreateDirectoryDialog::TCreateDirectoryDialog(TComponent * AOwner, int AllowedChanges):
+__fastcall TCreateDirectoryDialog::TCreateDirectoryDialog(TComponent * AOwner, int AllowedChanges, bool Remote):
   TForm(AOwner)
 {
   UseSystemSettings(this);
 
   RightsFrame->AllowAddXToDirectories = false;
   FAllowedChanges = AllowedChanges;
+  if (!Remote)
+  {
+    AttributesGroup->Visible = false;
+    ClientHeight = ClientHeight - AttributesGroup->Height;
+  }
 }
 //---------------------------------------------------------------------
 __fastcall TCreateDirectoryDialog::~TCreateDirectoryDialog()

+ 1 - 1
source/forms/CreateDirectory.h

@@ -34,7 +34,7 @@ __published:
   void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
 
 public:
-  __fastcall TCreateDirectoryDialog(TComponent* AOwner, int AllowedChanges);
+  __fastcall TCreateDirectoryDialog(TComponent* AOwner, int AllowedChanges, bool Remote);
   virtual __fastcall ~TCreateDirectoryDialog();
 
   bool __fastcall Execute(UnicodeString & Directory, TRemoteProperties * Properties,