From 99f0e389fe80b474204d09bd5e5fa64dd5ebf3a4 Mon Sep 17 00:00:00 2001 From: Xan Lopez Date: Tue, 6 Mar 2012 22:53:35 +0100 Subject: ephy-history-window: correctly handle 2 and 10 days of history --- lib/ephy-prefs.h | 1 + src/ephy-history-window.c | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/ephy-prefs.h b/lib/ephy-prefs.h index 9eadad036..f08bce0f9 100644 --- a/lib/ephy-prefs.h +++ b/lib/ephy-prefs.h @@ -48,6 +48,7 @@ typedef enum EPHY_PREFS_STATE_HISTORY_DATE_FILTER_TODAY, EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_TWO_DAYS, EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_THREE_DAYS, + EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_TEN_DAYS, EPHY_PREFS_STATE_HISTORY_DATE_FILTER_EVER, } EphyPrefsStateHistoryDateFilter; diff --git a/src/ephy-history-window.c b/src/ephy-history-window.c index 18f8e6d79..2cec78d7f 100644 --- a/src/ephy-history-window.c +++ b/src/ephy-history-window.c @@ -969,11 +969,15 @@ setup_time_filters (EphyHistoryWindow *editor, cmp_time = midnight; break; case EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_TWO_DAYS: - days++; + days = 1; cmp_time = midnight; break; case EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_THREE_DAYS: - days++; + days = 2; + cmp_time = midnight; + break; + case EPHY_PREFS_STATE_HISTORY_DATE_FILTER_LAST_TEN_DAYS: + days = 9; cmp_time = midnight; break; default: -- cgit