change log location

change from:
	.config/hybrid/logs/username/
to:
	.config/hybrid/logs/protocol_name/username/

Signed-off-by: levin li <levin108@gmail.com>
change the log format from html to xml

the new format like that:
<root>
	<m type="o">
		<t>15:57:43</t>
		<n>levin</n>
		<c>hello hybrid</c>
	</m>
	<m type="i">
		<t>15:57:44</t>
		<n>kevin</n>
		<c>hello levin</c>
	</m>
</root>

Signed-off-by: levin li <levin108@gmail.com>
create chat log box ui, not bind any data

The current layout is:
++--------------------------+
|       title bar           |
+--------+------------------+
|TreeView|     TextView     |
|        |                  |
|        |                  |
+--------+------------------+
|                  Close    |
+---------------------------+

API is:
HybridLogbox *hybrid_logbox_create(
	HybridAccount *account, HybridBuddy *buddy);
void hybrid_logbox_show(HybridLogbox *logbox);

Signed-off-by: levin li <levin108@gmail.com>
add a function hybrid_logs_get_path() to get the log directory

we can easily get the log directory patch string for a specified
account and buddy by this function, it justs returns a string,
and needs to be freed after use.

Signed-off-by: levin li <levin108@gmail.com>
make hybrid_config_get_path() return const char*

since the config_path is a static variable, we should
return it as a const value

Signed-off-by: levin li <levin108@gmail.com>
bind the log filenames to the treeview in the log box

Signed-off-by: levin li <levin108@gmail.com>
automaticly select the latest log file when the logbox startup

Signed-off-by: levin li <levin108@gmail.com>
add hybrid_logs_read() to read a specified log file

Signed-off-by: levin li <levin108@gmail.com>
add log filename to the gtktreestore of the listbox treeview

Signed-off-by: levin li <levin108@gmail.com>
initialize the buffer of the textview in logbox

Signed-off-by: levin li <levin108@gmail.com>
bind the log to the textview in log box

first we read the log file by hybrid_logs_read() which store
the logs in form of a list of log entries, and then we traverse
the list and insert the logs into the textview buffer

Signed-off-by: levin li <levin108@gmail.com>
make left click on log list to show log content in the textview

Signed-off-by: levin li <levin108@gmail.com>
check wheter logs exist before show the chat log window

Signed-off-by: levin li <levin108@gmail.com>
make the log list more elegant

make the margin between messages larger, remove the log list
header, add a log box header to show the account's information
and buddy's information, current layout is:
+---------------------------------------------+
|                   Title                     |
+---------------------------------------------+
|   Account's Info         Buddy'Info         |
+--------------+------------------------------+
|              |                              |
|              |                              |
| GtkTreeView  |         GtkTextView          |
|              |                              |
|              |                              |
+--------------+------------------------------+
|                                 Close       |
+---------------------------------------------+

Signed-off-by: levin li <levin108@gmail.com>
make some translation for the tips in log box

Signed-off-by: levin li <levin108@gmail.com>
add callback for the view_chat_logs button in chat window

make it popup the log box if log exists

Signed-off-by: levin li <levin108@gmail.com>
make xml parser recover from error

add a flag XML_PARSE_RECOVERY to xmlReadFile()

Signed-off-by: levin li <levin108@gmail.com>
sort the log files in the left of logbox by date

Signed-off-by: levin li <levin108@gmail.com>
make webkit in the chat window friendly to code

escapt blankspace to &nbsp; tab to four &nbsp; and
\n to <br/>

Signed-off-by: levin li <levin108@gmail.com>
fix a bug of crash when downloading portrait fail

Signed-off-by: levin li <levin108@gmail.com>