GtkTreeStore *store;
gint i;
GType *t;
- volatile GType dummy; /* G_GNUC_CONST makes the optimizer remove
- * get_type calls if you don't do something
- * like this
- */
/* Make the tree more interesting */
- dummy = gtk_scrolled_window_get_type ();
- dummy = gtk_label_get_type ();
- dummy = gtk_hscrollbar_get_type ();
- dummy = gtk_vscrollbar_get_type ();
- dummy = pango_layout_get_type ();
+ /* - we need this magic here so we are sure the type ends up being
+ * registered and gcc doesn't optimize away the code */
+ g_type_class_unref (g_type_class_ref (gtk_scrolled_window_get_type ()));
+ g_type_class_unref (g_type_class_ref (gtk_label_get_type ()));
+ g_type_class_unref (g_type_class_ref (gtk_hscrollbar_get_type ()));
+ g_type_class_unref (g_type_class_ref (gtk_vscrollbar_get_type ()));
+ g_type_class_unref (g_type_class_ref (pango_layout_get_type ()));
t = get_model_types ();