Network: added ability to sort ServiceListItems correctly.
* Added ServiceListItem::Label() method.
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
|
||||
#include "InterfaceListItem.h"
|
||||
#include "InterfaceView.h"
|
||||
#include "ServiceListItem.h"
|
||||
|
||||
|
||||
const char* kNetworkStatusSignature = "application/x-vnd.Haiku-NetworkStatus";
|
||||
@@ -574,6 +575,10 @@ NetworkWindow::_ItemName(const BListItem* item)
|
||||
const BNetworkInterfaceListItem*>(item))
|
||||
return listItem->Label();
|
||||
|
||||
if (const ServiceListItem* listItem = dynamic_cast<
|
||||
const ServiceListItem*>(item))
|
||||
return listItem->Label();
|
||||
|
||||
if (const BStringItem* stringItem = dynamic_cast<const BStringItem*>(item))
|
||||
return stringItem->Text();
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ public:
|
||||
const BNetworkSettings& settings);
|
||||
virtual ~ServiceListItem();
|
||||
|
||||
const char* Label() const { return fLabel; }
|
||||
|
||||
virtual void DrawItem(BView* owner,
|
||||
BRect bounds, bool complete);
|
||||
virtual void Update(BView* owner, const BFont* font);
|
||||
|
||||
Reference in New Issue
Block a user