updated on Sun Jan 22 16:00:49 UTC 2012
[aur-mirror.git] / epiphany-aqd / ephy-window.patch
bloba2c4561650c7dbce30b27c6208151fe3e0347084
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
3 @@ -74,6 +74,8 @@
4 #include "ephy-python.h"
5 #endif
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,
12 @@ -145,6 +147,9 @@
13 { "FileCloseTab", GTK_STOCK_CLOSE, N_("_Close"), "<control>W",
14 N_("Close this tab"),
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) },
20 /* Edit menu */
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)
28 + {
29 + gtk_main_quit ();
30 + return TRUE;
31 + }
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)
41 + {
42 + ephy_embed_load_url (embed, "about:blank");
43 + return;
44 + }
46 if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_QUIT) &&
47 gtk_notebook_get_n_pages (priv->notebook) == 1)
49 @@ -3209,7 +3227,7 @@
50 new_embed = ephy_shell_new_tab
51 (ephy_shell,
52 EPHY_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (embed))),
53 - embed, address, ntflags);
54 + embed, address, ntflags | EPHY_NEW_TAB_APPEND_AFTER);
56 else