Author: pulkomandy Date: 2010-12-13 22:44:51 +0100 (Mon, 13 Dec 2010) New Revision: 39839 Changeset: http://dev.haiku-os.org/changeset/39839 Modified: haiku/trunk/src/apps/devices/Device.cpp haiku/trunk/src/apps/devices/DeviceACPI.cpp haiku/trunk/src/apps/devices/DevicePCI.cpp haiku/trunk/src/apps/devices/PropertyList.cpp haiku/trunk/src/apps/devices/ResourceUsageWindow.cpp Log: 80 column fix for devices Modified: haiku/trunk/src/apps/devices/Device.cpp =================================================================== --- haiku/trunk/src/apps/devices/Device.cpp 2010-12-13 21:40:07 UTC (rev 39838) +++ haiku/trunk/src/apps/devices/Device.cpp 2010-12-13 21:44:51 UTC (rev 39839) @@ -18,7 +18,7 @@ // This list comes from the pciid list, except for the last one const char* kCategoryString[] = { - B_TRANSLATE("Unclassified device"), // 0x00 + B_TRANSLATE("Unclassified device"), // 0x00 B_TRANSLATE("Mass storage controller"), // 0x01 B_TRANSLATE("Network controller"), // 0x02 B_TRANSLATE("Display controller"), // 0x03 @@ -32,12 +32,12 @@ B_TRANSLATE("Processor"), // 0x0b B_TRANSLATE("Serial bus controller"), // 0x0c B_TRANSLATE("Wireless controller"), // 0x0d - B_TRANSLATE("Intelligent controller"), // 0x0e - B_TRANSLATE("Satellite communications controller"), // 0x0f + B_TRANSLATE("Intelligent controller"), // 0x0e + B_TRANSLATE("Satellite communications controller"), // 0x0f B_TRANSLATE("Encryption controller"), // 0x10 - B_TRANSLATE("Signal processing controller"), // 0x11 - B_TRANSLATE("Computer"), // 0x12 (added later) - B_TRANSLATE("ACPI controller") // 0x13 (added later) + B_TRANSLATE("Signal processing controller"), // 0x11 + B_TRANSLATE("Computer"), // 0x12 (added later) + B_TRANSLATE("ACPI controller") // 0x13 (added later) }; @@ -77,7 +77,8 @@ { Attributes attributes; attributes.push_back(Attribute(B_TRANSLATE("Device name:"), GetName())); - attributes.push_back(Attribute(B_TRANSLATE("Manufacturer:"), GetManufacturer())); + attributes.push_back(Attribute(B_TRANSLATE("Manufacturer:"), + GetManufacturer())); return attributes; } Modified: haiku/trunk/src/apps/devices/DeviceACPI.cpp =================================================================== --- haiku/trunk/src/apps/devices/DeviceACPI.cpp 2010-12-13 21:40:07 UTC (rev 39838) +++ haiku/trunk/src/apps/devices/DeviceACPI.cpp 2010-12-13 21:44:51 UTC (rev 39839) @@ -49,7 +49,8 @@ outlineName = B_TRANSLATE("ACPI Thermal Zone"); } else if (rootACPIPath == "\\_PR_.") { // each CPU node is considered a root node - outlineName << B_TRANSLATE("ACPI Processor Namespace '") << nodeACPIPath << "'"; + outlineName << B_TRANSLATE("ACPI Processor Namespace '") + << nodeACPIPath << "'"; } else if (rootACPIPath == "\\_SI_") { outlineName = B_TRANSLATE("ACPI System Indicator"); } else { Modified: haiku/trunk/src/apps/devices/DevicePCI.cpp =================================================================== --- haiku/trunk/src/apps/devices/DevicePCI.cpp 2010-12-13 21:40:07 UTC (rev 39838) +++ haiku/trunk/src/apps/devices/DevicePCI.cpp 2010-12-13 21:44:51 UTC (rev 39839) @@ -67,7 +67,8 @@ // Fetch ClassInfo char classInfo[64]; - get_class_info(fClassBaseId, fClassSubId, fClassApiId, classInfo, sizeof(classInfo)); + get_class_info(fClassBaseId, fClassSubId, fClassApiId, classInfo, + sizeof(classInfo)); // Fetch ManufacturerName BString ManufacturerName; @@ -86,7 +87,8 @@ BString DeviceName; const char *devShort; const char *devFull; - get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId, &devShort, &devFull); + get_device_info(fVendorId, fDeviceId, fSubsystemVendorId, fSubSystemId, + &devShort, &devFull); if (!devShort && !devFull) { DeviceName << "Unknown"; } else if (devShort && devFull) { Modified: haiku/trunk/src/apps/devices/PropertyList.cpp =================================================================== --- haiku/trunk/src/apps/devices/PropertyList.cpp 2010-12-13 21:40:07 UTC (rev 39838) +++ haiku/trunk/src/apps/devices/PropertyList.cpp 2010-12-13 21:44:51 UTC (rev 39839) @@ -50,8 +50,8 @@ AddColumn(nameColumn = new BStringColumn(B_TRANSLATE("Name"), 150, 50, 500, B_TRUNCATE_MIDDLE), kNameColumn); - AddColumn(new BStringColumn(B_TRANSLATE("Value"), 150, 50, 500, B_TRUNCATE_END), - kValueColumn); + AddColumn(new BStringColumn(B_TRANSLATE("Value"), 150, 50, 500, + B_TRUNCATE_END), kValueColumn); SetSortColumn(nameColumn, false, true); } Modified: haiku/trunk/src/apps/devices/ResourceUsageWindow.cpp =================================================================== --- haiku/trunk/src/apps/devices/ResourceUsageWindow.cpp 2010-12-13 21:40:07 UTC (rev 39838) +++ haiku/trunk/src/apps/devices/ResourceUsageWindow.cpp 2010-12-13 21:44:51 UTC (rev 39839) @@ -14,7 +14,7 @@ // ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ -// Includes ------------------------------------------------------------------------------------------ // +// Includes ------------------------------------------------------------------ #include <Box.h> #include <Catalog.h> #include <Screen.h> @@ -184,18 +184,19 @@ } -// -------------------------------------------------------------------------------------------------- // +// ---------------------------------------------------------------------------- // ResourceUsageWindow - Constructor ResourceUsageWindow::ResourceUsageWindow(BRect frame, BList &list) - : BWindow (frame, "Resource Usage", B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE) + : BWindow (frame, "Resource Usage", B_TITLED_WINDOW_LOOK, + B_NORMAL_WINDOW_FEEL , B_NOT_ZOOMABLE|B_NOT_RESIZABLE) { InitWindow(list); CenterOnScreen(); Show(); } -// -------------------------------------------------------------------------------------------------- // +// ---------------------------------------------------------------------------- // ResourceUsageWindow - Destructor @@ -203,7 +204,7 @@ { } -// -------------------------------------------------------------------------------------------------- // +// ---------------------------------------------------------------------------- // ResourceUsageWindow::InitWindow -- Initialization Commands here @@ -225,23 +226,29 @@ rtab.InsetBy(5,5); // Create the ListViews - BListView *IRQListView = new BListView(rlist, "IRQListView", B_SINGLE_SELECTION_LIST, - B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); - BListView *DMAListView = new BListView(rlist, "DMAListView", B_SINGLE_SELECTION_LIST, - B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); - BListView *IORangeListView = new BListView(rlist, "IORangeListView", B_SINGLE_SELECTION_LIST, - B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); - BListView *memoryListView = new BListView(rlist, "memoryListView", B_SINGLE_SELECTION_LIST, - B_FOLLOW_LEFT | B_FOLLOW_TOP, B_WILL_DRAW | B_NAVIGABLE); + BListView *IRQListView = new BListView(rlist, "IRQListView", + B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); + BListView *DMAListView = new BListView(rlist, "DMAListView", + B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); + BListView *IORangeListView = new BListView(rlist, "IORangeListView", + B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); + BListView *memoryListView = new BListView(rlist, "memoryListView", + B_SINGLE_SELECTION_LIST, B_FOLLOW_LEFT | B_FOLLOW_TOP, + B_WILL_DRAW | B_NAVIGABLE); - BScrollView *IRQScrollView = new BScrollView("scroll_list1", IRQListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, - 0, false, true, B_FANCY_BORDER); - BScrollView *DMAScrollView = new BScrollView("scroll_list2", DMAListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, - 0, false, true, B_FANCY_BORDER); - BScrollView *IORangeScrollView = new BScrollView("scroll_list3", IORangeListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, - 0, false, true, B_FANCY_BORDER); - BScrollView *memoryScrollView = new BScrollView("scroll_list4", memoryListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, - 0, false, true, B_FANCY_BORDER); + BScrollView *IRQScrollView = new BScrollView("scroll_list1", IRQListView, + B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER); + BScrollView *DMAScrollView = new BScrollView("scroll_list2", DMAListView, + B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, B_FANCY_BORDER); + BScrollView *IORangeScrollView = new BScrollView("scroll_list3", + IORangeListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, + B_FANCY_BORDER); + BScrollView *memoryScrollView = new BScrollView("scroll_list4", + memoryListView, B_FOLLOW_LEFT|B_FOLLOW_TOP, 0, false, true, + B_FANCY_BORDER); BTab *tab = new BTab(); tabView->AddTab(IRQScrollView, tab); @@ -267,14 +274,16 @@ struct device_configuration *current = deviceInfo->GetCurrent(); resource_descriptor r; - int32 num = count_resource_descriptors_of_type(current, B_IRQ_RESOURCE); + int32 num = count_resource_descriptors_of_type(current, + B_IRQ_RESOURCE); for (int32 k=0;k<num;k++) { get_nth_resource_descriptor_of_type(current, k, B_IRQ_RESOURCE, &r, sizeof(resource_descriptor)); if (mask & r.d.m.mask) { - IRQListView->AddItem(new IRQDMAItem(first ? i : -1, deviceInfo->GetCardName())); + IRQListView->AddItem(new IRQDMAItem(first ? i : -1, + deviceInfo->GetCardName())); first = false; } } @@ -297,14 +306,16 @@ struct device_configuration *current = deviceInfo->GetCurrent(); resource_descriptor r; - int32 num = count_resource_descriptors_of_type(current, B_DMA_RESOURCE); + int32 num = count_resource_descriptors_of_type(current, + B_DMA_RESOURCE); for (int32 k=0;k<num;k++) { - get_nth_resource_descriptor_of_type(current, k, B_DMA_RESOURCE, - &r, sizeof(resource_descriptor)); + get_nth_resource_descriptor_of_type(current, k, + B_DMA_RESOURCE, &r, sizeof(resource_descriptor)); if (mask & r.d.m.mask) { - DMAListView->AddItem(new IRQDMAItem(first ? i : -1, deviceInfo->GetCardName())); + DMAListView->AddItem(new IRQDMAItem(first ? i : -1, + deviceInfo->GetCardName())); first = false; } } @@ -322,11 +333,12 @@ struct device_configuration *current = deviceInfo->GetCurrent(); resource_descriptor r; - int32 num = count_resource_descriptors_of_type(current, B_IO_PORT_RESOURCE); + int32 num = count_resource_descriptors_of_type(current, + B_IO_PORT_RESOURCE); for (int32 k=0;k<num;k++) { - get_nth_resource_descriptor_of_type(current, k, B_IO_PORT_RESOURCE, - &r, sizeof(resource_descriptor)); + get_nth_resource_descriptor_of_type(current, k, + B_IO_PORT_RESOURCE, &r, sizeof(resource_descriptor)); IORangeListView->AddItem(new RangeItem(r.d.r.minbase, r.d.r.minbase + r.d.r.len - 1, deviceInfo->GetCardName())); @@ -342,7 +354,8 @@ struct device_configuration *current = deviceInfo->GetCurrent(); resource_descriptor r; - int32 num = count_resource_descriptors_of_type(current, B_MEMORY_RESOURCE); + int32 num = count_resource_descriptors_of_type(current, + B_MEMORY_RESOURCE); for (int32 k=0;k<num;k++) { get_nth_resource_descriptor_of_type(current, k, B_MEMORY_RESOURCE, @@ -362,7 +375,7 @@ AddChild(background); background->AddChild(tabView); } -// -------------------------------------------------------------------------------------------------- // +// ---------------------------------------------------------------------------- // ResourceUsageWindow::MessageReceived -- receives messages @@ -376,4 +389,4 @@ break; } } -// -------------------------------------------------------------------------------------------------- // +// ----------------------------------------------------------------------------