aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ephy-shell.c20
-rw-r--r--src/ephy-shell.h3
-rw-r--r--src/window-commands.c15
3 files changed, 13 insertions, 25 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 47b51f7c8..8d65f60cb 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -432,15 +432,6 @@ ephy_shell_startup (EphyShell *shell,
}
static void
-delete_files (GList *l)
-{
- for (; l != NULL; l = l->next)
- {
- unlink (l->data);
- }
-}
-
-static void
ephy_shell_finalize (GObject *object)
{
EphyShell *shell = EPHY_SHELL (object);
@@ -456,10 +447,6 @@ ephy_shell_finalize (GObject *object)
LOG ("Unref extension manager")
g_object_unref (shell->priv->extensions_manager);
- delete_files (shell->priv->del_on_exit);
- g_list_foreach (shell->priv->del_on_exit, (GFunc)g_free, NULL);
- g_list_free (shell->priv->del_on_exit);
-
LOG ("Unref toolbars model")
if (shell->priv->toolbars_model)
{
@@ -836,10 +823,3 @@ ephy_shell_get_print_setup_dialog (EphyShell *shell)
return shell->priv->print_setup_dialog;
}
-
-void
-ephy_shell_delete_on_exit (EphyShell *shell, const char *path)
-{
- shell->priv->del_on_exit = g_list_append (shell->priv->del_on_exit,
- g_strdup (path));
-}
diff --git a/src/ephy-shell.h b/src/ephy-shell.h
index a93d318c7..1c5e07a05 100644
--- a/src/ephy-shell.h
+++ b/src/ephy-shell.h
@@ -136,9 +136,6 @@ GObject *ephy_shell_get_prefs_dialog (EphyShell *shell);
GObject *ephy_shell_get_print_setup_dialog (EphyShell *shell);
-void ephy_shell_delete_on_exit (EphyShell *shell,
- const char *path);
-
G_END_DECLS
#endif
diff --git a/src/window-commands.c b/src/window-commands.c
index bb98bf12e..6c1191baf 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -689,7 +689,7 @@ save_source_completed_cb (EphyEmbedPersist *persist)
dest = ephy_embed_persist_get_dest (persist);
g_return_if_fail (dest != NULL);
- ephy_shell_delete_on_exit (ephy_shell, dest);
+ ephy_file_delete_on_exit (dest);
editor_open_uri (dest);
}
@@ -737,9 +737,20 @@ save_temp_source (EphyEmbed *embed)
char *tmp, *base;
EphyEmbedPersist *persist;
- base = g_build_filename (g_get_tmp_dir (), "viewsourceXXXXXX", NULL);
+ char *static_temp_dir;
+
+ static_temp_dir = ephy_file_tmp_directory ();
+ if (static_temp_dir == NULL)
+ {
+ return;
+ }
+ base = g_build_filename (static_temp_dir, "viewsourceXXXXXX", NULL);
tmp = ephy_file_tmp_filename (base, "html");
g_free (base);
+ if (tmp == NULL)
+ {
+ return;
+ }
persist = EPHY_EMBED_PERSIST
(ephy_embed_factory_new_object ("EphyEmbedPersist"));