swish/commit

MODFIED: Allow users to extend the example menu

authorJan Wielemaker
Wed Mar 18 22:14:20 2015 +0100
committerJan Wielemaker
Wed Mar 18 22:14:20 2015 +0100
commit99b339fd4b667a952acd2233a1ef547063f79473
tree6ef6262929912b728a39e422fd08d7e6cd93ab99
parent59488a5cbf1d7fa98e11e69a631af029e390d8c7
Diff style: patch stat
diff --git a/config-available/swish.pl b/config-available/swish.pl
index 8aeb017..9419ebb 100644
--- a/config-available/swish.pl
+++ b/config-available/swish.pl
@@ -4,7 +4,9 @@
 /** <module> Add Prolog interaction to ClioPatria
 */
 
-:- multifile user:file_search_path/2.
+:- multifile
+	user:file_search_path/2,
+	swish_config:config/2.
 
 % tell SWISH where to find its parts.   The last clause allows adding an
 % =examples=  directory  in  the  main   directory  holding  application
@@ -22,6 +24,10 @@ user:file_search_path(example,	 examples).
 % Enable logging of SWISH queries and sources if HTTP logging is enabled
 :- use_module(library(swish/logging)).
 
+% Allows users to extend the Examples menu by ticking the Example
+% checkbox.
+swish_config:config(community_examples, true).
+
 %%      cliopatria:menu_item(-Item, -Label) is nondet.
 %
 %       Add SWISH to the Query menu.