Index: xfrun/xfrun-dialog.c =================================================================== --- xfrun/xfrun-dialog.c (revision 22562) +++ xfrun/xfrun-dialog.c (working copy) @@ -42,6 +42,8 @@ #define BORDER 8 #define MAX_ENTRIES 20 +#define NETK_APPLICATION_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), XFRUN_TYPE_DIALOG, XfrunDialogPrivate)) + struct _XfrunDialogPrivate { GtkWidget *entry; @@ -115,6 +117,7 @@ static void xfrun_setup_entry_completion(XfrunDialog *dialog); static GtkTreeModel *xfrun_create_completion_model(XfrunDialog *dialog); +static GObjectClass *parent_class; guint __signals[N_SIGS] = { 0, }; @@ -127,6 +130,10 @@ GObjectClass *gobject_class = (GObjectClass *)klass; GtkWidgetClass *widget_class = (GtkWidgetClass *)klass; + g_type_class_add_private(klass, sizeof(XfrunDialogPrivate)); + + parent_class = g_type_class_peek_parent(klass); + gobject_class->set_property = xfrun_dialog_set_property; gobject_class->get_property = xfrun_dialog_get_property; gobject_class->finalize = xfrun_dialog_finalize; @@ -164,7 +171,7 @@ GtkTreeIter itr; gchar *first_item = NULL; - dialog->priv = g_new0(XfrunDialogPrivate, 1); + dialog->priv = NETK_APPLICATION_GET_PRIVATE(dialog); GTK_WINDOW(dialog)->type = GTK_WINDOW_TOPLEVEL; gtk_widget_set_size_request(GTK_WIDGET(dialog), 400, -1); @@ -295,7 +302,7 @@ if(dialog->priv->completion_model) g_object_unref(G_OBJECT(dialog->priv->completion_model)); - g_free(dialog->priv); + G_OBJECT_CLASS(parent_class)->finalize (object); } static gboolean