second mouse button) used to paste locked text as locked text.
GUI GRAFICA
- - cut&paste stile "X": rimane la parte blu e lockata!
- integrare il famoso logo mancante (anche nell'About dialog)
- invertibilita' dell'inserimento automatico di alias: quando si torna
su bisognerebbe tornare su di un passo e non fare undo degli alias
- non chiudere transitivamente i moo ??
DONE
+- cut&paste stile "X": rimane la parte blu e lockata! -> CSC
- highlight degli errori di parsing nello script -> CSC
- quando si fa una locate nel cicbrowser viene mangiato un pezzo di testo
dalla finestra principale!!! -> CSC
self#main#hpaneScriptSequent#set_position script_w;
(* source_view *)
ignore(source_view#connect#after#paste_clipboard
- ~callback:(fun () -> (MatitaScript.instance ())#clean_dirty_lock))
+ ~callback:(fun () -> (MatitaScript.instance ())#clean_dirty_lock));
+ (* clean_locked is set to true only "during" a PRIMARY paste
+ operation (i.e. by clicking with the second mouse button) *)
+ let clean_locked = ref false in
+ ignore(source_view#event#connect#button_press
+ ~callback:
+ (fun button ->
+ if GdkEvent.Button.button button = 2 then
+ clean_locked := true;
+ false
+ ));
+ ignore(source_view#event#connect#button_release
+ ~callback:(fun button -> clean_locked := false; false));
+ ignore(source_view#buffer#connect#after#apply_tag
+ ~callback:(
+ fun tag ~start:_ ~stop:_ ->
+ if !clean_locked &&
+ tag#get_oid = (MatitaScript.instance ())#locked_tag#get_oid
+ then
+ begin
+ clean_locked := false;
+ (MatitaScript.instance ())#clean_dirty_lock;
+ clean_locked := true
+ end))
method loadScript file =
let script = MatitaScript.instance () in
val error_tag = buffer#create_tag [`UNDERLINE `SINGLE; `FOREGROUND "red"]
method locked_mark = locked_mark
+ method locked_tag = locked_tag
(* history can't be empty, the invariant above grant that it contains at
* least the init status *)
object
method locked_mark : Gtk.text_mark
+ method locked_tag : GText.tag
(** @return current status *)
method status: MatitaTypes.status