if (var_sheet->dict)
g_object_unref (var_sheet->dict);
+ if (var_sheet->uim)
+ g_object_unref (var_sheet->uim);
/* These dialogs are not GObjects (although they should be!)
But for now, unreffing them only causes a GCritical Error
obj->container = NULL;
obj->dispose_has_run = FALSE;
+ obj->uim = NULL;
pspp_sheet_view_append_column (sheet_view, make_row_number_column (obj));
GtkUIManager *
psppire_var_sheet_get_ui_manager (PsppireVarSheet *var_sheet)
{
- return GTK_UI_MANAGER (get_object_assert (var_sheet->builder,
- "var_sheet_uim",
- GTK_TYPE_UI_MANAGER));
+ if (var_sheet->uim == NULL)
+ {
+ var_sheet->uim = GTK_UI_MANAGER (get_object_assert (var_sheet->builder,
+ "var_sheet_uim",
+ GTK_TYPE_UI_MANAGER));
+ g_object_ref (var_sheet->uim);
+ }
+
+ return var_sheet->uim;
}