#include <gtk/gtk.h>

static void
row_activated_cb (GtkListBoxRow *row)
{
  g_message ("Row activated: %p", row);
}

int
main (int argc, char **argv)
{
  gtk_init (&argc, &argv);

  GtkWidget *win  = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  GtkWidget *list = gtk_list_box_new ();
  gtk_list_box_set_activate_on_single_click (GTK_LIST_BOX (list), TRUE);
  GtkWidget *label = gtk_label_new ("test test test test <a href=\"a\">Bar</a>");
  gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
  gtk_container_add (GTK_CONTAINER (list), label);
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));
  gtk_container_add (GTK_CONTAINER (list), gtk_label_new ("test2"));

  g_signal_connect (G_OBJECT (list), "row_activated", G_CALLBACK (row_activated_cb), NULL);


  gtk_container_add (GTK_CONTAINER (win), list);
  gtk_window_resize (GTK_WINDOW (win), 400, 400);
  gtk_widget_show_all (win);
  gtk_main ();
  return 0;
}
