Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Control panel: Enable items sorting

  • Loading branch information...
commit 540c895b1b4a7ece8bd388b31de3745c57ae0ea0 1 parent 93d886f
@yurkis yurkis authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 src-qt4/pc-controlpanel/grouplist.cpp
View
13 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,8 +70,8 @@ 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);
@@ -78,9 +79,11 @@ int QGroupList::read(QString Path, const QVector<QString>& vEnabledDE, bool Enab
setIconSize(QSize(32, 32));
- fitSize();
+ fitSize();
+
+
- return count();
+ return count();
}
///////////////////////////////////////////////////////////////////////////////
Please sign in to comment.
Something went wrong with that request. Please try again.