[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r6320 - gnunet-qt/src/plugins/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r6320 - gnunet-qt/src/plugins/fs |
Date: |
Sat, 16 Feb 2008 08:18:46 -0700 (MST) |
Author: durner
Date: 2008-02-16 08:18:46 -0700 (Sat, 16 Feb 2008)
New Revision: 6320
Modified:
gnunet-qt/src/plugins/fs/searchController.cc
Log:
display file size according to ECRS
Modified: gnunet-qt/src/plugins/fs/searchController.cc
===================================================================
--- gnunet-qt/src/plugins/fs/searchController.cc 2008-02-16 15:16:30 UTC
(rev 6319)
+++ gnunet-qt/src/plugins/fs/searchController.cc 2008-02-16 15:18:46 UTC
(rev 6320)
@@ -115,6 +115,7 @@
unsigned char *thumb;
QStandardItem *child;
QModelIndex childIdx, itemIdx;
+ unsigned long long fileSize;
child = new QStandardItem;
child->setColumnCount(SEARCH_MAX_COLUMN + 1);
@@ -141,6 +142,15 @@
GNUNET_free(thumb);
}
+ // display file size as reported by ECRS
+ if (GNUNET_ECRS_uri_test_chk(info->uri) ||
GNUNET_ECRS_uri_test_loc(info->uri))
+ fileSize = GNUNET_ECRS_uri_get_file_size(info->uri);
+ else
+ fileSize = 0;
+ itemIdx = model->index(row, MODEL_IDX(EXTRACTOR_FILE_SIZE), parent);
+ model->setData(itemIdx, QVariant(GString::fromByteSize(fileSize)));
+
+
// make directories expandable
itemIdx = model->index(row, MODEL_IDX(EXTRACTOR_MIMETYPE), parent);
if (model->data(itemIdx).toString() == "application/gnunet-directory")
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r6320 - gnunet-qt/src/plugins/fs,
gnunet <=