From a115076fe49e385d1b9af5f7109a123e919a1697 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Fri, 18 Nov 2016 16:17:38 -0600 Subject: [PATCH] add a GUI interface to toggle the x selection mode closes PR 15365 --- gui-lib/framework/private/main.rkt | 6 ++++++ gui-lib/framework/private/preferences.rkt | 5 +++++ gui-lib/info.rkt | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/gui-lib/framework/private/main.rkt b/gui-lib/framework/private/main.rkt index 67ca1440..61c35a3d 100644 --- a/gui-lib/framework/private/main.rkt +++ b/gui-lib/framework/private/main.rkt @@ -25,6 +25,12 @@ (application-preferences-handler (λ () (preferences:show-dialog))) +(preferences:set-default 'framework:editor-x-selection-mode #t boolean?) +(when (equal? (system-type) 'unix) + (preferences:add-callback + 'framework:editor-x-selection-mode + (λ (p v) (editor-set-x-selection-mode v)))) + (preferences:set-default 'framework:ascii-art-enlarge #f boolean?) (preferences:set-default 'framework:color-scheme 'classic symbol?) diff --git a/gui-lib/framework/private/preferences.rkt b/gui-lib/framework/private/preferences.rkt index 4311ae50..b45216ad 100644 --- a/gui-lib/framework/private/preferences.rkt +++ b/gui-lib/framework/private/preferences.rkt @@ -511,6 +511,11 @@ the state transitions / contracts are: 'framework:column-guide-width (string-constant maximum-char-width-guide-pref-check-box) (λ (n) (and (exact-integer? n) (>= n 2)))) + + (when (equal? (system-type) 'unix) + (add-check editor-panel + 'framework:editor-x-selection-mode + (string-constant editor-x-selection-mode))) (editor-panel-procs editor-panel))))]) (add-editor-checkbox-panel))) diff --git a/gui-lib/info.rkt b/gui-lib/info.rkt index 9aab1adb..e7a143dc 100644 --- a/gui-lib/info.rkt +++ b/gui-lib/info.rkt @@ -12,7 +12,7 @@ "pict-lib" "scheme-lib" "scribble-lib" - ["string-constants-lib" #:version "1.9"] + ["string-constants-lib" #:version "1.14"] "option-contract-lib" "2d-lib" "compatibility-lib"