1 --- src/ephy-window.c.old 2008-08-03 20:23:09.000000000 +0800
2 +++ src/ephy-window.c 2009-02-01 21:06:53.199350076 +0800
4 #include "ephy-python.h"
7 +#include "ephy-session.h"
9 static void ephy_window_class_init (EphyWindowClass *klass);
10 static void ephy_window_init (EphyWindow *gs);
11 static GObject *ephy_window_constructor (GType type,
13 { "FileCloseTab", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
15 G_CALLBACK (window_cmd_file_close_window) },
16 + { "FileQuit", GTK_STOCK_QUIT, N_("_Quit"), "<control>Q",
17 + N_("Quit Epiphany"),
18 + G_CALLBACK (gtk_main_quit) },
22 @@ -1037,6 +1042,13 @@
24 if (eel_gconf_get_boolean("/apps/epiphany/lockdown/disable_quit")) return TRUE;
26 + EphySession *sess = (EphySession *) ephy_shell_get_session (ephy_shell_get_default ());
27 + if (g_list_length (ephy_session_get_windows (sess)) == 1)
33 /* Workaround a crash when closing a window while in print preview mode. See
34 * mozilla bug #241809. /
35 * Go back to normal mode instead of closing, see bug #326136.
36 @@ -2788,6 +2800,12 @@
38 EphyWindowPrivate *priv = window->priv;
40 + if (gtk_notebook_get_n_pages (priv->notebook) == 1)
42 + ephy_embed_load_url (embed, "about:blank");
46 if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_QUIT) &&
47 gtk_notebook_get_n_pages (priv->notebook) == 1)
50 new_embed = ephy_shell_new_tab
52 EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
53 - embed, address, ntflags);
54 + embed, address, ntflags | EPHY_NEW_TAB_APPEND_AFTER);