[latexila] Port to GtkSourceView 4



commit 597e56560910fe166849c5a51a7df3ba294c6c61
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Oct 26 17:14:02 2017 +0200

    Port to GtkSourceView 4
    
    GtkSourceView 4.0 will be released in March 2018.

 README                      |    4 ++--
 configure.ac                |    8 ++++----
 src/Makefile.am             |    4 ++--
 src/completion.vala         |    6 +++---
 src/liblatexila/Makefile.am |    4 ++--
 src/search.vala             |    6 +++---
 6 files changed, 16 insertions(+), 16 deletions(-)
---
diff --git a/README b/README
index cbcd12b..8ada680 100644
--- a/README
+++ b/README
@@ -17,8 +17,8 @@ Dependencies
 
 * GLib >= 2.50
 * GTK+ >= 3.22
-* GtkSourceView >= 3.24
-* Tepl >= 3.1.0 - https://wiki.gnome.org/Projects/Tepl
+* GtkSourceView >= 3.99.6
+* Tepl >= 3.99.0 - https://wiki.gnome.org/Projects/Tepl
 * gspell >= 1.0
 * gee-0.8 >= 0.10
 * gettext
diff --git a/configure.ac b/configure.ac
index 20d60ca..a441769 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,8 +31,8 @@ LT_INIT
 # Update also the --target-glib option in src/Makefile.am.
 GLIB_REQUIRED_VERSION="2.50"
 GTK_REQUIRED_VERSION="3.22"
-GTKSOURCEVIEW_REQUIRED_VERSION="3.24"
-TEPL_REQUIRED_VERSION="3.1.0"
+GTKSOURCEVIEW_REQUIRED_VERSION="3.99.6"
+TEPL_REQUIRED_VERSION="3.99.0"
 GSPELL_REQUIRED_VERSION="1.0"
 VALA_REQUIRED_VERSION="0.34"
 GEE_REQUIRED_VERSION="0.10"
@@ -94,8 +94,8 @@ PKG_CHECK_MODULES([LATEXILA], [
        glib-2.0 >= ${GLIB_REQUIRED_VERSION}
        gio-2.0 >= ${GLIB_REQUIRED_VERSION}
        gtk+-3.0 >= ${GTK_REQUIRED_VERSION}
-       gtksourceview-3.0 >= ${GTKSOURCEVIEW_REQUIRED_VERSION}
-       tepl-3 >= ${TEPL_REQUIRED_VERSION}
+       gtksourceview-4 >= ${GTKSOURCEVIEW_REQUIRED_VERSION}
+       tepl-4 >= ${TEPL_REQUIRED_VERSION}
        gspell-1 >= ${GSPELL_REQUIRED_VERSION}
        gee-0.8 >= ${GEE_REQUIRED_VERSION}
        gsettings-desktop-schemas
diff --git a/src/Makefile.am b/src/Makefile.am
index b916083..212316f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -7,8 +7,8 @@ bin_PROGRAMS = latexila
 AM_VALAFLAGS =                 \
        --disable-since-check   \
        --pkg gtk+-3.0          \
-       --pkg gtksourceview-3.0 \
-       --pkg Tepl-3            \
+       --pkg gtksourceview-4   \
+       --pkg Tepl-4            \
        --pkg gspell-1          \
        --pkg gee-0.8           \
        --pkg posix             \
diff --git a/src/completion.vala b/src/completion.vala
index 6580d68..2e61b22 100644
--- a/src/completion.vala
+++ b/src/completion.vala
@@ -275,7 +275,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
             else
                 pixbuf = _icon_choice;
 
-            SourceCompletionItem item = SourceCompletionItem.new2 ();
+            SourceCompletionItem item = new SourceCompletionItem ();
             item.set_label (choice.name);
             item.set_text (choice.name);
             item.set_icon (pixbuf);
@@ -330,7 +330,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
         // No match, show a message so the completion widget doesn't disappear.
         else
         {
-            SourceCompletionItem dummy_proposal = SourceCompletionItem.new2 ();
+            SourceCompletionItem dummy_proposal = new SourceCompletionItem ();
             dummy_proposal.set_label (_("No matching proposal"));
             dummy_proposal.set_text ("");
             filtered_proposals.prepend (dummy_proposal);
@@ -926,7 +926,7 @@ public class CompletionProvider : GLib.Object, SourceCompletionProvider
                 Gdk.Pixbuf pixbuf = _current_command.package != null
                     ? _icon_package_required : _icon_cmd;
 
-                SourceCompletionItem item = SourceCompletionItem.new2 ();
+                SourceCompletionItem item = new SourceCompletionItem ();
                 item.set_label (_current_command.name);
                 item.set_text (get_command_text_to_insert (_current_command));
                 item.set_icon (pixbuf);
diff --git a/src/liblatexila/Makefile.am b/src/liblatexila/Makefile.am
index 934bcad..c7e8932 100644
--- a/src/liblatexila/Makefile.am
+++ b/src/liblatexila/Makefile.am
@@ -104,7 +104,7 @@ INTROSPECTION_GIRS = Latexila.gir
 
 Latexila.gir: liblatexila.la
 Latexila_gir_NAMESPACE = Latexila
-Latexila_gir_INCLUDES = Gtk-3.0 GtkSource-3.0 Tepl-3
+Latexila_gir_INCLUDES = Gtk-3.0 GtkSource-4 Tepl-4
 Latexila_gir_LIBS = liblatexila.la
 Latexila_gir_FILES = $(liblatexila_la_SOURCES) $(nodist_liblatexila_la_SOURCES)
 Latexila_gir_SCANNERFLAGS = $(WARN_SCANNERFLAGS)
@@ -121,7 +121,7 @@ latexila.vapi: Latexila.gir
 
 VAPIGEN_VAPIS = latexila.vapi
 
-latexila_vapi_DEPS = gio-2.0 gtk+-3.0 gtksourceview-3.0 Tepl-3
+latexila_vapi_DEPS = gio-2.0 gtk+-3.0 gtksourceview-4 Tepl-4
 latexila_vapi_FILES = Latexila.gir
 
 noinst_DATA += latexila.vapi
diff --git a/src/search.vala b/src/search.vala
index 89ce04f..ed205f9 100644
--- a/src/search.vala
+++ b/src/search.vala
@@ -234,7 +234,7 @@ public class SearchAndReplace : GLib.Object
             Document doc = _search_context.get_buffer () as Document;
             doc.get_selection_bounds (out iter, null);
 
-            if (_search_context.backward2 (iter, out match_start, out match_end, null))
+            if (_search_context.backward (iter, out match_start, out match_end, null))
             {
                 doc.select_range (match_start, match_end);
                 doc.tab.view.scroll_to_cursor ();
@@ -504,7 +504,7 @@ public class SearchAndReplace : GLib.Object
         Document doc = _search_context.get_buffer () as Document;
         doc.get_selection_bounds (null, out iter);
 
-        if (_search_context.forward2 (iter, out match_start, out match_end, null))
+        if (_search_context.forward (iter, out match_start, out match_end, null))
         {
             doc.select_range (match_start, match_end);
             doc.tab.view.scroll_to_cursor ();
@@ -525,7 +525,7 @@ public class SearchAndReplace : GLib.Object
 
         try
         {
-            if (! _search_context.replace2 (match_start, match_end,
+            if (! _search_context.replace (match_start, match_end,
                 _entry_replace.text, -1))
                 search_forward ();
         }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]