application/window.c

changeset 38
acd8c4a9d3fe
parent 37
9b754f1b7e16
child 40
af5c2bfe0f21
equal deleted inserted replaced
37:9b754f1b7e16 38:acd8c4a9d3fe
80 return obj; 80 return obj;
81 } 81 }
82 82
83 void* window_resource_table_getvalue(DavResource *res, int col) { 83 void* window_resource_table_getvalue(DavResource *res, int col) {
84 switch (col) { 84 switch (col) {
85 case 0: 85 case 0: { // icon
86 { // icon
87 return res->iscollection ? folder_icon : file_icon; 86 return res->iscollection ? folder_icon : file_icon;
88 } 87 }
89 case 1: 88 case 1: { // resource name
90 { // resource name
91 return res->name; 89 return res->name;
92 } 90 }
93 case 2: 91 case 2: { // type
94 { // type
95 return res->iscollection ? "Collection" : (res->contenttype ? res->contenttype : "Resource"); 92 return res->iscollection ? "Collection" : (res->contenttype ? res->contenttype : "Resource");
96 } 93 }
97 case 3: 94 case 3: { // last modified
98 { // last modified
99 return util_date_str(res->lastmodified); 95 return util_date_str(res->lastmodified);
100 } 96 }
101 case 4: 97 case 4: { // size
102 { // size
103 return util_size_str(res->iscollection, res->contentlength); 98 return util_size_str(res->iscollection, res->contentlength);
104 } 99 }
105 } 100 }
106 return NULL; 101 return NULL;
107 } 102 }

mercurial