summaryrefslogtreecommitdiff
path: root/UConnectionManager.pas
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-04 12:39:05 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2009-10-04 12:39:05 +0200
commitc04230ac95cf53ce73a4c7872e6eb64aeeba9668 (patch)
tree6aca02a26a535663052036f7760e9cecffeee881 /UConnectionManager.pas
parentc36919073910a98ddf1b8008227e0f5ede1a53bb (diff)
downloadtuxcmd-c04230ac95cf53ce73a4c7872e6eb64aeeba9668.tar.xz
Add "do-not-show-again" checkbox to some VFS questions
Also remove active VFS connection question on quit
Diffstat (limited to 'UConnectionManager.pas')
-rw-r--r--UConnectionManager.pas12
1 files changed, 11 insertions, 1 deletions
diff --git a/UConnectionManager.pas b/UConnectionManager.pas
index f7c2993..026a975 100644
--- a/UConnectionManager.pas
+++ b/UConnectionManager.pas
@@ -534,6 +534,8 @@ var Engine: TVFSEngine;
i, j: integer;
VFSPlugin: TVFSPlugin;
FActiveConnInfo: TConnMgrItem;
+ DontShowAgain: boolean;
+ res: TMessageButton;
begin
FActiveConnInfo := nil;
if ListView.Selected <> nil then FActiveConnInfo := ListView.Selected.AsPointer(0);
@@ -565,7 +567,15 @@ begin
if VFSPlugin = nil then VFSPlugin := PluginList[0]; // Fallback in hope some other plugin can handle it
end;
- if (SourcePanelEngine is TVFSEngine) and (Application.MessageBox(PGtkWindow(FWidget), LANGCloseOpenConnection, [mbYes, mbNo], mbWarning, mbYes, mbNo) <> mbYes) then Exit;
+ if (SourcePanelEngine is TVFSEngine) and ConfReplaceConnectionWarning then begin
+ DontShowAgain := False;
+ res := MessageBoxShowOnce(PGtkWindow(FWidget), LANGCloseOpenConnection, LANGDontShowAgain, DontShowAgain, [mbYes, mbNo], mbWarning, mbYes, mbNo);
+ if DontShowAgain then begin
+ ConfReplaceConnectionWarning := False;
+ WriteMainGUISettings;
+ end;
+ if res <> mbYes then Exit;
+ end;
ListViewTable.Enabled := False;
CloseButton.Enabled := False;