Commit f60a9ce7 authored by François Bobot's avatar François Bobot

[Configure] Gtksourceview3 could be named lablgtk3-sourceview3

            instead of lablgtk3.sourceview3
parent 5f06b170
......@@ -522,11 +522,11 @@ else
DIR=$(ocamlfind query lablgtk3)
if test -n "$DIR"; then
echo "ocamlfind found lablgtk3 in $DIR"
LABLGTKINCLUDE="-I $DIR"
LABLGTKINCLUDE="-I $DIR -I +threads"
fi
fi
if test -z "$DIR"; then
LABLGTKINCLUDE="-I +lablgtk3"
LABLGTKINCLUDE="-I +lablgtk3 -I +threads"
DIR="$OCAMLLIB/lablgtk3"
AC_CHECK_FILE($DIR/lablgtk.cma,,enable_ide=no)
fi
......@@ -570,12 +570,27 @@ fi
if test "$enable_ide" = yes ; then
DIR=
if test "$USEOCAMLFIND" = yes; then
DIR=$(ocamlfind query lablgtk$GTKVERSION.sourceview$GTKVERSION)
if test -z "$DIR"; then
DIR=$(ocamlfind query lablgtksourceview$GTKVERSION)
fi
case $GTKVERSION in
2)
LIB_SOURCEVIEW=lablgtksourceview2
PKG_SOURCEVIEW=lablgtk2.sourceview2
DIR=$(ocamlfind query $PKG_SOURCEVIEW)
if test -z "$DIR"; then
PKG_SOURCEVIEW=lablgtksourceview2
DIR=$(ocamlfind query $PKG_SOURCEVIEW)
fi
;;
3)
LIB_SOURCEVIEW=lablgtk3_sourceview3
PKG_SOURCEVIEW=lablgtk3-sourceview3
DIR=$(ocamlfind query $PKG_SOURCEVIEW)
;;
*)
AC_MSG_ERROR(Unknown gtk version $GTKVERSION)
;;
esac
if test -n "$DIR";then
echo "ocamlfind found lablgtksourceview$GTKVERSION in $DIR"
echo "ocamlfind found $PKG_SOURCEVIEW in $DIR"
fi
fi
if test -z "$DIR"; then
......@@ -586,12 +601,25 @@ if test "$enable_ide" = yes ; then
if test "$enable_ide" = no; then
AC_MSG_WARN([Lib lablgtksourceview not found, IDE disabled.])
reason_ide=" (lablgtksourceview not found)"
else
LABLGTKINCLUDE="$LABLGTKINCLUDE -I $DIR"
fi
fi
if test "$enable_ide" = yes ; then
LABLGTKLIB="lablgtk lablgtksourceview$GTKVERSION"
LABLGTKPKG="lablgtk$GTKVERSION lablgtk$GTKVERSION.init lablgtk$GTKVERSION.sourceview$GTKVERSION"
case $GTKVERSION in
2)
LABLGTKLIB="lablgtk"
;;
3)
LABLGTKLIB="threads lablgtk3"
;;
*)
AC_MSG_ERROR(Unknown gtk version $GTKVERSION)
;;
esac
LABLGTKLIB="$LABLGTKLIB $LIB_SOURCEVIEW"
LABLGTKPKG="lablgtk$GTKVERSION lablgtk$GTKVERSION.init $PKG_SOURCEVIEW"
else
LABLGTKLIB=
LABLGTKPKG=
......
......@@ -302,8 +302,8 @@ let get_main () = (get_main (config ()).config)
let sans_font_family = "Sans"
let mono_font_family = "Monospace"
let modifiable_sans_font_views = ref []
let modifiable_mono_font_views = ref []
let modifiable_sans_font_views : GObj.misc_ops list ref = ref []
let modifiable_mono_font_views : GObj.misc_ops list ref = ref []
let add_modifiable_sans_font_view v =
modifiable_sans_font_views := v :: !modifiable_sans_font_views
......@@ -317,8 +317,8 @@ let change_font size =
*)
let sff = sans_font_family ^ " " ^ string_of_int size in
let mff = mono_font_family ^ " " ^ string_of_int size in
let sf = Pango.Font.from_string sff in
let mf = Pango.Font.from_string mff in
let sf = Gtkcompat.gpango_font_description_from_string sff in
let mf = Gtkcompat.gpango_font_description_from_string mff in
List.iter (fun v -> v#modify_font sf) !modifiable_sans_font_views;
List.iter (fun v -> v#modify_font mf) !modifiable_mono_font_views
......
......@@ -11,3 +11,5 @@
#13 "src/ide/gtkcompat2.ml"
module GSourceView = GSourceView2
let gpango_font_description_from_string = Pango.Font.from_string
......@@ -11,3 +11,5 @@
#13 "src/ide/gtkcompat3.ml"
module GSourceView = GSourceView3
let gpango_font_description_from_string = GPango.font_description_from_string
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment