Port to Gtksourceview4
This allows us access to some newer fixes since the older version is no longer being worked on. Fixes: https://github.com/linuxmint/xed/issues/395
This commit is contained in:
parent
22ddcc04e0
commit
3ca66d6fb6
|
@ -10,7 +10,7 @@ Build-Depends: debhelper (>= 9),
|
||||||
libglib2.0-dev,
|
libglib2.0-dev,
|
||||||
libgspell-1-dev,
|
libgspell-1-dev,
|
||||||
libgtk-3-dev,
|
libgtk-3-dev,
|
||||||
libgtksourceview-3.0-dev,
|
libgtksourceview-4-dev,
|
||||||
libpeas-dev,
|
libpeas-dev,
|
||||||
libxapp-dev,
|
libxapp-dev,
|
||||||
libsm-dev,
|
libsm-dev,
|
||||||
|
|
|
@ -29,10 +29,10 @@ glib = dependency('glib-2.0', version: '>= 2.40.0')
|
||||||
gthread = dependency('gthread-2.0', version: '>= 2.13.0')
|
gthread = dependency('gthread-2.0', version: '>= 2.13.0')
|
||||||
gio = dependency('gio-2.0', version: '>= 2.40.0')
|
gio = dependency('gio-2.0', version: '>= 2.40.0')
|
||||||
gtk = dependency('gtk+-3.0', version: '>= 3.19.3')
|
gtk = dependency('gtk+-3.0', version: '>= 3.19.3')
|
||||||
gtksourceview = dependency('gtksourceview-3.0', version: '>= 3.19.0')
|
gtksourceview = dependency('gtksourceview-4', version: '>= 4.6')
|
||||||
libpeas = dependency('libpeas-1.0', version: '>= 1.12.0')
|
libpeas = dependency('libpeas-1.0', version: '>= 1.12.0')
|
||||||
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.12.0')
|
libpeas_gtk = dependency('libpeas-gtk-1.0', version: '>= 1.12.0')
|
||||||
gir_dep = dependency('gobject-introspection-1.0', version: '>= 0.6.7', required: false)
|
gir_dep = dependency('gobject-introspection-1.0', version: '>= 1.42.0', required: false)
|
||||||
gmodule = dependency('gmodule-2.0')
|
gmodule = dependency('gmodule-2.0')
|
||||||
xapp = dependency('xapp', version: '>= 1.4.0')
|
xapp = dependency('xapp', version: '>= 1.4.0')
|
||||||
X11 = dependency('x11')
|
X11 = dependency('x11')
|
||||||
|
|
|
@ -173,7 +173,7 @@ gir = gnome.generate_gir(
|
||||||
sources: public_headers + libxed_sources + xed_enums + xed_marshal,
|
sources: public_headers + libxed_sources + xed_enums + xed_marshal,
|
||||||
identifier_prefix: 'Xed',
|
identifier_prefix: 'Xed',
|
||||||
symbol_prefix: 'xed',
|
symbol_prefix: 'xed',
|
||||||
includes: ['Gtk-3.0', 'GtkSource-3.0'],
|
includes: ['Gtk-3.0', 'GtkSource-4'],
|
||||||
install: true,
|
install: true,
|
||||||
install_dir_typelib: join_paths(libdir, 'xed', 'girepository-1.0'),
|
install_dir_typelib: join_paths(libdir, 'xed', 'girepository-1.0'),
|
||||||
install_dir_gir: join_paths(datadir, 'xed', 'gir-1.0')
|
install_dir_gir: join_paths(datadir, 'xed', 'gir-1.0')
|
||||||
|
@ -186,7 +186,7 @@ pkgconfig.generate(
|
||||||
version: meson.project_version(),
|
version: meson.project_version(),
|
||||||
libraries: libxed,
|
libraries: libxed,
|
||||||
requires: [
|
requires: [
|
||||||
'gtksourceview-3.0',
|
'gtksourceview-4',
|
||||||
'libpeas-1.0',
|
'libpeas-1.0',
|
||||||
'libpeas-gtk-1.0'
|
'libpeas-gtk-1.0'
|
||||||
],
|
],
|
||||||
|
|
|
@ -136,7 +136,7 @@ forward_search_finished (GtkSourceSearchContext *search_context,
|
||||||
GtkTextIter match_start;
|
GtkTextIter match_start;
|
||||||
GtkTextIter match_end;
|
GtkTextIter match_end;
|
||||||
|
|
||||||
found = gtk_source_search_context_forward_finish2 (search_context, result, &match_start, &match_end, NULL, NULL);
|
found = gtk_source_search_context_forward_finish (search_context, result, &match_start, &match_end, NULL, NULL);
|
||||||
buffer = gtk_source_search_context_get_buffer (search_context);
|
buffer = gtk_source_search_context_get_buffer (search_context);
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
|
@ -210,7 +210,7 @@ backward_search_finished (GtkSourceSearchContext *search_context,
|
||||||
GtkTextIter match_end;
|
GtkTextIter match_end;
|
||||||
GtkSourceBuffer *buffer;
|
GtkSourceBuffer *buffer;
|
||||||
|
|
||||||
found = gtk_source_search_context_backward_finish2 (search_context, result, &match_start, &match_end, NULL, NULL);
|
found = gtk_source_search_context_backward_finish (search_context, result, &match_start, &match_end, NULL, NULL);
|
||||||
buffer = gtk_source_search_context_get_buffer (search_context);
|
buffer = gtk_source_search_context_get_buffer (search_context);
|
||||||
|
|
||||||
if (found)
|
if (found)
|
||||||
|
@ -479,7 +479,7 @@ do_replace (XedSearchbar *searchbar)
|
||||||
gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (doc), &start, &end);
|
gtk_text_buffer_get_selection_bounds (GTK_TEXT_BUFFER (doc), &start, &end);
|
||||||
searchbar->priv->search_mode = XED_SEARCH_MODE_REPLACE;
|
searchbar->priv->search_mode = XED_SEARCH_MODE_REPLACE;
|
||||||
|
|
||||||
gtk_source_search_context_replace2 (search_context,
|
gtk_source_search_context_replace (search_context,
|
||||||
&start,
|
&start,
|
||||||
&end,
|
&end,
|
||||||
unescaped_replace_text,
|
unescaped_replace_text,
|
||||||
|
|
Loading…
Reference in New Issue