From ba15cfa40138666da84c5f08884a6ce8d42251ad Mon Sep 17 00:00:00 2001 From: Jacques Garrigue Date: Wed, 31 Jan 2024 10:11:40 +0900 Subject: [PATCH] fix rsvg examples --- examples/dune | 5 ++--- examples/{ => rsvg}/pixview.ml | 0 examples/rsvg/test_rsvg.ml | 9 +++------ 3 files changed, 5 insertions(+), 9 deletions(-) rename examples/{ => rsvg}/pixview.ml (100%) diff --git a/examples/dune b/examples/dune index 6f8285249..cd60697d2 100644 --- a/examples/dune +++ b/examples/dune @@ -20,7 +20,6 @@ link_button ; lissajous nihongo notebook pango1 pango2 - pixview ; pousse progressbar radiobuttons rpn ; runthread @@ -41,7 +40,7 @@ gioredirect giotest hello iconview image kaimono label link_button lissajous nihongo notebook - pango1 pango2 pixview pousse progressbar radiobuttons rpn + pango1 pango2 pousse progressbar radiobuttons rpn runthread scrolledwin seppala signal_override slide_show socket spin stackcontainer stackswitcher @@ -49,7 +48,7 @@ testthread timer toolbar tooltip tree tree_model tree_store tron ) (flags :standard -w -3-6-7-10-24-26-27-33-35 -no-strict-sequence) - (libraries lablgtk3 lablgtk3-rsvg2)) + (libraries lablgtk3)) (executables (names spell) diff --git a/examples/pixview.ml b/examples/rsvg/pixview.ml similarity index 100% rename from examples/pixview.ml rename to examples/rsvg/pixview.ml diff --git a/examples/rsvg/test_rsvg.ml b/examples/rsvg/test_rsvg.ml index 1952fa2f9..2cac55e22 100644 --- a/examples/rsvg/test_rsvg.ml +++ b/examples/rsvg/test_rsvg.ml @@ -26,15 +26,12 @@ let _ = end let pb = - let gz = - Filename.check_suffix !fname ".svgz" || - Filename.check_suffix !fname ".svg.gz" in let size_cb = match !zoom with | None -> None - | Some z -> Some (Rsvg.at_zoom z z) in - Rsvg.render_from_file ~gz ?dpi:!dpi ?size_cb !fname + | Some z -> Some (Rsvg2.at_zoom z z) in + Rsvg2.render_from_file ?dpi:!dpi ?size_cb !fname -let w = GWindow.window ~allow_grow:false ~title:!fname () +let w = GWindow.window ~title:!fname () let i = GMisc.image ~packing:w#add () let () =