testgrid.c 15.5 KB
Newer Older
Matthias Clasen's avatar
Matthias Clasen committed
1 2 3 4 5 6 7
#include <gtk/gtk.h>

static GtkWidget *
oriented_test_widget (const gchar *label, const gchar *color, gdouble angle)
{
  GtkWidget *box;
  GtkWidget *widget;
8 9
  GtkCssProvider *provider;
  gchar *data;
Matthias Clasen's avatar
Matthias Clasen committed
10 11 12 13

  widget = gtk_label_new (label);
  gtk_label_set_angle (GTK_LABEL (widget), angle);
  box = gtk_event_box_new ();
14 15 16 17 18 19 20 21
  provider = gtk_css_provider_new ();
  data = g_strdup_printf ("GtkEventBox { background-color: %s; }", color);
  gtk_css_provider_load_from_data (provider, data, -1, NULL);
  gtk_style_context_add_provider (gtk_widget_get_style_context (box),
                                  GTK_STYLE_PROVIDER (provider),
                                  GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
  g_free (data);
  g_object_unref (provider);
Matthias Clasen's avatar
Matthias Clasen committed
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
  gtk_container_add (GTK_CONTAINER (box), widget);

  return box;
}

static GtkWidget *
test_widget (const gchar *label, const gchar *color)
{
  return oriented_test_widget (label, color, 0.0);
}

static GtkOrientation o;

static gboolean
toggle_orientation (GtkWidget *window, GdkEventButton *event, GtkGrid *grid)
{
  o = 1 - o;

  gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), o);

  return FALSE;
}

static void
simple_grid (void)
{
  GtkWidget *window;
  GtkWidget *grid;
50
  GtkWidget *test1, *test2, *test3, *test4, *test5, *test6;
Matthias Clasen's avatar
Matthias Clasen committed
51 52 53 54 55 56 57 58 59

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Orientation");
  grid = gtk_grid_new ();
  gtk_container_add (GTK_CONTAINER (window), grid);
  g_signal_connect (window, "button-press-event", G_CALLBACK (toggle_orientation), grid);

  gtk_grid_set_column_spacing (GTK_GRID (grid), 5);
  gtk_grid_set_row_spacing (GTK_GRID (grid), 5);
60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
  test1 = test_widget ("1", "red");
  gtk_container_add (GTK_CONTAINER (grid), test1);
  test2 = test_widget ("2", "green");
  gtk_container_add (GTK_CONTAINER (grid), test2);
  test3 = test_widget ("3", "blue");
  gtk_container_add (GTK_CONTAINER (grid), test3);
  test4 = test_widget ("4", "green");
  gtk_grid_attach (GTK_GRID (grid), test4, 0, 1, 1, 1);
  gtk_widget_set_vexpand (test4, TRUE);
  test5 = test_widget ("5", "blue");
  gtk_grid_attach_next_to (GTK_GRID (grid), test5, test4, GTK_POS_RIGHT, 2, 1);
  test6 = test_widget ("6", "yellow");
  gtk_grid_attach (GTK_GRID (grid), test6, -1, 0, 1, 2);
  gtk_widget_set_hexpand (test6, TRUE);

  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), 0, -1) == NULL);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), 0, 0) == test1);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), 1, 0) == test2);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), 0, 1) == test4);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), -1, 0) == test6);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), -1, 1) == test6);
  g_assert (gtk_grid_get_child_at (GTK_GRID (grid), -1, 2) == NULL);
Matthias Clasen's avatar
Matthias Clasen committed
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
  gtk_widget_show_all (window);
}

static void
text_grid (void)
{
  GtkWidget *window;
  GtkWidget *grid;
  GtkWidget *paned1;
  GtkWidget *box;
  GtkWidget *label;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Height-for-Width");
  paned1 = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
  gtk_container_add (GTK_CONTAINER (window), paned1);

99
  box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
Matthias Clasen's avatar
Matthias Clasen committed
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
  gtk_paned_pack1 (GTK_PANED (paned1), box, TRUE, FALSE);
  gtk_paned_pack2 (GTK_PANED (paned1), gtk_label_new ("Space"), TRUE, FALSE);

  grid = gtk_grid_new ();
  gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
  gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("Above"));
  gtk_container_add (GTK_CONTAINER (box), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
  gtk_container_add (GTK_CONTAINER (box), grid);
  gtk_container_add (GTK_CONTAINER (box), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
  gtk_container_add (GTK_CONTAINER (box), gtk_label_new ("Below"));

  label = gtk_label_new ("Some text that may wrap if it has to");
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
  gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("1", "red"), 1, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("2", "blue"), 0, 1, 1, 1);

  label = gtk_label_new ("Some text that may wrap if it has to");
  gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_grid_attach (GTK_GRID (grid), label, 1, 1, 1, 1);

  gtk_widget_show_all (window);
}

static void
box_comparison (void)
{
  GtkWidget *window;
  GtkWidget *vbox;
  GtkWidget *box;
  GtkWidget *label;
  GtkWidget *grid;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Grid vs. Box");
138
  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
Matthias Clasen's avatar
Matthias Clasen committed
139 140 141 142 143
  gtk_container_add (GTK_CONTAINER (window), vbox);

  gtk_container_add (GTK_CONTAINER (vbox), gtk_label_new ("Above"));
  gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));

144
  box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
Matthias Clasen's avatar
Matthias Clasen committed
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219
  gtk_container_add (GTK_CONTAINER (vbox), box);

  gtk_box_pack_start (GTK_BOX (box), test_widget ("1", "white"), FALSE, FALSE, 0);

  label = gtk_label_new ("Some ellipsizing text");
  gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);

  gtk_box_pack_start (GTK_BOX (box), test_widget ("2", "green"), FALSE, FALSE, 0);

  label = gtk_label_new ("Some text that may wrap if needed");
  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);

  gtk_box_pack_start (GTK_BOX (box), test_widget ("3", "red"), FALSE, FALSE, 0);

  grid = gtk_grid_new ();
  gtk_orientable_set_orientation (GTK_ORIENTABLE (grid), GTK_ORIENTATION_VERTICAL);
  gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
  gtk_container_add (GTK_CONTAINER (vbox), grid);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("1", "white"), 0, 0, 1, 1);

  label = gtk_label_new ("Some ellipsizing text");
  gtk_label_set_ellipsize (GTK_LABEL (label), PANGO_ELLIPSIZE_END);
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_grid_attach (GTK_GRID (grid), label, 1, 0, 1, 1);
  gtk_widget_set_hexpand (label, TRUE);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("2", "green"), 2, 0, 1, 1);

  label = gtk_label_new ("Some text that may wrap if needed");
  gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
  gtk_label_set_width_chars (GTK_LABEL (label), 10);
  gtk_grid_attach (GTK_GRID (grid), label, 3, 0, 1, 1);
  gtk_widget_set_hexpand (label, TRUE);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("3", "red"), 4, 0, 1, 1);

  gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
  gtk_container_add (GTK_CONTAINER (vbox), gtk_label_new ("Below"));

  gtk_widget_show_all (window);
}

static void
empty_line (void)
{
  GtkWidget *window;
  GtkWidget *grid;
  GtkWidget *child;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Empty row");
  grid = gtk_grid_new ();
  gtk_container_add (GTK_CONTAINER (window), grid);

  gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);

  child = test_widget ("(0, 0)", "red");
  gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
  gtk_widget_set_hexpand (child, TRUE);
  gtk_widget_set_vexpand (child, TRUE);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 1)", "blue"), 0, 1, 1, 1);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("(10, 0)", "green"), 10, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(10, 1)", "magenta"), 10, 1, 1, 1);

  gtk_widget_show_all (window);
}

220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244
static void
empty_grid (void)
{
  GtkWidget *window;
  GtkWidget *grid;
  GtkWidget *child;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Empty grid");
  grid = gtk_grid_new ();
  gtk_container_add (GTK_CONTAINER (window), grid);

  gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
  gtk_grid_set_column_spacing (GTK_GRID (grid), 10);
  gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);

  child = test_widget ("(0, 0)", "red");
  gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
  gtk_widget_set_hexpand (child, TRUE);
  gtk_widget_set_vexpand (child, TRUE);

  gtk_widget_show_all (window);
  gtk_widget_hide (child);
}

Matthias Clasen's avatar
Matthias Clasen committed
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292
static void
scrolling (void)
{
  GtkWidget *window;
  GtkWidget *sw;
  GtkWidget *viewport;
  GtkWidget *grid;
  GtkWidget *child;
  gint i;

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Scrolling");
  sw = gtk_scrolled_window_new (NULL, NULL);
  viewport = gtk_viewport_new (NULL, NULL);
  grid = gtk_grid_new ();

  gtk_container_add (GTK_CONTAINER (window), sw);
  gtk_container_add (GTK_CONTAINER (sw), viewport);
  gtk_container_add (GTK_CONTAINER (viewport), grid);

  child = oriented_test_widget ("#800080", "#800080", -45.0);
  gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
  gtk_widget_set_hexpand (child, TRUE);
  gtk_widget_set_vexpand (child, TRUE);

  for (i = 1; i < 16; i++)
    {
      gchar *color;
      color = g_strdup_printf ("#%02x00%02x", 128 + 8*i, 128 - 8*i);
      child = test_widget (color, color);
      gtk_grid_attach (GTK_GRID (grid), child, 0, i, i + 1, 1);
      gtk_widget_set_hexpand (child, TRUE);
      g_free (color);
    }

  for (i = 1; i < 16; i++)
    {
      gchar *color;
      color = g_strdup_printf ("#%02x00%02x", 128 - 8*i, 128 + 8*i);
      child = oriented_test_widget (color, color, -90.0);
      gtk_grid_attach (GTK_GRID (grid), child, i, 0, 1, i);
      gtk_widget_set_vexpand (child, TRUE);
      g_free (color);
    }

  gtk_widget_show_all (window);
}

293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
static void
insert_cb (GtkButton *button, GtkWidget *window)
{
  GtkGrid *g, *g1, *g2, *g3, *g4;
  GtkWidget *child;
  gboolean inserted;

  g = GTK_GRID (gtk_bin_get_child (GTK_BIN (window)));
  g1 = GTK_GRID (gtk_grid_get_child_at (g, 0, 0));
  g2 = GTK_GRID (gtk_grid_get_child_at (g, 1, 0));
  g3 = GTK_GRID (gtk_grid_get_child_at (g, 0, 1));
  g4 = GTK_GRID (gtk_grid_get_child_at (g, 1, 1));

  inserted = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (button), "inserted"));

  if (inserted)
    {
      gtk_grid_remove_row (g1, 1);
      gtk_grid_remove_column (g2, 1);
      gtk_grid_remove_row (g3, 1);
      gtk_grid_remove_column (g4, 1);
    }
  else
    {
      gtk_grid_insert_row (g1, 1);
      gtk_grid_attach (g1, test_widget ("(0, 1)", "red"), 0, 1, 1, 1);
      gtk_grid_attach (g1, test_widget ("(2, 1)", "red"), 2, 1, 1, 1);

      gtk_grid_insert_column (g2, 1);
      gtk_grid_attach (g2, test_widget ("(1, 0)", "red"), 1, 0, 1, 1);
      gtk_grid_attach (g2, test_widget ("(1, 2)", "red"), 1, 2, 1, 1);

      child = gtk_grid_get_child_at (g3, 0, 0);
      gtk_grid_insert_next_to (g3, child, GTK_POS_BOTTOM);
      gtk_grid_attach (g3, test_widget ("(0, 1)", "red"), 0, 1, 1, 1);
      gtk_grid_attach (g3, test_widget ("(2, 1)", "red"), 2, 1, 1, 1);

      child = gtk_grid_get_child_at (g4, 0, 0);
      gtk_grid_insert_next_to (g4, child, GTK_POS_RIGHT);
      gtk_grid_attach (g4, test_widget ("(1, 0)", "red"), 1, 0, 1, 1);
      gtk_grid_attach (g4, test_widget ("(1, 2)", "red"), 1, 2, 1, 1);

      gtk_widget_show_all (GTK_WIDGET (g));
    }

  gtk_button_set_label (button, inserted ? "Insert" : "Remove");
  g_object_set_data (G_OBJECT (button), "inserted", GINT_TO_POINTER (!inserted));
}

342 343 344 345 346 347 348
static void
insert (void)
{
  GtkWidget *window;
  GtkWidget *g;
  GtkWidget *grid;
  GtkWidget *child;
349
  GtkWidget *button;
350 351

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
352
  gtk_window_set_title (GTK_WINDOW (window), "Insertion / Removal");
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396

  g = gtk_grid_new ();
  gtk_grid_set_row_spacing (GTK_GRID (g), 10);
  gtk_grid_set_column_spacing (GTK_GRID (g), 10);
  gtk_container_add (GTK_CONTAINER (window), g);

  grid = gtk_grid_new ();
  gtk_grid_attach (GTK_GRID (g), grid, 0, 0, 1, 1);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 0)", "blue"), 0, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 1)", "blue"), 0, 1, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 0)", "green"), 1, 0, 1, 2);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(2, 0)", "yellow"), 2, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(2, 1)", "yellow"), 2, 1, 1, 1);

  grid = gtk_grid_new ();
  gtk_grid_attach (GTK_GRID (g), grid, 1, 0, 1, 1);

  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 0)", "blue"), 0, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 0)", "blue"), 1, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 1)", "green"), 0, 1, 2, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 2)", "yellow"), 0, 2, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 2)", "yellow"), 1, 2, 1, 1);

  grid = gtk_grid_new ();
  gtk_grid_attach (GTK_GRID (g), grid, 0, 1, 1, 1);

  child = test_widget ("(0, 0)", "blue");
  gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 1)", "blue"), 0, 1, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 0)", "green"), 1, 0, 1, 2);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(2, 0)", "yellow"), 2, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(2, 1)", "yellow"), 2, 1, 1, 1);

  grid = gtk_grid_new ();
  gtk_grid_attach (GTK_GRID (g), grid, 1, 1, 1, 1);

  child = test_widget ("(0, 0)", "blue");
  gtk_grid_attach (GTK_GRID (grid), child, 0, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 0)", "blue"), 1, 0, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 1)", "green"), 0, 1, 2, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(0, 2)", "yellow"), 0, 2, 1, 1);
  gtk_grid_attach (GTK_GRID (grid), test_widget ("(1, 2)", "yellow"), 1, 2, 1, 1);

397 398 399
  button = gtk_button_new_with_label ("Insert");
  g_signal_connect (button, "clicked", G_CALLBACK (insert_cb), window);
  gtk_grid_attach (GTK_GRID (g), button, 0, 2, 2, 1);
400 401 402 403

  gtk_widget_show_all (window);
}

404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452
static void
spanning_grid (void)
{
  GtkWidget *window;
  GtkWidget *g;
  GtkWidget *c;

  /* inspired by bug 698660
   * the row/column that are empty except for the spanning
   * child need to stay collapsed
   */

  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_title (GTK_WINDOW (window), "Spanning");

  g = gtk_grid_new ();
  gtk_container_add (GTK_CONTAINER (window), g);

  c = test_widget ("0", "blue");
  gtk_widget_set_hexpand (c, TRUE);
  gtk_grid_attach (GTK_GRID (g), c, 0, 4, 4, 1);

  c = test_widget ("1", "green");
  gtk_widget_set_vexpand (c, TRUE);
  gtk_grid_attach (GTK_GRID (g), c, 4, 0, 1, 4);

  c = test_widget ("2", "red");
  gtk_widget_set_hexpand (c, TRUE);
  gtk_widget_set_vexpand (c, TRUE);
  gtk_grid_attach (GTK_GRID (g), c, 3, 3, 1, 1);

  c = test_widget ("3", "yellow");
  gtk_grid_attach (GTK_GRID (g), c, 0, 3, 2, 1);

  c = test_widget ("4", "orange");
  gtk_grid_attach (GTK_GRID (g), c, 3, 0, 1, 2);

  c = test_widget ("5", "purple");
  gtk_grid_attach (GTK_GRID (g), c, 1, 1, 1, 1);

  c = test_widget ("6", "white");
  gtk_grid_attach (GTK_GRID (g), c, 0, 1, 1, 1);

  c = test_widget ("7", "cyan");
  gtk_grid_attach (GTK_GRID (g), c, 1, 0, 1, 1);

  gtk_widget_show_all (window);
}

Matthias Clasen's avatar
Matthias Clasen committed
453 454 455 456 457
int
main (int argc, char *argv[])
{
  gtk_init (NULL, NULL);

458 459 460
  if (g_getenv ("RTL"))
    gtk_widget_set_default_direction (GTK_TEXT_DIR_RTL);

Matthias Clasen's avatar
Matthias Clasen committed
461 462 463 464 465
  simple_grid ();
  text_grid ();
  box_comparison ();
  empty_line ();
  scrolling ();
466
  insert ();
467
  empty_grid ();
468
  spanning_grid ();
Matthias Clasen's avatar
Matthias Clasen committed
469 470 471 472 473

  gtk_main ();

  return 0;
}