aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-tab.c22
2 files changed, 27 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index f5a06d02c..104e1f6ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-01-08 Adam Hooper <adamh@cvs.gnome.org>
+
+ * src/ephy-tab.c: (popups_manager_add):
+
+ Don't store more than 5 hidden popups. Fixes bug #160863.
+
2005-01-09 Christian Persch <chpe@cvs.gnome.org>
* src/ephy-window.c: (sync_tab_security):
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index a76f2b051..87eb8ac1a 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -65,6 +65,8 @@
#define CONF_LOCKDOWN_DISABLE_JAVASCRIPT_CHROME "/apps/epiphany/lockdown/disable_javascript_chrome"
+#define MAX_HIDDEN_POPUPS 5
+
struct _EphyTabPrivate
{
char *status_message;
@@ -504,7 +506,25 @@ popups_manager_add (EphyTab *tab,
tab->priv->hidden_popups = g_slist_prepend
(tab->priv->hidden_popups, popup);
- g_object_notify (G_OBJECT (tab), "hidden-popup-count");
+ if (popup_blocker_n_hidden (tab) > MAX_HIDDEN_POPUPS) /* bug #160863 */
+ {
+ /* Remove the oldest popup */
+ GSList *l = tab->priv->hidden_popups;
+
+ while (l->next->next != NULL)
+ {
+ l = l->next;
+ }
+
+ popup = (PopupInfo *) l->next->data;
+ popups_manager_free_info (popup);
+
+ l->next = NULL;
+ }
+ else
+ {
+ g_object_notify (G_OBJECT (tab), "hidden-popup-count");
+ }
}
static gboolean