[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4676 - gnunet-qt/src/plugins/fs
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4676 - gnunet-qt/src/plugins/fs |
Date: |
Wed, 21 Mar 2007 16:51:49 -0600 (MDT) |
Author: durner
Date: 2007-03-21 16:51:49 -0600 (Wed, 21 Mar 2007)
New Revision: 4676
Modified:
gnunet-qt/src/plugins/fs/fs-search.cc
gnunet-qt/src/plugins/fs/fshelper.h
Log:
fix column order
Modified: gnunet-qt/src/plugins/fs/fs-search.cc
===================================================================
--- gnunet-qt/src/plugins/fs/fs-search.cc 2007-03-21 19:02:00 UTC (rev
4675)
+++ gnunet-qt/src/plugins/fs/fs-search.cc 2007-03-21 22:51:49 UTC (rev
4676)
@@ -161,7 +161,7 @@
GIntList cols;
EXTRACTOR_KeywordType maxType;
int typeIdx;
-
+
maxType = EXTRACTOR_getHighestKeywordTypeNumber();
m->setColumnCount(SEARCH_MAX_COLUMN + 1);
for (typeIdx = 0; typeIdx <= maxType; typeIdx++)
@@ -176,15 +176,15 @@
// get columns to be displayed
// FIXME
+ cols.append(EXTRACTOR_FILENAME);
cols.append(EXTRACTOR_FILE_SIZE);
- cols.append(EXTRACTOR_SIZE);
cols.append(EXTRACTOR_MIMETYPE);
cols.append(EXTRACTOR_THUMBNAIL_DATA);
for (colIdx = 0; colIdx < m->columnCount(); colIdx++)
setColHidden(MODEL_IDX(colIdx), !cols.contains(colIdx));
-
treeResults->setColumnWidth(0, 200);
+ treeResults->setColumnWidth(MODEL_IDX(EXTRACTOR_FILE_SIZE), 50);
}
void GFSSearch::setModel(QStandardItemModel *model)
Modified: gnunet-qt/src/plugins/fs/fshelper.h
===================================================================
--- gnunet-qt/src/plugins/fs/fshelper.h 2007-03-21 19:02:00 UTC (rev 4675)
+++ gnunet-qt/src/plugins/fs/fshelper.h 2007-03-21 22:51:49 UTC (rev 4676)
@@ -38,11 +38,15 @@
/* Maps view index 0 ("Filename") to model index 1 (EXTRACTOR_FILENAME).
* We can't use unified indexes because row decorations (branches, +/-)
* are always painted to view colum 0. That would be EXTRACTOR_UNKNOWN,
- * which is usually hidden.
+ * which is usually hidden. Also map THUMBNAIL <=> FILESIZE because
+ * the thumbnail should be the last and there's obviously a bug in
+ * QHeaderView::moveColumn() and/or ::setHidden()
*/
#define MODEL_IDX(i) (((EXTRACTOR_KeywordType) i == EXTRACTOR_UNKNOWN) ? \
(EXTRACTOR_KeywordType) 1 : (i == EXTRACTOR_FILENAME) ? \
- (EXTRACTOR_KeywordType) 0 : (EXTRACTOR_KeywordType) i)
+ (EXTRACTOR_KeywordType) 0 : (i == EXTRACTOR_FILE_SIZE) ? \
+ EXTRACTOR_THUMBNAIL_DATA : (i == EXTRACTOR_THUMBNAIL_DATA) ? \
+ EXTRACTOR_FILE_SIZE : (EXTRACTOR_KeywordType) i)
/**
* @brief Get the name of a given keyword/metadata type
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4676 - gnunet-qt/src/plugins/fs,
gnunet <=