Ticket #7245: fix_devices-patch.diff

File fix_devices-patch.diff, 1.5 KB (added by Karvjorm, 12 years ago)

This should fix non-localized strings of the Devices application

  • src/apps/devices/Device.cpp

    diff --git a/src/apps/devices/Device.cpp b/src/apps/devices/Device.cpp
    index 5a5ef92..3194cf8 100644
    a b Device::~Device()  
    7373}
    7474
    7575
     76BString
     77Device::GetName()
     78{
     79    return fAttributeMap[B_TRANSLATE("Device name")];
     80}
     81
     82
     83BString
     84Device::GetManufacturer()
     85{
     86    return fAttributeMap[B_TRANSLATE("Manufacturer")];
     87}
     88
     89BString
     90Device::GetDriverUsed()
     91{
     92    return fAttributeMap[B_TRANSLATE("Driver used")];
     93}
     94
     95BString
     96Device::GetDevPathsPublished()
     97{
     98    return fAttributeMap[B_TRANSLATE("Device paths")];
     99}
     100
    76101void
    77102Device::SetAttribute(const BString& name, const BString& value)
    78103{
  • src/apps/devices/Device.h

    diff --git a/src/apps/devices/Device.h b/src/apps/devices/Device.h
    index 5b1dc0e..a125c89 100644
    a b public:  
    8181                                const BString& devPathsPublished = "unknown");
    8282    virtual                 ~Device();
    8383
    84     virtual BString         GetName()
    85                                 { return fAttributeMap["Device name"]; }
    86     virtual BString         GetManufacturer()
    87                                 { return fAttributeMap["Manufacturer"]; }
    88     virtual BString         GetDriverUsed()
    89                                 { return fAttributeMap["Driver used"]; }
    90     virtual BString         GetDevPathsPublished()
    91                                 { return fAttributeMap["Device paths"]; }
     84    virtual BString         GetName();
     85    virtual BString         GetManufacturer();                             
     86    virtual BString         GetDriverUsed();
     87    virtual BString         GetDevPathsPublished();
    9288    virtual Category        GetCategory() const
    9389                                { return fCategory; }
    9490    virtual Device*         GetPhysicalParent() const