From 732ffd3b5cb77cbacb60b95c1d52d3b63bd56c3b Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Tue, 1 Dec 2009 23:19:11 +0000 Subject: [PATCH] porting to lablgtk2 >= 2.14 and releasing --- helm/software/configure.ac | 4 +-- helm/software/matita/dist/ChangeLog | 3 ++- helm/software/matita/matitaGui.ml | 33 +++++++++++++++---------- helm/software/matita/matitaGuiTypes.mli | 2 +- helm/software/matita/matitaMathView.ml | 2 +- helm/software/matita/matitaScript.ml | 2 +- helm/software/matita/matitaScript.mli | 2 +- 7 files changed, 28 insertions(+), 20 deletions(-) diff --git a/helm/software/configure.ac b/helm/software/configure.ac index e70b95a63..9fe6c7581 100644 --- a/helm/software/configure.ac +++ b/helm/software/configure.ac @@ -62,7 +62,7 @@ expat \ gdome2 \ http \ lablgtk2 \ -lablgtksourceview.gtksourceview \ +lablgtksourceview2.gtksourceview2 \ lablgtkmathview \ mysql \ netstring \ @@ -96,7 +96,7 @@ FINDLIB_REQUIRES="\ $FINDLIB_CREQUIRES \ lablgtk2.glade \ lablgtkmathview \ -lablgtksourceview.gtksourceview \ +lablgtksourceview2.gtksourceview2 \ helm-xmldiff \ " for r in $FINDLIB_LIBSREQUIRES $FINDLIB_REQUIRES diff --git a/helm/software/matita/dist/ChangeLog b/helm/software/matita/dist/ChangeLog index f00f59e57..a0a1c51a9 100644 --- a/helm/software/matita/dist/ChangeLog +++ b/helm/software/matita/dist/ChangeLog @@ -1,4 +1,4 @@ -0.5.8 - ... - toward the 1.x series +0.5.8 - 02/12/2009 - toward the 1.x series * Complete rewriting of paramodulation code (thanks to Maxime Denes), that is abstract over the data type embedded in the fisrt order theory the procedure is able to handle. @@ -31,6 +31,7 @@ they are in a standard path * including a file of the standard library triggers its compilation in the user's space + * gtksourceview2 based text widget (lablgtk >= 2.14) 0.5.7 - 15/02/2009 - Pàdoa release * are_convertible bug solved, arguments of application where diff --git a/helm/software/matita/matitaGui.ml b/helm/software/matita/matitaGui.ml index e47b1b713..9459c86ca 100644 --- a/helm/software/matita/matitaGui.ml +++ b/helm/software/matita/matitaGui.ml @@ -205,7 +205,7 @@ class interpErrorModel = exception UseLibrary;; let rec interactive_error_interp ~all_passes - (source_buffer:GSourceView.source_buffer) notify_exn offset errorll filename + (source_buffer:GSourceView2.source_buffer) notify_exn offset errorll filename = (* hook to save a script for each disambiguation error *) if false then @@ -374,12 +374,12 @@ class gui () = [ main#mainWinEventBox ] in let console = new console ~buffer:main#logTextView#buffer () in - let (source_view: GSourceView.source_view) = - GSourceView.source_view + let (source_view: GSourceView2.source_view) = + GSourceView2.source_view ~auto_indent:true - ~insert_spaces_instead_of_tabs:true ~tabs_width:2 - ~margin:80 ~show_margin:true - ~smart_home_end:true + ~insert_spaces_instead_of_tabs:true ~tab_width:2 + ~right_margin_position:80 ~show_right_margin:true + ~smart_home_end:`AFTER ~packing:main#scriptScrolledWin#add () in @@ -575,11 +575,15 @@ class gui () = source_view#misc#grab_focus () in connect_menu_item main#undoMenuItem safe_undo; +(*CSC: XXX ignore(source_view#source_buffer#connect#can_undo ~callback:main#undoMenuItem#misc#set_sensitive); +*) main#undoMenuItem#misc#set_sensitive true; connect_menu_item main#redoMenuItem safe_redo; +(*CSC: XXX ignore(source_view#source_buffer#connect#can_redo ~callback:main#redoMenuItem#misc#set_sensitive); +*) main#redoMenuItem#misc#set_sensitive true; ignore(source_view#connect#after#populate_popup ~callback:(fun pre_menu -> let menu = new GMenu.menu pre_menu in @@ -883,13 +887,16 @@ class gui () = else raise exn); (* script *) let _ = - match GSourceView.source_language_from_file BuildTimeConf.lang_file with + let source_language_manager = + GSourceView2.source_language_manager ~default:true in + source_language_manager#set_search_path[BuildTimeConf.runtime_base_dir]; + match source_language_manager#language "grafite" with | None -> - HLog.warn (sprintf "can't load language file %s" - BuildTimeConf.lang_file) - | Some matita_lang -> + HLog.warn(sprintf "can't load a language file for \"grafite\" in %s" + BuildTimeConf.runtime_base_dir) + | Some x as matita_lang -> source_buffer#set_language matita_lang; - source_buffer#set_highlight true + source_buffer#set_highlight_syntax true in let disableSave () = (s())#assignFileName None; @@ -1289,8 +1296,8 @@ class gui () = self#main#saveMenuItem#misc#set_sensitive true method console = console - method sourceView: GSourceView.source_view = - (source_view: GSourceView.source_view) + method sourceView: GSourceView2.source_view = + (source_view: GSourceView2.source_view) method fileSel = fileSel method findRepl = findRepl method main = main diff --git a/helm/software/matita/matitaGuiTypes.mli b/helm/software/matita/matitaGuiTypes.mli index f2376406a..d25735d4a 100644 --- a/helm/software/matita/matitaGuiTypes.mli +++ b/helm/software/matita/matitaGuiTypes.mli @@ -52,7 +52,7 @@ object (* method toolbar : MatitaGeneratedGui.toolBarWin *) method console: console - method sourceView: GSourceView.source_view + method sourceView: GSourceView2.source_view (** {2 Dialogs instantiation} * methods below create a new window on each invocation. You should diff --git a/helm/software/matita/matitaMathView.ml b/helm/software/matita/matitaMathView.ml index d674498cf..71e7cb553 100644 --- a/helm/software/matita/matitaMathView.ml +++ b/helm/software/matita/matitaMathView.ml @@ -981,7 +981,7 @@ class cicBrowser_impl ~(history:MatitaTypes.mathViewer_entry MatitaMisc.history) combo#set_active (aux 0 queries); in let searchText = - GSourceView.source_view ~auto_indent:false ~editable:false () + GSourceView2.source_view ~auto_indent:false ~editable:false () in let _ = win#scrolledwinContent#add (searchText :> GObj.widget); diff --git a/helm/software/matita/matitaScript.ml b/helm/software/matita/matitaScript.ml index 3f354ab62..2186b75b5 100644 --- a/helm/software/matita/matitaScript.ml +++ b/helm/software/matita/matitaScript.ml @@ -691,7 +691,7 @@ let fresh_script_id = let i = ref 0 in fun () -> incr i; !i -class script ~(source_view: GSourceView.source_view) +class script ~(source_view: GSourceView2.source_view) ~(mathviewer: MatitaTypes.mathViewer) ~set_star ~ask_confirmation diff --git a/helm/software/matita/matitaScript.mli b/helm/software/matita/matitaScript.mli index a07735333..e1369617d 100644 --- a/helm/software/matita/matitaScript.mli +++ b/helm/software/matita/matitaScript.mli @@ -90,7 +90,7 @@ end (** @param set_star callback used to set the modified symbol (usually a star * "*") on the side of a script name *) val script: - source_view:GSourceView.source_view -> + source_view:GSourceView2.source_view -> mathviewer: MatitaTypes.mathViewer-> urichooser: (UriManager.uri list -> UriManager.uri list) -> ask_confirmation: -- 2.39.2