浏览代码

File Dialog: hook up cancel button

Miguel de Icaza 7 年之前
父节点
当前提交
829aae09c8
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Terminal.Gui/Dialogs/FileDialog.cs

+ 4 - 0
Terminal.Gui/Dialogs/FileDialog.cs

@@ -320,6 +320,10 @@ namespace Terminal.Gui {
 			};
 
 			this.cancel = new Button ("Cancel");
+			this.cancel.Clicked += () => {
+				canceled = true;
+				Application.RequestStop ();
+			};
 			AddButton (cancel);
 
 			this.prompt = new Button (prompt) {