Commits

Qasim Khalil  committed 6cbb382

Added option to use the entry's URL field instead of having to specify it manually. (You can now see at a glance where the file is.)

  • Participants
  • Parent commits 7943845
  • Branches Issue16_SupportRelativePathsAndPlaceholders

Comments (0)

Files changed (4)

File src/KeepassTrueCryptMount/EntryStrings.cs

         public const string MountWithoutDialog = "truecrypt.mount.without.dialog";
 
         public const string AskForPassword = "truecrypt.option.askpassword";
+
+        public const string UseUrlField = "truecrypt.option.useurlfield";
     }
 }

File src/KeepassTrueCryptMount/PwEntryExtension.cs

 
             // container volume
             {
-                var volumeString = entry.Strings.GetSafe(EntryStrings.Volume).ReadString();
+                var useUrlFieldString = entry.Strings.GetSafe(EntryStrings.UseUrlField).ReadString();
+                bool useUrlField;
+                bool.TryParse(useUrlFieldString, out useUrlField);
+                String volumeString;
+                if (useUrlField)
+                {
+                    volumeString = entry.Strings.GetSafe(PwDefs.UrlField).ReadString();
+                }
+                else
+                {
+                    volumeString = entry.Strings.GetSafe(EntryStrings.Volume).ReadString();
+                }
                 arguments.Append(" /v ");
                 if (volumeString.Contains(" ") && !volumeString.StartsWith("\"") && !volumeString.EndsWith("\""))
                 {

File src/KeepassTrueCryptMount/TrueCryptMountForm.Designer.cs

             this.keyFilesTextBox = new System.Windows.Forms.TextBox();
             this.button2 = new System.Windows.Forms.Button();
             this.label2 = new System.Windows.Forms.Label();
+            this.useUrlFieldCheckBox = new System.Windows.Forms.CheckBox();
+            this.volumeFileGroupBox = new System.Windows.Forms.GroupBox();
             this.mountOptionsGroupBox.SuspendLayout();
             this.mountOptionsLayoutPanel.SuspendLayout();
+            this.volumeFileGroupBox.SuspendLayout();
             this.SuspendLayout();
             // 
             // bannerPanel
             // 
             this.bannerPanel.Dock = System.Windows.Forms.DockStyle.Top;
             this.bannerPanel.Location = new System.Drawing.Point(0, 0);
+            this.bannerPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.bannerPanel.Name = "bannerPanel";
-            this.bannerPanel.Size = new System.Drawing.Size(480, 70);
+            this.bannerPanel.Size = new System.Drawing.Size(640, 86);
             this.bannerPanel.TabIndex = 0;
             // 
             // m_lblSeparator
             // 
             this.m_lblSeparator.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-            this.m_lblSeparator.Location = new System.Drawing.Point(3, 322);
+            this.m_lblSeparator.Location = new System.Drawing.Point(4, 443);
+            this.m_lblSeparator.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.m_lblSeparator.Name = "m_lblSeparator";
-            this.m_lblSeparator.Size = new System.Drawing.Size(475, 2);
+            this.m_lblSeparator.Size = new System.Drawing.Size(633, 2);
             this.m_lblSeparator.TabIndex = 7;
             // 
             // btnCancel
             // 
             this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
-            this.btnCancel.Location = new System.Drawing.Point(396, 327);
+            this.btnCancel.Location = new System.Drawing.Point(528, 449);
+            this.btnCancel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.btnCancel.Name = "btnCancel";
-            this.btnCancel.Size = new System.Drawing.Size(75, 23);
-            this.btnCancel.TabIndex = 6;
+            this.btnCancel.Size = new System.Drawing.Size(100, 28);
+            this.btnCancel.TabIndex = 17;
             this.btnCancel.Text = "&Cancel";
             this.btnCancel.UseVisualStyleBackColor = true;
             // 
             // btnOK
             // 
             this.btnOK.DialogResult = System.Windows.Forms.DialogResult.OK;
-            this.btnOK.Location = new System.Drawing.Point(315, 327);
+            this.btnOK.Location = new System.Drawing.Point(420, 449);
+            this.btnOK.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.btnOK.Name = "btnOK";
-            this.btnOK.Size = new System.Drawing.Size(75, 23);
-            this.btnOK.TabIndex = 5;
+            this.btnOK.Size = new System.Drawing.Size(100, 28);
+            this.btnOK.TabIndex = 16;
             this.btnOK.Text = "&Mount";
             this.btnOK.UseVisualStyleBackColor = true;
             // 
             // mountOptionsGroupBox
             // 
             this.mountOptionsGroupBox.Controls.Add(this.mountOptionsLayoutPanel);
-            this.mountOptionsGroupBox.Location = new System.Drawing.Point(3, 233);
+            this.mountOptionsGroupBox.Location = new System.Drawing.Point(4, 334);
+            this.mountOptionsGroupBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.mountOptionsGroupBox.Name = "mountOptionsGroupBox";
-            this.mountOptionsGroupBox.Size = new System.Drawing.Size(468, 79);
+            this.mountOptionsGroupBox.Padding = new System.Windows.Forms.Padding(4, 4, 4, 4);
+            this.mountOptionsGroupBox.Size = new System.Drawing.Size(624, 97);
             this.mountOptionsGroupBox.TabIndex = 8;
             this.mountOptionsGroupBox.TabStop = false;
-            this.mountOptionsGroupBox.Text = "Mount options";
+            this.mountOptionsGroupBox.Text = "Mount Options";
             // 
             // mountOptionsLayoutPanel
             // 
             this.mountOptionsLayoutPanel.Controls.Add(this.explorerCheckBox);
             this.mountOptionsLayoutPanel.Controls.Add(this.askPasswordCheckBox);
             this.mountOptionsLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.mountOptionsLayoutPanel.Location = new System.Drawing.Point(3, 16);
+            this.mountOptionsLayoutPanel.Location = new System.Drawing.Point(4, 19);
+            this.mountOptionsLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.mountOptionsLayoutPanel.Name = "mountOptionsLayoutPanel";
-            this.mountOptionsLayoutPanel.Size = new System.Drawing.Size(462, 60);
+            this.mountOptionsLayoutPanel.Size = new System.Drawing.Size(616, 74);
             this.mountOptionsLayoutPanel.TabIndex = 0;
             // 
             // readonlyCheckBox
             // 
-            this.readonlyCheckBox.Location = new System.Drawing.Point(3, 3);
+            this.readonlyCheckBox.Location = new System.Drawing.Point(4, 4);
+            this.readonlyCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.readonlyCheckBox.Name = "readonlyCheckBox";
-            this.readonlyCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.readonlyCheckBox.TabIndex = 0;
-            this.readonlyCheckBox.Text = "Readonly";
-            this.tipInfo.SetToolTip(this.readonlyCheckBox, "Mount volume as read-only. ");
+            this.readonlyCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.readonlyCheckBox.TabIndex = 7;
+            this.readonlyCheckBox.Text = "Read Only";
+            this.tipInfo.SetToolTip(this.readonlyCheckBox, "Mount volume as read-only.");
             this.readonlyCheckBox.UseVisualStyleBackColor = true;
             this.readonlyCheckBox.CheckedChanged += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // removableCheckBox
             // 
-            this.removableCheckBox.Location = new System.Drawing.Point(109, 3);
+            this.removableCheckBox.Location = new System.Drawing.Point(145, 4);
+            this.removableCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.removableCheckBox.Name = "removableCheckBox";
-            this.removableCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.removableCheckBox.TabIndex = 1;
+            this.removableCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.removableCheckBox.TabIndex = 8;
             this.removableCheckBox.Text = "Removable";
             this.tipInfo.SetToolTip(this.removableCheckBox, "Mount volume as removable medium.");
             this.removableCheckBox.UseVisualStyleBackColor = true;
             // 
             // backgroundCheckBox
             // 
-            this.backgroundCheckBox.Location = new System.Drawing.Point(215, 3);
+            this.backgroundCheckBox.Location = new System.Drawing.Point(286, 4);
+            this.backgroundCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.backgroundCheckBox.Name = "backgroundCheckBox";
-            this.backgroundCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.backgroundCheckBox.TabIndex = 4;
+            this.backgroundCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.backgroundCheckBox.TabIndex = 9;
             this.backgroundCheckBox.Text = "Background";
             this.tipInfo.SetToolTip(this.backgroundCheckBox, "Automatically perform requested actions and exit (main TrueCrypt window will not " +
         "be displayed).");
             // 
             // silentCheckBox
             // 
-            this.silentCheckBox.Location = new System.Drawing.Point(321, 3);
+            this.silentCheckBox.Location = new System.Drawing.Point(427, 4);
+            this.silentCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.silentCheckBox.Name = "silentCheckBox";
-            this.silentCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.silentCheckBox.TabIndex = 2;
+            this.silentCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.silentCheckBox.TabIndex = 10;
             this.silentCheckBox.Text = "Silent";
             this.tipInfo.SetToolTip(this.silentCheckBox, "Suppresses interaction with the user (prompts, error messages, warnings, etc.).");
             this.silentCheckBox.UseVisualStyleBackColor = true;
             // 
             // beepCheckBox
             // 
-            this.beepCheckBox.Location = new System.Drawing.Point(3, 33);
+            this.beepCheckBox.Location = new System.Drawing.Point(4, 42);
+            this.beepCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.beepCheckBox.Name = "beepCheckBox";
-            this.beepCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.beepCheckBox.TabIndex = 3;
+            this.beepCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.beepCheckBox.TabIndex = 11;
             this.beepCheckBox.Text = "Beep";
-            this.tipInfo.SetToolTip(this.beepCheckBox, "Beep after a volume has been successfully mounted or dismounted. ");
+            this.tipInfo.SetToolTip(this.beepCheckBox, "Beep after a volume has been successfully mounted or dismounted.");
             this.beepCheckBox.UseVisualStyleBackColor = true;
             this.beepCheckBox.CheckedChanged += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // explorerCheckBox
             // 
-            this.explorerCheckBox.Location = new System.Drawing.Point(109, 33);
+            this.explorerCheckBox.Location = new System.Drawing.Point(145, 42);
+            this.explorerCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.explorerCheckBox.Name = "explorerCheckBox";
-            this.explorerCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.explorerCheckBox.TabIndex = 5;
+            this.explorerCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.explorerCheckBox.TabIndex = 12;
             this.explorerCheckBox.Text = "Open Explorer";
             this.tipInfo.SetToolTip(this.explorerCheckBox, "Open an Explorer window after a volume has been mounted.");
             this.explorerCheckBox.UseVisualStyleBackColor = true;
             // 
             // askPasswordCheckBox
             // 
-            this.askPasswordCheckBox.Location = new System.Drawing.Point(215, 33);
+            this.askPasswordCheckBox.Location = new System.Drawing.Point(286, 42);
+            this.askPasswordCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.askPasswordCheckBox.Name = "askPasswordCheckBox";
-            this.askPasswordCheckBox.Size = new System.Drawing.Size(100, 24);
-            this.askPasswordCheckBox.TabIndex = 6;
-            this.askPasswordCheckBox.Text = "Ask password";
+            this.askPasswordCheckBox.Size = new System.Drawing.Size(133, 30);
+            this.askPasswordCheckBox.TabIndex = 13;
+            this.askPasswordCheckBox.Text = "Ask Password";
             this.tipInfo.SetToolTip(this.askPasswordCheckBox, "By unchecking this option the volume gets mounted with help of the AutoType funct" +
         "ion \r\nwith enabled \"Two-Channel Auto-Type Obfuscation\".");
             this.askPasswordCheckBox.UseVisualStyleBackColor = true;
             // 
             // volumeTextBox
             // 
-            this.volumeTextBox.Location = new System.Drawing.Point(6, 105);
+            this.volumeTextBox.Location = new System.Drawing.Point(11, 64);
+            this.volumeTextBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.volumeTextBox.Name = "volumeTextBox";
-            this.volumeTextBox.Size = new System.Drawing.Size(421, 20);
-            this.volumeTextBox.TabIndex = 9;
+            this.volumeTextBox.Size = new System.Drawing.Size(553, 22);
+            this.volumeTextBox.TabIndex = 1;
             this.volumeTextBox.TextChanged += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // label1
             // 
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(3, 89);
+            this.label1.Location = new System.Drawing.Point(7, 45);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(161, 13);
+            this.label1.Size = new System.Drawing.Size(217, 17);
             this.label1.TabIndex = 10;
             this.label1.Text = "Volume File | Partition | Harddrive";
             // 
             // label3
             // 
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(6, 181);
+            this.label3.Location = new System.Drawing.Point(8, 270);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(58, 13);
+            this.label3.Size = new System.Drawing.Size(82, 17);
             this.label3.TabIndex = 12;
-            this.label3.Text = "Drive letter";
+            this.label3.Text = "Drive Letter";
             // 
             // driveComboBox
             // 
             this.driveComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.driveComboBox.FormattingEnabled = true;
-            this.driveComboBox.Location = new System.Drawing.Point(9, 197);
+            this.driveComboBox.Location = new System.Drawing.Point(12, 289);
+            this.driveComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.driveComboBox.Name = "driveComboBox";
-            this.driveComboBox.Size = new System.Drawing.Size(121, 21);
-            this.driveComboBox.TabIndex = 13;
+            this.driveComboBox.Size = new System.Drawing.Size(160, 24);
+            this.driveComboBox.TabIndex = 5;
             this.driveComboBox.SelectionChangeCommitted += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // tipInfo
             // 
             this.btnReloadDrives.BackgroundImage = global::KeePassTrueCryptMount.Resources.B16x16_Button_Reload;
             this.btnReloadDrives.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center;
-            this.btnReloadDrives.Location = new System.Drawing.Point(136, 195);
+            this.btnReloadDrives.Location = new System.Drawing.Point(181, 287);
+            this.btnReloadDrives.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.btnReloadDrives.Name = "btnReloadDrives";
-            this.btnReloadDrives.Size = new System.Drawing.Size(35, 24);
-            this.btnReloadDrives.TabIndex = 17;
-            this.tipInfo.SetToolTip(this.btnReloadDrives, "Refresh free drive letters selection");
+            this.btnReloadDrives.Size = new System.Drawing.Size(47, 30);
+            this.btnReloadDrives.TabIndex = 6;
+            this.tipInfo.SetToolTip(this.btnReloadDrives, "Refresh free drive letters selection.");
             this.btnReloadDrives.UseVisualStyleBackColor = true;
             this.btnReloadDrives.Click += new System.EventHandler(this.OnReloadDrivesButtonClicked);
             // 
             // hideDialogCheckBox
             // 
             this.hideDialogCheckBox.AutoSize = true;
-            this.hideDialogCheckBox.Location = new System.Drawing.Point(97, 331);
+            this.hideDialogCheckBox.Location = new System.Drawing.Point(129, 454);
+            this.hideDialogCheckBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.hideDialogCheckBox.Name = "hideDialogCheckBox";
-            this.hideDialogCheckBox.Size = new System.Drawing.Size(124, 17);
-            this.hideDialogCheckBox.TabIndex = 16;
+            this.hideDialogCheckBox.Size = new System.Drawing.Size(161, 21);
+            this.hideDialogCheckBox.TabIndex = 15;
             this.hideDialogCheckBox.Text = "Hide dialog next time";
-            this.tipInfo.SetToolTip(this.hideDialogCheckBox, "By check this option the next mount operation starts without\r\nshowing this dialog" +
-        ". To show it again, hold the SHIFT key by\r\nclick the \"Mount volume\" menu item.");
+            this.tipInfo.SetToolTip(this.hideDialogCheckBox, "By checking this option the next mount operation starts without\r\nshowing this dia" +
+        "log. To show it again, hold the SHIFT key and\r\nclick the \"Mount volume...\" menu " +
+        "item.");
             this.hideDialogCheckBox.UseVisualStyleBackColor = true;
             this.hideDialogCheckBox.CheckedChanged += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // 
             // btnApply
             // 
-            this.btnApply.Location = new System.Drawing.Point(9, 327);
+            this.btnApply.Location = new System.Drawing.Point(12, 449);
+            this.btnApply.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.btnApply.Name = "btnApply";
-            this.btnApply.Size = new System.Drawing.Size(80, 23);
-            this.btnApply.TabIndex = 15;
+            this.btnApply.Size = new System.Drawing.Size(107, 28);
+            this.btnApply.TabIndex = 14;
             this.btnApply.Text = "&Apply";
+            this.tipInfo.SetToolTip(this.btnApply, "Save settings if you press \"Mount\".\r\nIf you press \"Cancel\", the settings will not" +
+        " save.");
             this.btnApply.UseVisualStyleBackColor = true;
             // 
             // tipWarning
             // button1
             // 
             this.button1.Image = global::KeePassTrueCryptMount.Resources.B16x16_Folder_Yellow_Open;
-            this.button1.Location = new System.Drawing.Point(433, 102);
+            this.button1.Location = new System.Drawing.Point(570, 60);
+            this.button1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.button1.Name = "button1";
-            this.button1.Size = new System.Drawing.Size(35, 24);
-            this.button1.TabIndex = 11;
+            this.button1.Size = new System.Drawing.Size(47, 30);
+            this.button1.TabIndex = 2;
             this.button1.UseVisualStyleBackColor = true;
             this.button1.Click += new System.EventHandler(this.OnFileOpenDialogButtonClicked);
             // 
             // keyFilesTextBox
             // 
-            this.keyFilesTextBox.Location = new System.Drawing.Point(6, 150);
+            this.keyFilesTextBox.Location = new System.Drawing.Point(8, 232);
+            this.keyFilesTextBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.keyFilesTextBox.Name = "keyFilesTextBox";
-            this.keyFilesTextBox.Size = new System.Drawing.Size(421, 20);
-            this.keyFilesTextBox.TabIndex = 18;
+            this.keyFilesTextBox.Size = new System.Drawing.Size(560, 22);
+            this.keyFilesTextBox.TabIndex = 3;
             this.keyFilesTextBox.TextChanged += new System.EventHandler(this.OnAnyOptionChanged);
             // 
             // button2
             // 
             this.button2.Image = global::KeePassTrueCryptMount.Resources.B16x16_Folder_Yellow_Open;
-            this.button2.Location = new System.Drawing.Point(433, 147);
+            this.button2.Location = new System.Drawing.Point(574, 228);
+            this.button2.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.button2.Name = "button2";
-            this.button2.Size = new System.Drawing.Size(35, 24);
-            this.button2.TabIndex = 19;
+            this.button2.Size = new System.Drawing.Size(47, 30);
+            this.button2.TabIndex = 4;
             this.button2.UseVisualStyleBackColor = true;
             this.button2.Click += new System.EventHandler(this.OnFileOpenDialogButtonClicked);
             // 
             // label2
             // 
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(6, 132);
+            this.label2.Location = new System.Drawing.Point(8, 209);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(52, 13);
+            this.label2.Size = new System.Drawing.Size(75, 17);
             this.label2.TabIndex = 20;
-            this.label2.Text = "KeyFile(s)";
+            this.label2.Text = "Key File(s)";
+            // 
+            // useUrlFieldCheckBox
+            // 
+            this.useUrlFieldCheckBox.AutoSize = true;
+            this.useUrlFieldCheckBox.Location = new System.Drawing.Point(6, 21);
+            this.useUrlFieldCheckBox.Name = "useUrlFieldCheckBox";
+            this.useUrlFieldCheckBox.Size = new System.Drawing.Size(121, 21);
+            this.useUrlFieldCheckBox.TabIndex = 0;
+            this.useUrlFieldCheckBox.Text = "Use &URL Field";
+            this.tipInfo.SetToolTip(this.useUrlFieldCheckBox, "Use the URL Field from the main KeePass entry instead of specifying it separately" +
+        ".");
+            this.useUrlFieldCheckBox.UseVisualStyleBackColor = true;
+            this.useUrlFieldCheckBox.CheckedChanged += new System.EventHandler(this.OnAnyOptionChanged);
+            // 
+            // volumeFileGroupBox
+            // 
+            this.volumeFileGroupBox.Controls.Add(this.useUrlFieldCheckBox);
+            this.volumeFileGroupBox.Controls.Add(this.volumeTextBox);
+            this.volumeFileGroupBox.Controls.Add(this.label1);
+            this.volumeFileGroupBox.Controls.Add(this.button1);
+            this.volumeFileGroupBox.Location = new System.Drawing.Point(4, 93);
+            this.volumeFileGroupBox.Name = "volumeFileGroupBox";
+            this.volumeFileGroupBox.Size = new System.Drawing.Size(624, 102);
+            this.volumeFileGroupBox.TabIndex = 21;
+            this.volumeFileGroupBox.TabStop = false;
+            this.volumeFileGroupBox.Text = "Volume File";
             // 
             // TrueCryptMountForm
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(480, 359);
+            this.ClientSize = new System.Drawing.Size(640, 488);
+            this.Controls.Add(this.volumeFileGroupBox);
             this.Controls.Add(this.label2);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.keyFilesTextBox);
             this.Controls.Add(this.btnApply);
             this.Controls.Add(this.driveComboBox);
             this.Controls.Add(this.label3);
-            this.Controls.Add(this.button1);
-            this.Controls.Add(this.label1);
-            this.Controls.Add(this.volumeTextBox);
             this.Controls.Add(this.mountOptionsGroupBox);
             this.Controls.Add(this.m_lblSeparator);
             this.Controls.Add(this.btnCancel);
             this.Controls.Add(this.btnOK);
             this.Controls.Add(this.bannerPanel);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
+            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "TrueCryptMountForm";
             this.Text = "TrueCryptMountForm";
             this.mountOptionsGroupBox.ResumeLayout(false);
             this.mountOptionsLayoutPanel.ResumeLayout(false);
+            this.volumeFileGroupBox.ResumeLayout(false);
+            this.volumeFileGroupBox.PerformLayout();
             this.ResumeLayout(false);
             this.PerformLayout();
 
         private System.Windows.Forms.TextBox keyFilesTextBox;
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.CheckBox useUrlFieldCheckBox;
+        private System.Windows.Forms.GroupBox volumeFileGroupBox;
     }
 }

File src/KeepassTrueCryptMount/TrueCryptMountForm.cs

             this.backgroundCheckBox.CheckedChanged += this.OnBackgroundCheckBoxChanged;
         }
 
+        public bool UseUrlField
+        {
+            get { return this.useUrlFieldCheckBox.Checked; }
+            private set { this.useUrlFieldCheckBox.Checked = value; }
+        }
+
         public string ContainerVolume
         {
             get { return this.volumeTextBox.Text; }
 
         public TrueCryptMountForm ReadFrom(PwEntry entry)
         {
+            // Use Url Field
+            this.UseUrlField = true;
+            var useUrlFieldString = entry.Strings.GetSafe(EntryStrings.UseUrlField);
+            if (!useUrlFieldString.IsEmpty)
+            {
+                bool tryUseUrlField;
+                bool.TryParse(useUrlFieldString.ReadString(), out tryUseUrlField);
+                this.UseUrlField = tryUseUrlField;
+            }
+
             // container
             var containerString = entry.Strings.GetSafe(EntryStrings.Volume);
             this.volumeTextBox.Text = containerString != null ? containerString.ReadString() : string.Empty;
 
         public TrueCryptMountForm WriteTo(PwEntry entry)
         {
+            entry.Strings.Set(EntryStrings.UseUrlField, new ProtectedString(false, this.useUrlFieldCheckBox.Checked.ToString()));
             entry.Strings.Set(EntryStrings.Volume, new ProtectedString(false, this.ContainerVolume));
             entry.Strings.Set(EntryStrings.KeyFiles, new ProtectedString(false, this.KeyFiles));
             entry.Strings.Set(EntryStrings.DriveLetter, new ProtectedString(false, this.DriveLetter));