Message-ID: <437D97EC.8040702 at inria.fr> Date: Fri, 18 Nov 2005 09:59:24 +0100 From: Julien Narboux MIME-Version: 1.0 To: lablgtk at math.nagoya-u.ac.jp Subject: clipboard clear Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, It seems that there is a problem with the method clear of GData.clipboard . When you copy text from an external app, clear () does not seem to work. If I use set_text "" instead, it works. Is it a bug in gtk ? or I misunderstood something ? Regards Julien Narboux Here is my small test program : open GMain let clipboard () = let cb = GData.clipboard (Gdk.Atom.clipboard) in while true do (* cb#set_text "test"; *) (* clear works if the test is copied within the app here *) let s = cb#text in (match s with Some s -> print_endline s | None -> () ); cb#clear (); (* does not work *) (* cb#set_text ""; *) (* this one works *) print_endline "cleared"; let s = cb#text in (match s with Some s -> print_endline s | None -> () ) done let main () = clipboard () (* Main.main() *) let _ = main ()