diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-07-01 20:05:09 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-07-01 20:05:09 +0100 |
commit | 2476af4c65add3b94e4b1a30c0f17cd7b78f1256 (patch) | |
tree | 6d5579bcac4f8eaccc3fef038c4e8414bb42b3ce /desktop/global_history.c | |
parent | 21cd01a9b34d2c881bde8fbe8273ce78a0b67445 (diff) | |
download | netsurf-2476af4c65add3b94e4b1a30c0f17cd7b78f1256.tar.gz netsurf-2476af4c65add3b94e4b1a30c0f17cd7b78f1256.tar.bz2 |
Use messages for treeview labels.
Diffstat (limited to 'desktop/global_history.c')
-rw-r--r-- | desktop/global_history.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/desktop/global_history.c b/desktop/global_history.c index 20bf3c9b6..ee09c1cdb 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -497,41 +497,51 @@ static bool global_history_add_entry(nsurl *url, static nserror global_history_initialise_entry_fields(void) { int i; + const char *label; for (i = 0; i < N_FIELDS; i++) gh_ctx.fields[i].field = NULL; - /* TODO: use messages */ gh_ctx.fields[0].flags = TREE_FLAG_DEFAULT; - if (lwc_intern_string("Title", SLEN("Title"), + label = "TreeviewLabelTitle"; + label = messages_get(label); + if (lwc_intern_string(label, strlen(label), &gh_ctx.fields[0].field) != lwc_error_ok) { goto error; } gh_ctx.fields[1].flags = TREE_FLAG_NONE; - if (lwc_intern_string("URL", SLEN("URL"), + label = "TreeviewLabelURL"; + label = messages_get(label); + if (lwc_intern_string(label, strlen(label), &gh_ctx.fields[1].field) != lwc_error_ok) { goto error; } gh_ctx.fields[2].flags = TREE_FLAG_SHOW_NAME; - if (lwc_intern_string("Last visit", SLEN("Last visit"), + label = "TreeviewLabelLastVisit"; + label = messages_get(label); + if (lwc_intern_string(label, strlen(label), &gh_ctx.fields[2].field) != lwc_error_ok) { goto error; } gh_ctx.fields[3].flags = TREE_FLAG_SHOW_NAME; - if (lwc_intern_string("Visits", SLEN("Visits"), + label = "TreeviewLabelVisits"; + label = messages_get(label); + if (lwc_intern_string(label, strlen(label), &gh_ctx.fields[3].field) != lwc_error_ok) { goto error; } gh_ctx.fields[4].flags = TREE_FLAG_DEFAULT; - if (lwc_intern_string("Period", SLEN("Period"), + label = "TreeviewLabelPeriod"; + label = messages_get(label); + if (lwc_intern_string(label, strlen(label), &gh_ctx.fields[4].field) != lwc_error_ok) { return false; |