[gtk/macos-ci: 1777/1778] gtk-demo: Use a scope for callbacks
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/macos-ci: 1777/1778] gtk-demo: Use a scope for callbacks
- Date: Thu, 6 May 2021 02:01:39 +0000 (UTC)
commit 725edc648590ababa11c6708e75fa4bc4262dd73
Author: Matthias Clasen <mclasen redhat com>
Date: Wed May 5 08:16:29 2021 -0400
gtk-demo: Use a scope for callbacks
This should fix the demo not working on some Windows
builds.
demos/gtk-demo/font_features.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/font_features.c b/demos/gtk-demo/font_features.c
index c8f9ebf62a..8f5754a412 100644
--- a/demos/gtk-demo/font_features.c
+++ b/demos/gtk-demo/font_features.c
@@ -1236,11 +1236,17 @@ do_font_features (GtkWidget *do_widget)
if (!window)
{
+ GtkBuilderScope *scope;
GtkBuilder *builder;
GtkWidget *feature_list;
GtkEventController *controller;
- builder = gtk_builder_new_from_resource ("/font_features/font-features.ui");
+ scope = gtk_builder_cscope_new ();
+ gtk_builder_cscope_add_callback_symbol (GTK_BUILDER_CSCOPE (scope),
+ "font_features_reset_features", font_features_reset_features);
+ builder = gtk_builder_new ();
+ gtk_builder_set_scope (builder, scope);
+ gtk_builder_add_from_resource (builder, "/font_features/font-features.ui", NULL);
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
feature_list = GTK_WIDGET (gtk_builder_get_object (builder, "feature_list"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]