aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog10
-rw-r--r--src/ephy-nautilus-view.c12
2 files changed, 19 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c89310d6..82572a9db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2003-12-14 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-nautilus-view.c: (ephy_nautilus_view_finalize),
+ (gnv_cmd_select_encoding), (gnv_cmd_file_print),
+ (gnv_cmd_edit_find):
+
+ Fix mem leaks.
+ Fix a crash when finalizing a nautilus view after having
+ used the find dialogue.
+
2003-12-13 Christian Persch <chpe@cvs.gnome.org>
* src/bookmarks/ephy-bookmarks-import.c:
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c
index 191e9fccb..7a05e0b91 100644
--- a/src/ephy-nautilus-view.c
+++ b/src/ephy-nautilus-view.c
@@ -280,6 +280,8 @@ ephy_nautilus_view_finalize (GObject *object)
if (p->find_dialog)
{
+ g_object_remove_weak_pointer (G_OBJECT (p->find_dialog),
+ (gpointer *) &p->find_dialog);
g_object_unref (p->find_dialog);
}
@@ -531,7 +533,8 @@ gnv_cmd_select_encoding (BonoboUIComponent *uic,
NULL));
ephy_dialog_set_modal (dialog, TRUE);
- ephy_dialog_show (dialog);
+ ephy_dialog_run (dialog);
+ g_object_unref (dialog);
}
static void
@@ -545,7 +548,8 @@ gnv_cmd_file_print (BonoboUIComponent *uic,
dialog = ephy_print_dialog_new (NULL, p->embed, FALSE);
ephy_dialog_set_modal (dialog, TRUE);
- ephy_dialog_show (dialog);
+ ephy_dialog_run (dialog);
+ g_object_unref (dialog);
}
static void
@@ -555,9 +559,11 @@ gnv_cmd_edit_find (BonoboUIComponent *uic,
{
EphyNautilusViewPrivate *p = view->priv;
- if (!p->find_dialog)
+ if (p->find_dialog == NULL)
{
p->find_dialog = find_dialog_new (p->embed);
+ g_object_add_weak_pointer (G_OBJECT (p->find_dialog),
+ (gpointer *) &p->find_dialog);
}
ephy_dialog_show (p->find_dialog);