Permalink
Browse files

Control panel: Enable items sorting

  • Loading branch information...
yurkis committed Mar 25, 2014
1 parent 93d886f commit 540c895b1b4a7ece8bd388b31de3745c57ae0ea0
Showing with 8 additions and 5 deletions.
  1. +8 −5 src-qt4/pc-controlpanel/grouplist.cpp
@@ -40,6 +40,7 @@ QGroupList::QGroupList(QWidget *parent) :
setViewMode(QListView::IconMode);
setWordWrap(true);
setFrameStyle(QFrame::NoFrame);
+ setSortingEnabled(true);
//setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Minimum));
}
@@ -49,7 +50,7 @@ int QGroupList::read(QString Path, const QVector<QString>& vEnabledDE, bool Enab
clear();
QDir dir(Path);
if (!dir.exists(Path))
- return 0;
+ return 0;
QStringList DirList =dir.entryList(QStringList("*.desktop"));
for(int i=0; i<DirList.size(); i++)
@@ -69,18 +70,20 @@ int QGroupList::read(QString Path, const QVector<QString>& vEnabledDE, bool Enab
addItem(anItem);
}
}
- else
- delete anItem;
+ else
+ delete anItem;
}// for all files in dir
setAcceptDrops(false);
setDragEnabled(false);
setIconSize(QSize(32, 32));
- fitSize();
+ fitSize();
+
+
- return count();
+ return count();
}
///////////////////////////////////////////////////////////////////////////////

0 comments on commit 540c895

Please sign in to comment.