+ show introducetaskbar everytime (now we have the suggestions)

This commit is contained in:
kelson42 2012-08-15 15:44:44 +00:00
parent 38dbceeb50
commit 284085e3e1

View File

@ -247,9 +247,8 @@ static int accessHandlerCallback(void *cls,
if (end != NULL)
endNumber = atoi(end);
if (pattern == NULL) {
if (pattern == NULL)
pattern = "";
}
/* Get the results */
pthread_mutex_lock(&searcherLock);
@ -263,7 +262,6 @@ static int accessHandlerCallback(void *cls,
pthread_mutex_unlock(&searcherLock);
mimeType = "text/html; charset=utf-8";
introduceTaskbar(content, humanReadableBookId);
}
/* Display the content of a ZIM article */
@ -299,10 +297,6 @@ static int accessHandlerCallback(void *cls,
"(href|src)(=[\"|\']/)([A-Z|\\-])/");
content = replaceRegex(content, "$1$2" + humanReadableBookId + "/$3/",
"(@import[ ]+)([\"|\']/)([A-Z|\\-])/");
if (searcher != NULL) {
introduceTaskbar(content, humanReadableBookId);
}
}
}
@ -313,6 +307,11 @@ static int accessHandlerCallback(void *cls,
mimeType = "text/html; charset=utf-8";
pthread_mutex_unlock(&welcomeLock);
}
/* Introduce Taskbar */
if (!humanReadableBookId.empty() && mimeType.find("text/html") != string::npos) {
introduceTaskbar(content, humanReadableBookId);
}
/* Compute the lengh */
contentLength = content.size();