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 ...@@ -522,11 +522,11 @@ else
DIR=$(ocamlfind query lablgtk3) DIR=$(ocamlfind query lablgtk3)
if test -n "$DIR"; then if test -n "$DIR"; then
echo "ocamlfind found lablgtk3 in $DIR" echo "ocamlfind found lablgtk3 in $DIR"
LABLGTKINCLUDE="-I $DIR" LABLGTKINCLUDE="-I $DIR -I +threads"
fi fi
fi fi
if test -z "$DIR"; then if test -z "$DIR"; then
LABLGTKINCLUDE="-I +lablgtk3" LABLGTKINCLUDE="-I +lablgtk3 -I +threads"
DIR="$OCAMLLIB/lablgtk3" DIR="$OCAMLLIB/lablgtk3"
AC_CHECK_FILE($DIR/lablgtk.cma,,enable_ide=no) AC_CHECK_FILE($DIR/lablgtk.cma,,enable_ide=no)
fi fi
...@@ -570,12 +570,27 @@ fi ...@@ -570,12 +570,27 @@ fi
if test "$enable_ide" = yes ; then if test "$enable_ide" = yes ; then
DIR= DIR=
if test "$USEOCAMLFIND" = yes; then if test "$USEOCAMLFIND" = yes; then
DIR=$(ocamlfind query lablgtk$GTKVERSION.sourceview$GTKVERSION) case $GTKVERSION in
if test -z "$DIR"; then 2)
DIR=$(ocamlfind query lablgtksourceview$GTKVERSION) LIB_SOURCEVIEW=lablgtksourceview2
fi 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 if test -n "$DIR";then
echo "ocamlfind found lablgtksourceview$GTKVERSION in $DIR" echo "ocamlfind found $PKG_SOURCEVIEW in $DIR"
fi fi
fi fi
if test -z "$DIR"; then if test -z "$DIR"; then
...@@ -586,12 +601,25 @@ if test "$enable_ide" = yes ; then ...@@ -586,12 +601,25 @@ if test "$enable_ide" = yes ; then
if test "$enable_ide" = no; then if test "$enable_ide" = no; then
AC_MSG_WARN([Lib lablgtksourceview not found, IDE disabled.]) AC_MSG_WARN([Lib lablgtksourceview not found, IDE disabled.])
reason_ide=" (lablgtksourceview not found)" reason_ide=" (lablgtksourceview not found)"
else
LABLGTKINCLUDE="$LABLGTKINCLUDE -I $DIR"
fi fi
fi fi
if test "$enable_ide" = yes ; then if test "$enable_ide" = yes ; then
LABLGTKLIB="lablgtk lablgtksourceview$GTKVERSION" case $GTKVERSION in
LABLGTKPKG="lablgtk$GTKVERSION lablgtk$GTKVERSION.init lablgtk$GTKVERSION.sourceview$GTKVERSION" 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 else
LABLGTKLIB= LABLGTKLIB=
LABLGTKPKG= LABLGTKPKG=
......
...@@ -302,8 +302,8 @@ let get_main () = (get_main (config ()).config) ...@@ -302,8 +302,8 @@ let get_main () = (get_main (config ()).config)
let sans_font_family = "Sans" let sans_font_family = "Sans"
let mono_font_family = "Monospace" let mono_font_family = "Monospace"
let modifiable_sans_font_views = ref [] let modifiable_sans_font_views : GObj.misc_ops list ref = ref []
let modifiable_mono_font_views = ref [] let modifiable_mono_font_views : GObj.misc_ops list ref = ref []
let add_modifiable_sans_font_view v = let add_modifiable_sans_font_view v =
modifiable_sans_font_views := v :: !modifiable_sans_font_views modifiable_sans_font_views := v :: !modifiable_sans_font_views
...@@ -317,8 +317,8 @@ let change_font size = ...@@ -317,8 +317,8 @@ let change_font size =
*) *)
let sff = sans_font_family ^ " " ^ string_of_int size in let sff = sans_font_family ^ " " ^ string_of_int size in
let mff = mono_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 sf = Gtkcompat.gpango_font_description_from_string sff in
let mf = Pango.Font.from_string mff 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 sf) !modifiable_sans_font_views;
List.iter (fun v -> v#modify_font mf) !modifiable_mono_font_views List.iter (fun v -> v#modify_font mf) !modifiable_mono_font_views
......
...@@ -11,3 +11,5 @@ ...@@ -11,3 +11,5 @@
#13 "src/ide/gtkcompat2.ml" #13 "src/ide/gtkcompat2.ml"
module GSourceView = GSourceView2 module GSourceView = GSourceView2
let gpango_font_description_from_string = Pango.Font.from_string
...@@ -11,3 +11,5 @@ ...@@ -11,3 +11,5 @@
#13 "src/ide/gtkcompat3.ml" #13 "src/ide/gtkcompat3.ml"
module GSourceView = GSourceView3 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