Skip to content
Snippets Groups Projects
Commit 27be26be authored by Allan Blanchard's avatar Allan Blanchard Committed by Andre Maroneze
Browse files

[kernel] use standard mechanism for user dirs visibility

parent cb692771
No related branches found
No related tags found
No related merge requests found
...@@ -88,13 +88,6 @@ let is_share_visible () = share_visible_ref := true ...@@ -88,13 +88,6 @@ let is_share_visible () = share_visible_ref := true
let session_visible_ref = ref false let session_visible_ref = ref false
let is_session_visible () = session_visible_ref := true let is_session_visible () = session_visible_ref := true
let cache_visible_ref = ref false
let is_cache_visible () = cache_visible_ref := true
let config_visible_ref = ref false
let is_config_visible () = config_visible_ref := true
let state_visible_ref = ref false
let is_state_visible () = state_visible_ref := true
let plugin_subpath_ref = ref None let plugin_subpath_ref = ref None
let plugin_subpath s = plugin_subpath_ref := Some s let plugin_subpath s = plugin_subpath_ref := Some s
...@@ -104,9 +97,6 @@ let reset_plugin () = ...@@ -104,9 +97,6 @@ let reset_plugin () =
kernel := false; kernel := false;
share_visible_ref := false; share_visible_ref := false;
session_visible_ref := false; session_visible_ref := false;
cache_visible_ref := false;
config_visible_ref := false;
state_visible_ref := false;
plugin_subpath_ref := None; plugin_subpath_ref := None;
default_msg_keys_ref := []; default_msg_keys_ref := [];
;; ;;
...@@ -481,7 +471,6 @@ struct ...@@ -481,7 +471,6 @@ struct
module type User_dir_input = sig module type User_dir_input = sig
val name: string val name: string
val getter: unit -> Fc_Filepath.Normalized.t val getter: unit -> Fc_Filepath.Normalized.t
val visible_ref: bool ref
val kernel_get: unit -> Fc_Filepath.Normalized.t val kernel_get: unit -> Fc_Filepath.Normalized.t
val kernel_is_set: unit -> bool val kernel_is_set: unit -> bool
end end
...@@ -504,7 +493,7 @@ struct ...@@ -504,7 +493,7 @@ struct
| Some p when p <> "" -> Fc_Filepath.Normalized.of_string p | Some p when p <> "" -> Fc_Filepath.Normalized.of_string p
| _ -> I.getter () | _ -> I.getter ()
] ]
let visible_ref = !I.visible_ref let visible_ref = !Parameter_customize.is_visible_ref
end) end)
end end
...@@ -512,7 +501,6 @@ struct ...@@ -512,7 +501,6 @@ struct
(struct (struct
let name = "cache" let name = "cache"
let getter = System_config.User_dirs.cache let getter = System_config.User_dirs.cache
let visible_ref = cache_visible_ref
let kernel_get () = !cache_ref () let kernel_get () = !cache_ref ()
let kernel_is_set () = !cache_is_set_ref () let kernel_is_set () = !cache_is_set_ref ()
end) end)
...@@ -521,7 +509,6 @@ struct ...@@ -521,7 +509,6 @@ struct
(struct (struct
let name = "config" let name = "config"
let getter = System_config.User_dirs.config let getter = System_config.User_dirs.config
let visible_ref = config_visible_ref
let kernel_get () = !config_ref () let kernel_get () = !config_ref ()
let kernel_is_set () = !config_is_set_ref () let kernel_is_set () = !config_is_set_ref ()
end) end)
...@@ -530,7 +517,6 @@ struct ...@@ -530,7 +517,6 @@ struct
(struct (struct
let name = "state" let name = "state"
let getter = System_config.User_dirs.state let getter = System_config.User_dirs.state
let visible_ref = state_visible_ref
let kernel_get () = !state_ref () let kernel_get () = !state_ref ()
let kernel_is_set () = !state_is_set_ref () let kernel_is_set () = !state_is_set_ref ()
end) end)
......
...@@ -143,21 +143,6 @@ val is_session_visible: unit -> unit ...@@ -143,21 +143,6 @@ val is_session_visible: unit -> unit
To be called just before applying {!Register} to create plug-in services. To be called just before applying {!Register} to create plug-in services.
@since Neon-20140301 *) @since Neon-20140301 *)
val is_cache_visible: unit -> unit
(** Make visible to the end-user the -<plug-in>-cache-dir option.
To be called just before applying {!Register} to create plug-in services.
@since Neon-20140301 *)
val is_config_visible: unit -> unit
(** Make visible to the end-user the -<plug-in>-config-dir option.
To be called just before applying {!Register} to create plug-in services.
@since Neon-20140301 *)
val is_state_visible: unit -> unit
(** Make visible to the end-user the -<plug-in>-state-dir option.
To be called just before applying {!Register} to create plug-in services.
@since Neon-20140301 *)
val plugin_subpath: string -> unit val plugin_subpath: string -> unit
(** Use the given string as the sub-directory in which the plugin files will (** Use the given string as the sub-directory in which the plugin files will
be installed (ie. [share/frama-c/plugin_subpath]...). Relevant for be installed (ie. [share/frama-c/plugin_subpath]...). Relevant for
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
(* *) (* *)
(**************************************************************************) (**************************************************************************)
let () = Plugin.is_config_visible ()
include Plugin.Register include Plugin.Register
(struct (struct
let name = "GUI" let name = "GUI"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment