? .ephy-tab.c.swp
Index: ephy-lockdown.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-lockdown.c,v
retrieving revision 1.16
diff -u -p -r1.16 ephy-lockdown.c
--- ephy-lockdown.c	10 Nov 2006 14:49:57 -0000	1.16
+++ ephy-lockdown.c	28 Dec 2006 10:52:09 -0000
@@ -70,7 +70,7 @@ find_name (GtkActionGroup *action_group,
 	return strcmp (gtk_action_group_get_name (action_group), name);
 }
 
-static GtkActionGroup *
+GtkActionGroup *
 find_action_group (GtkUIManager *manager,
 		   const char *name)
 {
Index: ephy-lockdown.h
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-lockdown.h,v
retrieving revision 1.2
diff -u -p -r1.2 ephy-lockdown.h
--- ephy-lockdown.h	13 Sep 2006 11:34:22 -0000	1.2
+++ ephy-lockdown.h	28 Dec 2006 10:52:09 -0000
@@ -24,6 +24,8 @@
 
 #include <glib.h>
 #include <glib-object.h>
+#include <gtk/gtkactiongroup.h>
+#include <gtk/gtkuimanager.h>
 
 G_BEGIN_DECLS
 
@@ -52,6 +54,9 @@ struct _EphyLockdown
 };
 
 GType	ephy_lockdown_get_type		(void);
+
+GtkActionGroup *find_action_group 	(GtkUIManager *manager,
+						 const char *name);
 
 G_END_DECLS
 
Index: ephy-statusbar.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-statusbar.c,v
retrieving revision 1.26
diff -u -p -r1.26 ephy-statusbar.c
--- ephy-statusbar.c	25 Dec 2006 12:17:35 -0000	1.26
+++ ephy-statusbar.c	28 Dec 2006 10:52:09 -0000
@@ -32,7 +32,6 @@
 #include <gtk/gtkprogressbar.h>
 #include <gtk/gtkeventbox.h>
 #include <gtk/gtkimage.h>
-#include <gtk/gtkframe.h>
 #include <gtk/gtkwidget.h>
 #include <gtk/gtkvseparator.h>
 #include <gtk/gtkversion.h>
Index: ephy-window.c
===================================================================
RCS file: /cvs/gnome/epiphany/src/ephy-window.c,v
retrieving revision 1.364
diff -u -p -r1.364 ephy-window.c
--- ephy-window.c	15 Dec 2006 14:01:57 -0000	1.364
+++ ephy-window.c	28 Dec 2006 10:52:17 -0000
@@ -53,6 +53,7 @@
 #include "ephy-fullscreen-popup.h"
 #include "ephy-action-helper.h"
 #include "ephy-find-toolbar.h"
+#include "ephy-lockdown.h"
 
 #include <string.h>
 #include <glib/gi18n.h>
@@ -1587,12 +1588,31 @@ sync_tab_popup_windows (EphyTab *tab,
 			GParamSpec *pspec,
 			EphyWindow *window)
 {
+	GtkUIManager *manager;
+	GtkActionGroup *action_group;
+	GtkAction *action;
+
 	guint num_popups = 0;
+	gboolean popups_allowed, popups_allowed_in_conf, sensivity;
 	char *tooltip = NULL;
 
 	g_object_get (G_OBJECT (tab),
 		      "hidden-popup-count", &num_popups,
 		      NULL);
+	g_object_get (G_OBJECT (tab),
+		      "popups-allowed", &popups_allowed,
+		      NULL);
+	popups_allowed_in_conf = eel_gconf_get_boolean (CONF_SECURITY_ALLOW_POPUPS);
+
+	manager = GTK_UI_MANAGER (ephy_window_get_ui_manager (window));
+	action_group = find_action_group (manager, "WindowActions");
+	/* Make sensitive if there are popups blocked, 
+	 * if they are allowed (so we can select this to block them) and 
+	 * if they are globally allowed (so we can block for a single site) */
+	sensivity = ((num_popups > 0) || popups_allowed || popups_allowed_in_conf);
+
+	action = gtk_action_group_get_action (action_group, "ViewPopupWindows");
+	gtk_action_set_sensitive (action, sensivity);
 
 	if (num_popups > 0)
 	{
