summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-09-03 20:06:42 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-09-03 20:06:42 +0100
commite8071e676c03320ee63719769987eb81980ab5c8 (patch)
treef2a3a2651a4c57f2f025df5b12c843d8a77866dd /desktop
parent393dee4fd784ec0f0a32f83b91cfabf034d2a2a6 (diff)
downloadnetsurf-e8071e676c03320ee63719769987eb81980ab5c8.tar.gz
netsurf-e8071e676c03320ee63719769987eb81980ab5c8.tar.bz2
Remove some redundancy.
Diffstat (limited to 'desktop')
-rw-r--r--desktop/global_history.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/desktop/global_history.c b/desktop/global_history.c
index e0c8e39d8..191ff1966 100644
--- a/desktop/global_history.c
+++ b/desktop/global_history.c
@@ -123,61 +123,47 @@ static struct global_history_entry *global_history_find(nsurl *url)
static nserror global_history_create_dir(enum global_history_folders f)
{
nserror err;
- time_t t = gh_ctx.today;
treeview_node *relation = NULL;
enum treeview_relationship rel = TREE_REL_FIRST_CHILD;
const char *label;
- int age;
int i;
switch (f) {
case GH_TODAY:
label = "DateToday";
- age = 0;
break;
case GH_YESTERDAY:
label = "DateYesterday";
- age = 1;
break;
case GH_2_DAYS_AGO:
label = "Date2Days";
- age = 2;
break;
case GH_3_DAYS_AGO:
label = "Date3Days";
- age = 3;
break;
case GH_4_DAYS_AGO:
label = "Date4Days";
- age = 4;
break;
case GH_5_DAYS_AGO:
label = "Date5Days";
- age = 5;
break;
case GH_6_DAYS_AGO:
label = "Date6Days";
- age = 6;
break;
case GH_LAST_WEEK:
label = "Date1Week";
- age = 7;
break;
case GH_2_WEEKS_AGO:
label = "Date2Week";
- age = 14;
break;
case GH_3_WEEKS_AGO:
label = "Date3Week";
- age = 21;
break;
default:
assert(0);
break;
}
- t -= age * N_SEC_PER_DAY;
-
label = messages_get(label);
for (i = f - 1; i >= 0; i--) {