projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make sure finalizers are called properly
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-data-window.c
diff --git
a/src/ui/gui/psppire-data-window.c
b/src/ui/gui/psppire-data-window.c
index fdc4087b964be97201c9ca828fe55626e70fac3e..0716804ed5f02a1f5d05536ce5c241cc53abe5ae 100644
(file)
--- a/
src/ui/gui/psppire-data-window.c
+++ b/
src/ui/gui/psppire-data-window.c
@@
-100,19
+100,15
@@
psppire_data_window_get_type (void)
return psppire_data_window_type;
}
return psppire_data_window_type;
}
+static GObjectClass *parent_class ;
static void
psppire_data_window_finalize (GObject *object)
{
PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (object);
static void
psppire_data_window_finalize (GObject *object)
{
PsppireDataWindow *de = PSPPIRE_DATA_WINDOW (object);
- GObjectClass *class = G_OBJECT_GET_CLASS (object);
-
- GObjectClass *parent_class = g_type_class_peek_parent (class);
-
g_object_unref (de->xml);
g_object_unref (de->xml);
-
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
if (G_OBJECT_CLASS (parent_class)->finalize)
(*G_OBJECT_CLASS (parent_class)->finalize) (object);
}
@@
-121,6
+117,7
@@
psppire_data_window_finalize (GObject *object)
static void
psppire_data_window_class_init (PsppireDataWindowClass *class)
{
static void
psppire_data_window_class_init (PsppireDataWindowClass *class)
{
+ parent_class = g_type_class_peek_parent (class);
}
}
@@
-581,7
+578,7
@@
new_file (GtkAction *action, PsppireDataWindow *de)
g_free (de->file_name);
de->file_name = NULL;
g_free (de->file_name);
de->file_name = NULL;
-
// default_window_name (de
);
+
psppire_window_set_filename (PSPPIRE_WINDOW (de), NULL
);
}
}
@@
-1005,14
+1002,6
@@
on_switch_sheet (GtkNotebook *notebook,
-void
-create_data_window (void)
-{
- GtkWidget *w = psppire_data_window_new ();
- gtk_widget_show (w);
-}
-
-
static void
psppire_data_window_init (PsppireDataWindow *de)
{
static void
psppire_data_window_init (PsppireDataWindow *de)
{
@@
-1705,8
+1694,7
@@
psppire_data_window_init (PsppireDataWindow *de)
de->data_sheet_cases_popup_menu =
GTK_MENU (create_data_sheet_cases_popup_menu (de));
de->data_sheet_cases_popup_menu =
GTK_MENU (create_data_sheet_cases_popup_menu (de));
- PSPPIRE_WINDOW (de)->menu = GTK_MENU (get_widget_assert (de->xml,"Windows_menu"));
- g_object_ref (PSPPIRE_WINDOW (de)->menu);
+ PSPPIRE_WINDOW (de)->menu = GTK_MENU_SHELL (get_widget_assert (de->xml,"Windows_menu"));
g_object_set (de->data_editor,
"datasheet-column-menu", de->data_sheet_variable_popup_menu,
g_object_set (de->data_editor,
"datasheet-column-menu", de->data_sheet_variable_popup_menu,