Ticket #12101: devices-fix.diff
File devices-fix.diff, 3.6 KB (added by , 9 years ago) |
---|
-
src/apps/devices/Device.cpp
diff --git a/src/apps/devices/Device.cpp b/src/apps/devices/Device.cpp index bc92b7b..3d345fa 100644
a b Attributes 125 125 Device::GetBusAttributes() 126 126 { 127 127 Attributes attributes; 128 attributes.push_back(Attribute( "None", ""));128 attributes.push_back(Attribute(B_TRANSLATE("None"), "")); 129 129 return attributes; 130 130 } 131 131 -
src/apps/devices/DevicePCI.cpp
diff --git a/src/apps/devices/DevicePCI.cpp b/src/apps/devices/DevicePCI.cpp index 0913373..173ecfd 100644
a b DevicePCI::GetBusAttributes() 129 129 BString 130 130 DevicePCI::GetBusStrings() 131 131 { 132 BString str( "Class Info:\t\t\t\t: %classInfo%");132 BString str(B_TRANSLATE("Class Info:\t\t\t\t: %classInfo%")); 133 133 str.ReplaceFirst("%classInfo%", fAttributeMap["Class Info"]); 134 134 return str; 135 135 } -
src/apps/devices/DeviceSCSI.cpp
diff --git a/src/apps/devices/DeviceSCSI.cpp b/src/apps/devices/DeviceSCSI.cpp index 84145f4..56f5186 100644
a b 4 4 * 5 5 * Authors: 6 6 * Alexander von Gluck, kallisti5@unixzen.com 7 * Modified by Jorma Karvonen, karvonen.jorma@gmail.com 7 8 */ 8 9 9 10 … … const char* SCSITypeMap[] = { 38 39 B_TRANSLATE("RBC"), // 0x0E 39 40 B_TRANSLATE("Card Reader"), // 0x0F 40 41 B_TRANSLATE("Bridge"), // 0x10 41 B_TRANSLATE("Other") // 0x11 42 B_TRANSLATE("Other"), // 0x11 43 B_TRANSLATE("Automation"), // 0x12 44 B_TRANSLATE("Security"), // 0x13 45 B_TRANSLATE("Reserved"), // 0x14 46 B_TRANSLATE("RMC"), // 0x15 47 B_TRANSLATE("Reserved"), // 0x16 48 B_TRANSLATE("Reserved"), // 0x17 49 B_TRANSLATE("Reserved"), // 0x18 50 B_TRANSLATE("Reserved"), // 0x19 51 B_TRANSLATE("Reserved"), // 0x1A 52 B_TRANSLATE("Reserved"), // 0x1B 53 B_TRANSLATE("Reserved"), // 0x1C 54 B_TRANSLATE("Reserved"), // 0x1D 55 B_TRANSLATE("Logical"), // 0x1E 56 B_TRANSLATE("Unknown") // 0x1F 42 57 }; 43 58 44 59 -
src/apps/devices/PropertyListPlain.cpp
diff --git a/src/apps/devices/PropertyListPlain.cpp b/src/apps/devices/PropertyListPlain.cpp index 44d1d03..0af7fd8 100644
a b 5 5 * Author: 6 6 * Artur Wyszynski <harakash@gmail.com> 7 7 * Modified by Pieter Panman 8 * Modified by Jorma Karvonen <karvonen.jorma@gmail.com> 8 9 */ 9 10 10 11 #include "PropertyListPlain.h" … … (this hunk was shorter than expected) 18 19 #include <String.h> 19 20 #include <StringView.h> 20 21 #include <TextView.h> 21 22 22 23 #include "Device.h" 23 24 24 25 PropertyListPlain::PropertyListPlain(const char* name) 25 26 : … … PropertyListPlain::AddAttributes(const Attributes& attributes) 44 48 BGroupLayoutBuilder layout(B_VERTICAL); 45 49 BTextView* view = new BTextView(BRect(0, 0, 1000, 1000), 46 50 "", BRect(5, 5, 995, 995), B_FOLLOW_ALL_SIDES); 51 int length = 0; 47 52 48 53 view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); 49 54 view->MakeEditable(false); 55 56 for (unsigned int i = 0; i < attributes.size(); i++) { 57 if (attributes[i].fName.Length() > length) { 58 length = attributes[i].fName.Length(); 59 } 60 } 50 61 51 62 for (unsigned int i = 0; i < attributes.size(); i++) { 52 63 BString attributeLine; 53 attributeLine << attributes[i].fName 54 << "\t" << attributes[i].fValue << "\n"; 64 attributeLine << attributes[i].fName; 65 if (attributes[i].fName.Length() < length) { 66 for (int j = attributes[i].fName.Length(); j < length; j++) { 67 attributeLine << " "; 68 } 69 /* TODO: The following is a workaround of a layout (?) bug */ 70 if (attributes[i].fName == "device/id") 71 attributeLine << "\t"; 72 /* TODO: Another layout (?) bug with the SCSI Device name */ 73 } 74 attributeLine << "\t" << attributes[i].fValue << "\n"; 55 75 view->Insert(attributeLine); 56 76 57 77 view->SetExplicitAlignment(