aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorCrispin Flowerday <gnome@flowerday.cx>2006-01-22 18:56:32 +0800
committerCrispin Flowerday <crispin@src.gnome.org>2006-01-22 18:56:32 +0800
commit0730f856ac19d184decfcef122e18981d87d9f7e (patch)
tree6f5d7e51d1e3d8a846dfb9f791b12458a3bfc533 /embed
parent2d0587ae39217669844319b98520ec527553c71c (diff)
downloadgsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar.gz
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar.bz2
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar.lz
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar.xz
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.tar.zst
gsoc2013-epiphany-0730f856ac19d184decfcef122e18981d87d9f7e.zip
embed/ephy-favicon-cache.c (remove_obsolete_icons) (icon_is_obsolete)
2006-01-22 Crispin Flowerday <gnome@flowerday.cx> * embed/ephy-favicon-cache.c (remove_obsolete_icons) (icon_is_obsolete) * embed/ephy-history.c (page_is_obsolete, remove_obsolete_pages): Use non-deprecated functions when compiling against glib > 2.9
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-favicon-cache.c8
-rw-r--r--embed/ephy-history.c8
2 files changed, 16 insertions, 0 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index f38ddc3a6..25cc0e11b 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -196,7 +196,11 @@ icon_is_obsolete (EphyNode *node, GDate *now)
(node, EPHY_NODE_FAVICON_PROP_LAST_USED);
g_date_clear (&date, 1);
+#if GLIB_CHECK_VERSION (2,9,0)
+ g_date_set_time_t (&date, last_visit);
+#else
g_date_set_time (&date, last_visit);
+#endif
return (g_date_days_between (&date, now) >=
EPHY_FAVICON_CACHE_OBSOLETE_DAYS);
@@ -236,7 +240,11 @@ remove_obsolete_icons (EphyFaviconCache *cache,
GDate current_date;
g_date_clear (&current_date, 1);
+#if GLIB_CHECK_VERSION (2,9,0)
+ g_date_set_time_t (&current_date, time (NULL));
+#else
g_date_set_time (&current_date, time (NULL));
+#endif
children = ephy_node_get_children (priv->icons);
for (i = (int) children->len - 1; i >= 0; i--)
diff --git a/embed/ephy-history.c b/embed/ephy-history.c
index ad02c1655..7b542be76 100644
--- a/embed/ephy-history.c
+++ b/embed/ephy-history.c
@@ -247,7 +247,11 @@ page_is_obsolete (EphyNode *node, GDate *now)
(node, EPHY_NODE_PAGE_PROP_LAST_VISIT);
g_date_clear (&date, 1);
+#if GLIB_CHECK_VERSION (2,9,0)
+ g_date_set_time_t (&date, last_visit);
+#else
g_date_set_time (&date, last_visit);
+#endif
return (g_date_days_between (&date, now) >=
HISTORY_PAGE_OBSOLETE_DAYS);
@@ -263,7 +267,11 @@ remove_obsolete_pages (EphyHistory *eb)
now = time (NULL);
g_date_clear (&current_date, 1);
+#if GLIB_CHECK_VERSION (2,9,0)
+ g_date_set_time_t (&current_date, time (NULL));
+#else
g_date_set_time (&current_date, time (NULL));
+#endif
children = ephy_node_get_children (eb->priv->pages);
for (i = (int) children->len - 1; i >= 0; i--)