diff --git a/src/apps/haiku-depot/PackageListView.cpp b/src/apps/haiku-depot/PackageListView.cpp index 1f18b91818..8ec419c834 100644 --- a/src/apps/haiku-depot/PackageListView.cpp +++ b/src/apps/haiku-depot/PackageListView.cpp @@ -1,5 +1,6 @@ /* * Copyright 2013, Stephan Aßmus . + * Copyright 2013, Rene Gollent, . * 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) { diff --git a/src/apps/haiku-depot/PackageListView.h b/src/apps/haiku-depot/PackageListView.h index 27c2651a7f..44716aa317 100644 --- a/src/apps/haiku-depot/PackageListView.h +++ b/src/apps/haiku-depot/PackageListView.h @@ -1,5 +1,6 @@ /* * Copyright 2013, Stephan Aßmus . + * Copyright 2013, Rene Gollent . * 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();