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

[gui] don't remove lablgtk2 compatibility too early

parent 161dc97e
No related branches found
No related tags found
No related merge requests found
...@@ -201,3 +201,4 @@ hello-*.tar.gz ...@@ -201,3 +201,4 @@ hello-*.tar.gz
/src/plugins/gui/GSourceView2.ml /src/plugins/gui/GSourceView2.ml
/src/plugins/gui/dgraph.ml /src/plugins/gui/dgraph.ml
/src/plugins/gui/dgraph.mli /src/plugins/gui/dgraph.mli
/src/plugins/gui/gtk_compat.ml
...@@ -705,7 +705,19 @@ src/plugins/gui/dgraph.mli: src/plugins/gui/dgraph.mli.in ...@@ -705,7 +705,19 @@ src/plugins/gui/dgraph.mli: src/plugins/gui/dgraph.mli.in
$(CHMOD_RO) $@ $(CHMOD_RO) $@
endif endif
ifeq ($(LABLGTK),lablgtk3)
src/plugins/gui/gtk_compat.ml: src/plugins/gui/gtk_compat.3.ml
$(CP) $< $@
$(CHMOD_RO) $@
else
src/plugins/gui/gtk_compat.ml: src/plugins/gui/gtk_compat.2.ml
$(CP) $< $@
$(CHMOD_RO) $@
endif
GENERATED+=src/plugins/gui/gtk_compat.ml
SINGLE_GUI_CMO:= \ SINGLE_GUI_CMO:= \
gtk_compat \
$(WTOOLKIT) \ $(WTOOLKIT) \
$(SOURCEVIEWCOMPAT) \ $(SOURCEVIEWCOMPAT) \
$(DGRAPHCOMPAT) \ $(DGRAPHCOMPAT) \
......
let get_toolbar_index (toolbar:GButton.toolbar) (item:GButton.tool_item) =
toolbar#get_item_index item
let get_toolbar_index toolbar item = toolbar#get_item_index item#as_tool_item
val get_toolbar_index: GButton.toolbar -> GButton.tool_item -> int
...@@ -165,7 +165,10 @@ class menu_manager ?packing ~host:(_:Gtk_helper.host) = ...@@ -165,7 +165,10 @@ class menu_manager ?packing ~host:(_:Gtk_helper.host) =
By default, add all the others just before this very first group. *) By default, add all the others just before this very first group. *)
ref (match pos, first_tool_separator with ref (match pos, first_tool_separator with
| None, None -> 0 | None, None -> 0
| None, Some sep -> max 0 (toolbar#get_item_index sep#as_tool_item) | None, Some sep ->
max
0
(Gtk_compat.get_toolbar_index toolbar (sep:>GButton.tool_item))
| Some p, _ -> p) | Some p, _ -> p)
in in
let toolbar_packing w = let toolbar_packing w =
......
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