method print color =
      let c = new_tag [`FOREGROUND color] in
      fun s ->
        let s = s^"\n" in
        buffer#insert
          ~iter: buffer#end_iter
          ~tags: [fixed_font ; c]
          (Glib.Convert.locale_to_utf8 s);
        let l = buffer#char_count in
        if l > Cam_constant.log_max_size then
          (
           buffer#delete
             ~start: buffer#start_iter
             ~stop: (buffer#get_iter_at_char (max (Cam_constant.log_max_size / 2) (String.length s)));
           buffer#insert ~iter: buffer#start_iter "...\n"
          )