diff options
Diffstat (limited to 'otherlibs/labltk/jpf')
-rw-r--r-- | otherlibs/labltk/jpf/balloon.ml | 10 | ||||
-rw-r--r-- | otherlibs/labltk/jpf/fileselect.ml | 14 |
2 files changed, 12 insertions, 12 deletions
diff --git a/otherlibs/labltk/jpf/balloon.ml b/otherlibs/labltk/jpf/balloon.ml index c783a0be6..cd8a706e2 100644 --- a/otherlibs/labltk/jpf/balloon.ml +++ b/otherlibs/labltk/jpf/balloon.ml @@ -69,17 +69,17 @@ let put on: w ms: millisec mesg = List.iter [[`Leave]; [`ButtonPress]; [`ButtonRelease]; [`Destroy]; [`KeyPress]; [`KeyRelease]] - fun:(fun events -> bind w :events extend:true action:(fun _ -> reset ())); - List.iter [[`Enter]; [`Motion]] fun: + f:(fun events -> bind w :events extend:true action:(fun _ -> reset ())); + List.iter [[`Enter]; [`Motion]] f: begin fun events -> bind w :events extend:true fields:[`RootX; `RootY] action:(fun ev -> reset (); set ev) end let init () = - let t = Hashtbl.create size:101 in + let t = Hashtbl.create 101 in Protocol.add_destroy_hook (fun w -> - Hashtbl.remove t key:w); + Hashtbl.remove t w); topw := Toplevel.create default_toplevel; Wm.overrideredirect_set !topw to: true; Wm.withdraw !topw; @@ -88,7 +88,7 @@ let init () = pack [!popupw]; bind_class "all" events: [`Enter] extend:true fields:[`Widget] action: begin fun w -> - try Hashtbl.find t key: w.ev_Widget + try Hashtbl.find t w.ev_Widget with Not_found -> Hashtbl.add t key:w.ev_Widget data: (); let x = Option.get w.ev_Widget name: "balloon" class: "Balloon" in diff --git a/otherlibs/labltk/jpf/fileselect.ml b/otherlibs/labltk/jpf/fileselect.ml index e3b08e051..0c8ee23c6 100644 --- a/otherlibs/labltk/jpf/fileselect.ml +++ b/otherlibs/labltk/jpf/fileselect.ml @@ -112,11 +112,11 @@ let get_files_in_directory dir = let rec get_directories_in_files path = List.filter - pred:(fun x -> try (stat (path ^ x)).st_kind = S_DIR with _ -> false) + f:(fun x -> try (stat (path ^ x)).st_kind = S_DIR with _ -> false) let remove_directories path = List.filter - pred:(fun x -> try (stat (path ^ x)).st_kind <> S_DIR with _ -> false) + f:(fun x -> try (stat (path ^ x)).st_kind <> S_DIR with _ -> false) (************************* a nice interface to listbox - from frx_listbox.ml *) @@ -238,8 +238,8 @@ let f :title action:proc filter:deffilter file:deffile :multi :sync = (* get matched file by subshell call. *) let matched_files = remove_directories dirname (ls dirname patternname) in - Textvariable.set filter_var to:filter; - Textvariable.set selection_var to:(dirname ^ deffile); + Textvariable.set filter_var filter; + Textvariable.set selection_var (dirname ^ deffile); Listbox.delete directory_listbox first:(`Num 0) last:`End; Listbox.insert directory_listbox index:`End texts:directories; Listbox.delete filter_listbox first:(`Num 0) last:`End; @@ -259,7 +259,7 @@ let f :title action:proc filter:deffilter file:deffile :multi :sync = if sync then begin selected_files := l; - Textvariable.set sync_var to:"1" + Textvariable.set sync_var "1" end else begin @@ -273,7 +273,7 @@ let f :title action:proc filter:deffilter file:deffile :multi :sync = begin fun () -> let files = List.map (Listbox.curselection filter_listbox) - fun:(fun x -> !current_dir ^ (Listbox.get filter_listbox index:x)) + f:(fun x -> !current_dir ^ (Listbox.get filter_listbox index:x)) in let files = if files = [] then [Textvariable.get selection_var] else files in @@ -294,7 +294,7 @@ let f :title action:proc filter:deffilter file:deffile :multi :sync = let action _ = let files = List.map (Listbox.curselection filter_listbox) - fun:(fun x -> !current_dir ^ (Listbox.get filter_listbox index:x)) + f:(fun x -> !current_dir ^ (Listbox.get filter_listbox index:x)) in activate files () in |