[gtk/matthiasc/for-master] gtk-demo: Fix a problem with the dnd demo
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/matthiasc/for-master] gtk-demo: Fix a problem with the dnd demo
- Date: Thu, 14 May 2020 05:18:13 +0000 (UTC)
commit 7eaa10dd8edd0534b6a92fd3ef7c8b6a306b5029
Author: Matthias Clasen <mclasen redhat com>
Date: Thu May 14 01:16:56 2020 -0400
gtk-demo: Fix a problem with the dnd demo
When I move this into gtk-demo, I broke the hack
that ensures the GtkColorSwatch type is registered.
Bring it back.
demos/gtk-demo/dnd.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/demos/gtk-demo/dnd.c b/demos/gtk-demo/dnd.c
index a3445e774f..6583d82f60 100644
--- a/demos/gtk-demo/dnd.c
+++ b/demos/gtk-demo/dnd.c
@@ -419,6 +419,7 @@ do_dnd (GtkWidget *do_widget)
{
if (!window)
{
+ GtkWidget *button;
GtkWidget *sw;
GtkWidget *canvas;
GtkWidget *box, *box2, *box3;
@@ -431,7 +432,8 @@ do_dnd (GtkWidget *do_widget)
int i;
int x, y;
- g_type_ensure (GTK_TYPE_COLOR_BUTTON);
+ button = gtk_color_button_new ();
+ g_object_unref (g_object_ref_sink (button));
window = gtk_window_new ();
gtk_window_set_display (GTK_WINDOW (window),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]