From d27b24661d3f88f9d044a4013bc5eea8c768df8a Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Sat, 15 Nov 2008 16:38:54 +0000 Subject: [PATCH] Fix a few minor problems that resulted in the sound column not being drawn until clicked. Also changed CLV to use B_PLAIN_BORDER. This fixes the redraw issues in ticket #2980. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28658 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/sounds/HEventList.cpp | 10 +++++----- src/preferences/sounds/HWindow.cpp | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/preferences/sounds/HEventList.cpp b/src/preferences/sounds/HEventList.cpp index 25a0278c37..bf16d4695e 100644 --- a/src/preferences/sounds/HEventList.cpp +++ b/src/preferences/sounds/HEventList.cpp @@ -21,8 +21,8 @@ HEventRow::HEventRow(const char* name, const char* path) : BRow(), fName(name) { - SetPath(path); SetField(new BStringField(name), kEventColumn); + SetPath(path); } @@ -48,7 +48,7 @@ HEventRow::Remove(const char *type) HEventList::HEventList(BRect rect, const char* name) - : BColumnListView(rect, name, B_FOLLOW_ALL, 0, B_NO_BORDER, true), + : BColumnListView(rect, name, B_FOLLOW_ALL, 0, B_PLAIN_BORDER, true), fType(NULL) { AddColumn(new BStringColumn("Event", 150, 50, 500, B_TRUNCATE_MIDDLE), kEventColumn); @@ -76,10 +76,10 @@ HEventList::SetType(const char* type) entry_ref ref; while (mfiles.GetNextRef(&name,&ref) == B_OK) { BPath path(&ref); - if ((path.InitCheck() == B_OK) || (ref.name == NULL) || (strcmp(ref.name, "") == 0)) - AddRow(new HEventRow(name.String(), path.Path())); - else + if ((path.InitCheck() != B_OK) || (ref.name == NULL) || (strcmp(ref.name, "") == 0)) AddRow(new HEventRow(name.String(), NULL)); + else + AddRow(new HEventRow(name.String(), path.Path())); } } diff --git a/src/preferences/sounds/HWindow.cpp b/src/preferences/sounds/HWindow.cpp index 599ac4a19d..b085d17b8c 100644 --- a/src/preferences/sounds/HWindow.cpp +++ b/src/preferences/sounds/HWindow.cpp @@ -73,8 +73,8 @@ HWindow::InitGUI() rect.top += 28; rect.bottom -= 7; fEventList = new HEventList(rect); - fEventList->SetType(BMediaFiles::B_SOUNDS); listView->AddChild(fEventList); + fEventList->SetType(BMediaFiles::B_SOUNDS); rect = Bounds(); rect.top = rect.bottom - 105;