Fixed url hostory init bug.
authorDaniel Carl <danielcarl@gmx.de>
Sat, 23 Mar 2013 10:48:58 +0000 (11:48 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Sat, 23 Mar 2013 10:48:58 +0000 (11:48 +0100)
If the browser read the history from file in the init function the history max
items where not set so we considered the max items to be 0. Now the url
history is initialized if the config is processed.

src/main.c
src/setting.c
src/url_history.c

index 8461ec7..494f7f4 100644 (file)
@@ -732,8 +732,8 @@ static void vb_init_core(void)
     setting_init();
     command_init();
     keybind_init();
-    url_history_init();
     vb_read_config();
+    url_history_init();
 
     vb_update_status_style();
     vb_update_input_style(VB_MSG_NORMAL);
index 1ad41a5..790b49d 100644 (file)
@@ -681,7 +681,6 @@ static gboolean setting_history_max_items(const Setting* s, const SettingType ty
 
         return TRUE;
     }
-
     vb.config.url_history_max = s->arg.i;
 
     return TRUE;
index 5ebcbfe..d8ee6b8 100644 (file)
@@ -81,7 +81,7 @@ void url_history_cleanup(void)
 
 void url_history_add(const char* url, const char* title)
 {
-    /* uf the url is already in history, remove this entry */
+    /* if the url is already in history, remove this entry */
     /* TODO use g_list_find_custom for this task */
     for (GList* link = vb.behave.url_history; link; link = link->next) {
         UrlHist* hi = (UrlHist*)link->data;