#if GTK_CHECK_VERSION(2,14,0)
newBorder = gtk_border_new();
#else
- newBorder = new GtkBorder;
+ newBorder = g_slice_new0(GtkBorder);
#endif
// Use some reasonable defaults for initial margins
newBorder->left = 2;
gtk_entry_set_inner_border(entry, newBorder);
+#if GTK_CHECK_VERSION(2,14,0)
+ gtk_border_free(newBorder);
+#else
+ g_slice_free(GtkBorder, newBorder);
+#endif
+
return true;
#else
wxUnusedVar(margins);