[gtksourceview/wip/chergert/gsv-gtk4: 101/125] stylescheme: port to GTK 4 CSS API
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/chergert/gsv-gtk4: 101/125] stylescheme: port to GTK 4 CSS API
- Date: Wed, 15 Jan 2020 23:54:51 +0000 (UTC)
commit d439e5aa6201bdd61896d595fb3c9926c7b2dc33
Author: Christian Hergert <chergert redhat com>
Date: Wed Jan 15 14:44:17 2020 -0800
stylescheme: port to GTK 4 CSS API
- Adjust gtk_css_provider_load_from_data()
- Remove state flags usage
gtksourceview/gtksourcestylescheme.c | 22 +++-------------------
1 file changed, 3 insertions(+), 19 deletions(-)
---
diff --git a/gtksourceview/gtksourcestylescheme.c b/gtksourceview/gtksourcestylescheme.c
index 668585e6..fcc03dd7 100644
--- a/gtksourceview/gtksourcestylescheme.c
+++ b/gtksourceview/gtksourcestylescheme.c
@@ -740,7 +740,6 @@ get_cursors_css_style (GtkSourceStyleScheme *scheme,
gtk_style_context_set_state (context, GTK_STATE_FLAG_NORMAL);
gtk_style_context_get (context,
- gtk_style_context_get_state (context),
"background-color", &background_color,
NULL);
@@ -790,7 +789,7 @@ get_css_provider_cursors (GtkSourceStyleScheme *scheme,
provider = gtk_css_provider_new ();
- gtk_css_provider_load_from_data (provider, css, -1, &error);
+ gtk_css_provider_load_from_data (provider, css, -1);
g_free (css);
if (error != NULL)
@@ -826,11 +825,6 @@ _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme,
GTK_STYLE_PROVIDER (scheme->css_provider),
GTK_SOURCE_STYLE_PROVIDER_PRIORITY);
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- /* See https://bugzilla.gnome.org/show_bug.cgi?id=708583 */
- gtk_style_context_invalidate (context);
- G_GNUC_END_IGNORE_DEPRECATIONS;
-
/* The CssProvider for the cursors needs that the first provider is
* applied, to get the background color.
*/
@@ -845,10 +839,6 @@ _gtk_source_style_scheme_apply (GtkSourceStyleScheme *scheme,
gtk_style_context_add_provider (context,
GTK_STYLE_PROVIDER (scheme->css_provider_cursors),
GTK_SOURCE_STYLE_PROVIDER_PRIORITY);
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- gtk_style_context_invalidate (context);
- G_GNUC_END_IGNORE_DEPRECATIONS;
}
}
@@ -879,11 +869,6 @@ _gtk_source_style_scheme_unapply (GtkSourceStyleScheme *scheme,
gtk_style_context_remove_provider (context,
GTK_STYLE_PROVIDER (scheme->css_provider_cursors));
}
-
- G_GNUC_BEGIN_IGNORE_DEPRECATIONS;
- /* See https://bugzilla.gnome.org/show_bug.cgi?id=708583 */
- gtk_style_context_invalidate (context);
- G_GNUC_END_IGNORE_DEPRECATIONS;
}
/* --- PARSER ---------------------------------------------------------------- */
@@ -1001,9 +986,8 @@ generate_css_style (GtkSourceStyleScheme *scheme)
GError *error = NULL;
gtk_css_provider_load_from_data (scheme->css_provider,
- final_style->str,
- final_style->len,
- &error);
+ final_style->str,
+ final_style->len);
if (error != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]