Dolda2000 GitWeb
/
doldaconnect.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e564b5
)
Strip dchub:// prefix from XML hublists.
author
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 8 Sep 2011 11:37:17 +0000
(13:37 +0200)
committer
Fredrik Tolf
<fredrik@dolda2000.com>
Thu, 8 Sep 2011 11:37:17 +0000
(13:37 +0200)
clients/gtk2/hublist-xml.c
patch
|
blob
|
blame
|
history
diff --git
a/clients/gtk2/hublist-xml.c
b/clients/gtk2/hublist-xml.c
index
46a53ce
..
fcd9d73
100644
(file)
--- a/
clients/gtk2/hublist-xml.c
+++ b/
clients/gtk2/hublist-xml.c
@@
-175,12
+175,18
@@
int pubhubxmlhandler(int op, char *buf, size_t len)
attr = (char *)xmlGetProp(n, (xmlChar *)names[i]);
if(attr != NULL)
{
attr = (char *)xmlGetProp(n, (xmlChar *)names[i]);
if(attr != NULL)
{
- if(types[i] == G_TYPE_STRING)
+ if(!strcmp(names[i], "Address")) {
+ if(!strncmp(attr, "dchub://", 8))
+ gtk_list_store_set(model, &iter, i, attr + 8, -1);
+ else
+ gtk_list_store_set(model, &iter, i, attr, -1);
+ } else if(types[i] == G_TYPE_STRING) {
gtk_list_store_set(model, &iter, i, attr, -1);
gtk_list_store_set(model, &iter, i, attr, -1);
- else if(types[i] == G_TYPE_INT)
+ } else if(types[i] == G_TYPE_INT) {
gtk_list_store_set(model, &iter, i, atoi(attr), -1);
gtk_list_store_set(model, &iter, i, atoi(attr), -1);
- else if(types[i] == G_TYPE_INT64)
+ } else if(types[i] == G_TYPE_INT64) {
gtk_list_store_set(model, &iter, i, strtoll(attr, NULL, 0), -1);
gtk_list_store_set(model, &iter, i, strtoll(attr, NULL, 0), -1);
+ }
xmlFree(attr);
}
}
xmlFree(attr);
}
}