From a43be88202d423307d4612e444e984cea45f6d99 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Mon, 19 Jul 2004 08:27:06 +0000 Subject: Add disable_quit, disable_new_window, first_window_fullscreen lockdown 2004-07-19 Marco Pesenti Gritti * lib/ephy-prefs.h: * src/ephy-shell.c: (ephy_shell_new_tab): * src/ephy-window.c: (ephy_window_fullscreen), (ephy_window_unfullscreen), (update_actions_sensitivity), (tab_detached_cb), (tab_delete_cb), (ephy_window_init): * src/window-commands.c: (window_cmd_file_new_window), (window_cmd_file_close_window): Add disable_quit, disable_new_window, first_window_fullscreen lockdown options. --- src/window-commands.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/window-commands.c') diff --git a/src/window-commands.c b/src/window-commands.c index 38724702f..1562d1b7f 100644 --- a/src/window-commands.c +++ b/src/window-commands.c @@ -286,7 +286,7 @@ window_cmd_file_new_window (GtkAction *action, tab = ephy_window_get_active_tab (window); g_return_if_fail (tab != NULL); - ephy_shell_new_tab (ephy_shell, NULL, tab, NULL, + ephy_shell_new_tab (ephy_shell, window, tab, NULL, EPHY_NEW_TAB_NEW_PAGE | EPHY_NEW_TAB_IN_NEW_WINDOW); } @@ -451,6 +451,12 @@ window_cmd_file_close_window (GtkAction *action, { EphyTab *tab; + if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_QUIT) && + gtk_notebook_get_n_pages (GTK_NOTEBOOK (ephy_window_get_notebook (window))) == 1) + { + return; + } + tab = ephy_window_get_active_tab (window); g_return_if_fail (tab != NULL); -- cgit