Skip to content
Snippets Groups Projects
Commit e03fc173 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[GUI] Dgraph compatibility: use fake Dgraph module in gtk3 mode

parent 05c9434b
No related branches found
No related tags found
No related merge requests found
......@@ -198,3 +198,6 @@ hello-*.tar.gz
# should remain empty #
#######################
/src/plugins/gui/GSourceView2.mli
/src/plugins/gui/GSourceView2.ml
/src/plugins/gui/dgraph.ml
/src/plugins/gui/dgraph.mli
......@@ -684,15 +684,31 @@ SOURCEVIEWCOMPAT:=
ifeq ($(strip $(GTKSOURCEVIEW)),lablgtk2.sourceview3)
SOURCEVIEWCOMPAT:=GSourceView2
src/plugins/gui/GSourceView2.ml%: src/plugins/gui/GSourceView2.ml%.in
src/plugins/gui/GSourceView2.ml: src/plugins/gui/GSourceView2.ml.in
$(CP) $< $@
$(CHMOD_RO) $@
src/plugins/gui/GSourceView2.mli: src/plugins/gui/GSourceView2.mli.in
$(CP) $< $@
$(CHMOD_RO) $@
endif
DGRAPHCOMPAT:=
ifeq ($(HAS_GNOMECANVAS),no)
DGRAPHCOMPAT:=dgraph
src/plugins/gui/dgraph.ml: src/plugins/gui/dgraph.ml.in
$(CP) $< $@
$(CHMOD_RO) $@
src/plugins/gui/dgraph.mli: src/plugins/gui/dgraph.mli.in
$(CP) $< $@
$(CHMOD_RO) $@
endif
SINGLE_GUI_CMO:= \
$(WTOOLKIT) \
$(SOURCEVIEWCOMPAT) \
$(DGRAPHCOMPAT) \
gui_parameters \
gtk_helper gtk_form \
source_viewer pretty_source source_manager book_manager \
......@@ -745,7 +761,12 @@ PLUGIN_NAME:=Callgraph
PLUGIN_DISTRIBUTED:=yes
PLUGIN_DIR:=src/plugins/callgraph
PLUGIN_CMO:= options journalize subgraph cg services uses register
#GTK3: no DGraph available.
ifeq ($(HAS_GNOMECANVAS),yes)
PLUGIN_GUI_CMO:=cg_viewer
else
PLUGIN_GUI_CMO:=
endif
PLUGIN_CMI:= callgraph_api
PLUGIN_INTERNAL_TEST:=yes
PLUGIN_TESTS_DIRS:=callgraph
......
(* dgraph module that always generates an error: Dgraph is not available
with gtk3
*)
module DGraphModel = struct
exception DotError of string
end
module DGraphContainer = struct
module Dot = struct
let from_dot_with_commands ?packing:_ _ =
raise (DGraphModel.DotError "DGraph is unsupported in GTK3")
end
end
(* dgraph module that always generates an error: Dgraph is not available
with gtk3
*)
module DGraphModel: sig
exception DotError of string
end
module DGraphContainer: sig
module Dot: sig
val from_dot_with_commands: ?packing:(GObj.widget ->unit) -> string ->
GPack.table * <adapt_zoom: unit -> unit>
end
end
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