diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-10-28 19:33:19 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-10-28 19:33:19 +0800 |
commit | 025c7959e438aad9770f9aa801b6ead6e19e79dd (patch) | |
tree | 7a3595c5b012722d6e6dcea81b97773c15c9450c /src/ephy-shell.c | |
parent | 4ff6bbed9a23f05f1ee9158d2607c2e811c5de6f (diff) | |
download | gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar.gz gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar.bz2 gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar.lz gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar.xz gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.tar.zst gsoc2013-epiphany-025c7959e438aad9770f9aa801b6ead6e19e79dd.zip |
Open source in the default editor and remove the unused copy api. Add a
2003-10-28 Marco Pesenti Gritti <marco@gnome.org>
* embed/ephy-embed-persist.h:
* embed/ephy-embed.c:
* embed/ephy-embed.h:
* embed/ephy-favicon-cache.c: (ephy_favicon_cache_download):
* embed/mozilla/EphyBrowser.cpp:
* embed/mozilla/EphyBrowser.h:
* embed/mozilla/EphyHeaderSniffer.cpp:
* embed/mozilla/EphyHeaderSniffer.h:
* embed/mozilla/MozDownload.cpp:
* embed/mozilla/MozDownload.h:
* embed/mozilla/mozilla-embed-persist.cpp:
* embed/mozilla/mozilla-embed.cpp:
* src/ephy-shell.c: (delete_files), (ephy_shell_finalize),
(ephy_shell_new_tab), (ephy_shell_delete_on_exit):
* src/ephy-shell.h:
* src/window-commands.c: (get_editor_application),
(editor_open_uri), (save_source_completed_cb),
(editor_can_open_uri), (save_temp_source),
(window_cmd_view_page_source):
Open source in the default editor and
remove the unused copy api.
Add a missing include while at it.
Diffstat (limited to 'src/ephy-shell.c')
-rw-r--r-- | src/ephy-shell.c | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/src/ephy-shell.c b/src/ephy-shell.c index d6dc7b61a..9eac44c94 100644 --- a/src/ephy-shell.c +++ b/src/ephy-shell.c @@ -76,6 +76,7 @@ struct EphyShellPrivate GtkWidget *bme; GtkWidget *history_window; GList *plugins; + GList *del_on_exit; }; static void @@ -279,6 +280,15 @@ ephy_shell_init (EphyShell *gs) } static void +delete_files (GList *l) +{ + for (; l != NULL; l = l->next) + { + unlink (l->data); + } +} + +static void ephy_shell_finalize (GObject *object) { EphyShell *gs = EPHY_SHELL (object); @@ -288,6 +298,10 @@ ephy_shell_finalize (GObject *object) g_list_foreach (gs->priv->plugins, (GFunc)g_type_module_unuse, NULL); g_list_free (gs->priv->plugins); + delete_files (gs->priv->del_on_exit); + g_list_foreach (gs->priv->del_on_exit, (GFunc)g_free, NULL); + g_list_free (gs->priv->del_on_exit); + LOG ("Unref toolbars model") if (gs->priv->toolbars_model) { @@ -460,8 +474,7 @@ ephy_shell_new_tab (EphyShell *shell, } grouped = ((flags & EPHY_NEW_TAB_OPEN_PAGE || - flags & EPHY_NEW_TAB_APPEND_GROUPED || - flags & EPHY_NEW_TAB_CLONE_PAGE)) && + flags & EPHY_NEW_TAB_APPEND_GROUPED)) && !(flags & EPHY_NEW_TAB_APPEND_LAST); if ((flags & EPHY_NEW_TAB_APPEND_AFTER) && previous_embed != NULL) @@ -495,16 +508,6 @@ ephy_shell_new_tab (EphyShell *shell, g_assert (url != NULL); ephy_embed_load_url (embed, url); } - else if (flags & EPHY_NEW_TAB_CLONE_PAGE) - { - EmbedDisplayType display_type; - - display_type = (flags & EPHY_NEW_TAB_SOURCE_MODE) ? - DISPLAY_AS_SOURCE : DISPLAY_NORMAL; - - ephy_embed_load_url (embed, "about:blank"); - ephy_embed_copy_page (embed, previous_embed, display_type); - } if (flags & EPHY_NEW_TAB_FULLSCREEN_MODE) { @@ -698,3 +701,11 @@ ephy_shell_show_history_window (EphyShell *gs, gtk_window_present (GTK_WINDOW (gs->priv->history_window)); } + +void +ephy_shell_delete_on_exit (EphyShell *gs, const char *path) +{ + gs->priv->del_on_exit = g_list_append (gs->priv->del_on_exit, + g_strdup (path)); +} + |