libgedit-gtksourceview: update to 299.3.0.

This commit is contained in:
oreo639 2024-09-14 23:22:18 -07:00 committed by oreo639
parent 62fbf53e77
commit 726018eda9
4 changed files with 151 additions and 6 deletions

View File

@ -3728,7 +3728,7 @@ libyang.so.1 libyang-1.0r5_1
libhtp.so.2 libhtp-0.5.30_1
libgedit-47.so gedit-47.0_1
libgedit-amtk-5.so.0 libgedit-amtk-5.8.0_1
libgedit-gtksourceview-300.so.1 libgedit-gtksourceview-299.2.1_1
libgedit-gtksourceview-300.so.2 libgedit-gtksourceview-299.3.0_1
libgedit-gfls-1.so.0 libgedit-gfls-0.1.0_1
libgedit-tepl-6.so.0 libgedit-tepl-6.10.0_1
libchewing.so.3 libchewing-0.5.1_1

View File

@ -0,0 +1,37 @@
From 080c5422a932e01791f44753392e0d18abee0db8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Wilmet?= <swilmet@mailfence.com>
Date: Sat, 31 Aug 2024 17:59:29 +0200
Subject: [PATCH] Completion: fix a potential crash
---
gtksourceview/gtksourcecompletion.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gtksourceview/gtksourcecompletion.c b/gtksourceview/gtksourcecompletion.c
index ecd829b4a..b3813c92d 100644
--- a/gtksourceview/gtksourcecompletion.c
+++ b/gtksourceview/gtksourcecompletion.c
@@ -2028,7 +2028,7 @@ init_tree_view (GtkSourceCompletion *completion,
GtkTreeViewColumn *column;
GtkCellRenderer *cell_renderer;
GtkStyleContext *style_context;
- GdkRGBA *background_color;
+ GdkRGBA *background_color = NULL;
GdkRGBA foreground_color;
completion->priv->tree_view_proposals = GTK_TREE_VIEW (gtk_builder_get_object (builder, "tree_view_proposals"));
@@ -2147,7 +2147,10 @@ init_tree_view (GtkSourceCompletion *completion,
column,
0);
- gdk_rgba_free (background_color);
+ if (background_color != NULL)
+ {
+ gdk_rgba_free (background_color);
+ }
}
static void
--
GitLab

View File

@ -0,0 +1,108 @@
From 0f6179ec9b12fe416e7adbb5bec41267dbc58213 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Wilmet?= <swilmet@mailfence.com>
Date: Sat, 31 Aug 2024 19:10:18 +0200
Subject: [PATCH] StyleSchemeCss: more robust code for cursors CSS
Retrieving the background_color can fail.
---
gtksourceview/gtksourcestyleschemecss.c | 63 ++++++++++++++-----------
1 file changed, 36 insertions(+), 27 deletions(-)
diff --git a/gtksourceview/gtksourcestyleschemecss.c b/gtksourceview/gtksourcestyleschemecss.c
index 8e2e734cb..355e31b52 100644
--- a/gtksourceview/gtksourcestyleschemecss.c
+++ b/gtksourceview/gtksourcestyleschemecss.c
@@ -247,7 +247,6 @@ get_cursors_css (GtkSourceStyleScheme *scheme,
gboolean secondary_color_set;
GdkRGBA primary_color;
GdkRGBA secondary_color;
- gchar *secondary_color_str;
GString *css;
primary_color_set = get_style_foreground_color (scheme, "cursor", &primary_color);
@@ -258,23 +257,10 @@ get_cursors_css (GtkSourceStyleScheme *scheme,
return NULL;
}
- css = g_string_new ("textview text {\n");
-
- if (primary_color_set)
- {
- gchar *primary_color_str;
-
- primary_color_str = gdk_rgba_to_string (&primary_color);
- g_string_append_printf (css,
- "\tcaret-color: %s;\n",
- primary_color_str);
- g_free (primary_color_str);
- }
-
if (!secondary_color_set)
{
GtkStyleContext *context;
- GdkRGBA *background_color;
+ GdkRGBA *background_color = NULL;
g_assert (primary_color_set);
@@ -290,22 +276,45 @@ get_cursors_css (GtkSourceStyleScheme *scheme,
gtk_style_context_restore (context);
- /* Blend primary cursor color with background color. */
- secondary_color.red = (primary_color.red + background_color->red) * 0.5;
- secondary_color.green = (primary_color.green + background_color->green) * 0.5;
- secondary_color.blue = (primary_color.blue + background_color->blue) * 0.5;
- secondary_color.alpha = (primary_color.alpha + background_color->alpha) * 0.5;
+ if (background_color != NULL)
+ {
+ /* Blend primary cursor color with background color. */
+ secondary_color.red = (primary_color.red + background_color->red) * 0.5;
+ secondary_color.green = (primary_color.green + background_color->green) * 0.5;
+ secondary_color.blue = (primary_color.blue + background_color->blue) * 0.5;
+ secondary_color.alpha = (primary_color.alpha + background_color->alpha) * 0.5;
+
+ secondary_color_set = TRUE;
- gdk_rgba_free (background_color);
+ gdk_rgba_free (background_color);
+ }
}
- secondary_color_str = gdk_rgba_to_string (&secondary_color);
- g_string_append_printf (css,
- "\t-gtk-secondary-caret-color: %s;\n",
- secondary_color_str);
- g_free (secondary_color_str);
+ css = g_string_new ("textview text {\n");
+
+ if (primary_color_set)
+ {
+ gchar *primary_color_str;
+
+ primary_color_str = gdk_rgba_to_string (&primary_color);
+ g_string_append_printf (css,
+ "\tcaret-color: %s;\n",
+ primary_color_str);
+ g_free (primary_color_str);
+ }
+
+ if (secondary_color_set)
+ {
+ gchar *secondary_color_str;
+
+ secondary_color_str = gdk_rgba_to_string (&secondary_color);
+ g_string_append_printf (css,
+ "\t-gtk-secondary-caret-color: %s;\n",
+ secondary_color_str);
+ g_free (secondary_color_str);
+ }
- g_string_append_printf (css, "}\n");
+ g_string_append (css, "}\n");
return g_string_free (css, FALSE);
}
--
GitLab

View File

@ -1,6 +1,6 @@
# Template file for 'libgedit-gtksourceview'
pkgname=libgedit-gtksourceview
version=299.2.1
version=299.3.0
revision=1
build_helper="gir"
build_style=meson
@ -11,10 +11,10 @@ checkdepends="xvfb-run"
short_desc="Source code editing widget"
maintainer="Matt Boehlke <mtboehlke@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://gedit-technology.github.io"
changelog="https://raw.githubusercontent.com/gedit-technology/libgedit-gtksourceview/main/NEWS"
distfiles="https://github.com/gedit-technology/libgedit-gtksourceview/releases/download/${version}/libgedit-gtksourceview-${version}.tar.xz"
checksum=f94ea579636d73b4a783b9ec43d77bc9a43d4b633b3bf9ba9d7a011cadb5cb92
homepage="https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview"
changelog="https://gitlab.gnome.org/World/gedit/libgedit-gtksourceview/-/raw/main/NEWS"
distfiles="${GNOME_SITE}/libgedit-gtksourceview/${version%%.*}/libgedit-gtksourceview-${version}.tar.xz"
checksum=5ab049520010501e78ca4a19df96e2041412756ce90a3dde0a8a1ae6d88af052
make_check_pre="xvfb-run"
libgedit-gtksourceview-devel_package() {