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
This commit is contained in:
Rene Gollent
2008-11-15 16:38:54 +00:00
parent 1c532eedf1
commit d27b24661d
2 changed files with 6 additions and 6 deletions
+5 -5
View File
@@ -21,8 +21,8 @@ HEventRow::HEventRow(const char* name, const char* path)
: BRow(), : BRow(),
fName(name) fName(name)
{ {
SetPath(path);
SetField(new BStringField(name), kEventColumn); SetField(new BStringField(name), kEventColumn);
SetPath(path);
} }
@@ -48,7 +48,7 @@ HEventRow::Remove(const char *type)
HEventList::HEventList(BRect rect, const char* name) 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) fType(NULL)
{ {
AddColumn(new BStringColumn("Event", 150, 50, 500, B_TRUNCATE_MIDDLE), kEventColumn); AddColumn(new BStringColumn("Event", 150, 50, 500, B_TRUNCATE_MIDDLE), kEventColumn);
@@ -76,10 +76,10 @@ HEventList::SetType(const char* type)
entry_ref ref; entry_ref ref;
while (mfiles.GetNextRef(&name,&ref) == B_OK) { while (mfiles.GetNextRef(&name,&ref) == B_OK) {
BPath path(&ref); BPath path(&ref);
if ((path.InitCheck() == B_OK) || (ref.name == NULL) || (strcmp(ref.name, "") == 0)) if ((path.InitCheck() != B_OK) || (ref.name == NULL) || (strcmp(ref.name, "") == 0))
AddRow(new HEventRow(name.String(), path.Path()));
else
AddRow(new HEventRow(name.String(), NULL)); AddRow(new HEventRow(name.String(), NULL));
else
AddRow(new HEventRow(name.String(), path.Path()));
} }
} }
+1 -1
View File
@@ -73,8 +73,8 @@ HWindow::InitGUI()
rect.top += 28; rect.top += 28;
rect.bottom -= 7; rect.bottom -= 7;
fEventList = new HEventList(rect); fEventList = new HEventList(rect);
fEventList->SetType(BMediaFiles::B_SOUNDS);
listView->AddChild(fEventList); listView->AddChild(fEventList);
fEventList->SetType(BMediaFiles::B_SOUNDS);
rect = Bounds(); rect = Bounds();
rect.top = rect.bottom - 105; rect.top = rect.bottom - 105;