HaikuDepot: Sort package list by name column on startup.

This commit is contained in:
Rene Gollent
2013-09-22 17:26:26 -04:00
parent f4058a3f9f
commit dd9658f010
2 changed files with 16 additions and 2 deletions
+13 -2
View File
@@ -1,5 +1,6 @@
/*
* Copyright 2013, Stephan Aßmus <[email protected]>.
* Copyright 2013, Rene Gollent, <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
@@ -608,8 +609,6 @@ PackageListView::PackageListView(BLocker* modelLock)
AddColumn(new PackageColumn(B_TRANSLATE("Status"), 60, 60, 100,
B_TRUNCATE_END), kStatusColumn);
SetSortingEnabled(true);
fItemCountView = new ItemCountView();
AddStatusView(fItemCountView);
}
@@ -625,10 +624,22 @@ PackageListView::~PackageListView()
void
PackageListView::AttachedToWindow()
{
BColumnListView::AttachedToWindow();
PackageColumn::InitTextMargin(ScrollView());
}
void
PackageListView::AllAttached()
{
BColumnListView::AllAttached();
SetSortingEnabled(true);
SetSortColumn(ColumnAt(0), false, true);
}
void
PackageListView::MessageReceived(BMessage* message)
{
+3
View File
@@ -1,5 +1,6 @@
/*
* Copyright 2013, Stephan Aßmus <[email protected]>.
* Copyright 2013, Rene Gollent <[email protected]>.
* All rights reserved. Distributed under the terms of the MIT License.
*/
#ifndef PACKAGE_LIST_VIEW_H
@@ -27,6 +28,8 @@ public:
virtual ~PackageListView();
virtual void AttachedToWindow();
virtual void AllAttached();
virtual void MessageReceived(BMessage* message);
virtual void SelectionChanged();