summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2020-01-09 19:04:15 -0500
committerMatthias Clasen <mclasen@redhat.com>2020-01-09 19:04:15 -0500
commitd8c5e86b30c5ae5782afd46cd0723a69400f7437 (patch)
tree4f87b86a45270f4450d77ab81c2d374fe1bcb9f5
parent035f874ca4d8a2bb0389787adad2f89bc5dda4cd (diff)
downloadgtk+-activatable-infobar-3.tar.gz
gtk-demo: Use a default action in the infobars demoactivatable-infobar-3
This makes the question infobar activatable by clicking anywhere in it.
-rw-r--r--demos/gtk-demo/infobar.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/demos/gtk-demo/infobar.c b/demos/gtk-demo/infobar.c
index bca0e31152..b7a8bcae8c 100644
--- a/demos/gtk-demo/infobar.c
+++ b/demos/gtk-demo/infobar.c
@@ -97,6 +97,7 @@ do_infobar (GtkWidget *do_widget)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_label_set_xalign (GTK_LABEL (label), 0);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label, FALSE, FALSE, 0);
+ gtk_info_bar_set_default_response (GTK_INFO_BAR (bar), GTK_RESPONSE_OK);
button = gtk_toggle_button_new_with_label ("Question");
g_object_bind_property (button, "active", bar, "visible", G_BINDING_BIDIRECTIONAL);