aboutsummaryrefslogtreecommitdiff
path: root/ide
diff options
context:
space:
mode:
Diffstat (limited to 'ide')
-rw-r--r--ide/coqide/MacOS/Info.plist.template89
-rw-r--r--ide/coqide/configwin_ihm.ml7
-rw-r--r--ide/coqide/preferences.ml15
3 files changed, 16 insertions, 95 deletions
diff --git a/ide/coqide/MacOS/Info.plist.template b/ide/coqide/MacOS/Info.plist.template
deleted file mode 100644
index e4fb0e5980..0000000000
--- a/ide/coqide/MacOS/Info.plist.template
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
- <key>CFBundleDocumentTypes</key>
- <array>
- <dict>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>*</string>
- </array>
- <key>CFBundleTypeName</key>
- <string>NSStringPboardType</string>
- <key>CFBundleTypeOSTypes</key>
- <array>
- <string>****</string>
- </array>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- </dict>
- <dict>
- <key>CFBundleTypeIconFile</key>
- <string>coqfile.icns</string>
- <key>CFBundleTypeName</key>
- <string>Coq file</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>CFBundleTypeMIMETypes</key>
- <array>
- <string>text/plain</string>
- </array>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>v</string>
- </array>
- <key>LSHandlerRank</key>
- <string>Owner</string>
- </dict>
- <dict>
- <key>CFBundleTypeName</key>
- <string>All</string>
- <key>CFBundleTypeRole</key>
- <string>Editor</string>
- <key>CFBundleTypeMIMETypes</key>
- <array>
- <string>text/plain</string>
- </array>
- <key>LSHandlerRank</key>
- <string>Default</string>
- <key>CFBundleTypeExtensions</key>
- <array>
- <string>*</string>
- </array>
- </dict>
- </array>
- <key>CFBundleIconFile</key>
- <string>coqide.icns</string>
- <key>CFBundleVersion</key>
- <string>390</string>
- <key>CFBundleName</key>
- <string>CoqIDE</string>
- <key>CFBundleShortVersionString</key>
- <string>VERSION</string>
- <key>CFBundleDisplayName</key>
- <string>Coq Proof Assistant vVERSION</string>
- <key>CFBundleGetInfoString</key>
- <string>Coq_vVERSION</string>
- <key>NSHumanReadableCopyright</key>
- <string>Copyright 1999-2019, Inria, CNRS and contributors</string>
- <key>CFBundleHelpBookFolder</key>
- <string>share/doc/coq/html/</string>
- <key>CFAppleHelpAnchor</key>
- <string>index</string>
- <key>CFBundleExecutable</key>
- <string>coqide</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundleIdentifier</key>
- <string>fr.inria.coq.coqide</string>
- <key>LSApplicationCategoryType</key>
- <string>public.app-category.developer-tools</string>
- <key>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>NSPrincipalClass</key>
- <string>NSApplication</string>
-</dict>
-</plist>
diff --git a/ide/coqide/configwin_ihm.ml b/ide/coqide/configwin_ihm.ml
index e768131dcf..da1553d751 100644
--- a/ide/coqide/configwin_ihm.ml
+++ b/ide/coqide/configwin_ihm.ml
@@ -31,6 +31,10 @@ let set_help_tip wev = function
| None -> ()
| Some help -> GtkBase.Widget.Tooltip.set_text wev#as_widget help
+let select_arch m m_osx =
+ if Coq_config.arch = "Darwin" then m_osx else m
+
+(* How the modifiers are named in the preference box *)
let modifiers_to_string m =
let rec iter m s =
match m with
@@ -41,6 +45,7 @@ let modifiers_to_string m =
`CONTROL -> "<ctrl>"
| `SHIFT -> "<shft>"
| `LOCK -> "<lock>"
+ | `META -> select_arch "<meta>" "<cmd>"
| `MOD1 -> "<alt>"
| `MOD2 -> "<mod2>"
| `MOD3 -> "<mod3>"
@@ -773,7 +778,7 @@ let modifiers
?(editable=true)
?(expand=true)
?help
- ?(allow=[`CONTROL;`SHIFT;`LOCK;`MOD1;`MOD2;`MOD3;`MOD4;`MOD5])
+ ?(allow=[`CONTROL;`SHIFT;`LOCK;`META;`MOD1;`MOD2;`MOD3;`MOD4;`MOD5])
?(f=(fun _ -> ())) label v =
Modifiers_param
{
diff --git a/ide/coqide/preferences.ml b/ide/coqide/preferences.ml
index 8361cc3940..838da6303d 100644
--- a/ide/coqide/preferences.ml
+++ b/ide/coqide/preferences.ml
@@ -321,18 +321,21 @@ let attach_modifiers (pref : string preference) prefix =
in
pref#connect#changed ~callback:cb
-let select_arch m m_osx =
- if Coq_config.arch = "Darwin" then m_osx else m
-
let modifier_for_navigation =
new preference ~name:["modifier_for_navigation"]
- ~init:(select_arch "<Control>" "<Control><Primary>") ~repr:Repr.(string)
+ (* Note: on Darwin, this will give "<Control><Meta>", i.e. Ctrl and Command; on other
+ architectures, "<Primary>" binds to "<Control>" so it will give "<Control>" alone *)
+ ~init:"<Control><Primary>" ~repr:Repr.(string)
let modifier_for_templates =
new preference ~name:["modifier_for_templates"] ~init:"<Control><Shift>" ~repr:Repr.(string)
+let select_arch m m_osx =
+ if Coq_config.arch = "Darwin" then m_osx else m
+
let modifier_for_display =
new preference ~name:["modifier_for_display"]
+ (* Note: <Primary> (i.e. <Meta>, i.e. "Command") on Darwin, i.e. MacOS X, but <Alt> elsewhere *)
~init:(select_arch "<Alt><Shift>" "<Primary><Shift>")~repr:Repr.(string)
let modifier_for_queries =
@@ -348,7 +351,9 @@ let attach_modifiers_callback () =
()
let modifiers_valid =
- new preference ~name:["modifiers_valid"] ~init:"<Alt><Control><Shift>" ~repr:Repr.(string)
+ new preference ~name:["modifiers_valid"]
+ (* Note: <Primary> is providing <Meta> (i.e. "Command") for Darwin, i.e. MacOS X *)
+ ~init:"<Alt><Control><Shift><Primary>" ~repr:Repr.(string)
let browser_cmd_fmt =
try