Ticket #2097: Control.diff

File Control.diff, 857 bytes (added by shinta, 17 years ago)
  • src/kits/interface/Control.cpp

     
    8282        SetMessage(new BMessage(message));
    8383
    8484    const char *label;
    85     if (archive->FindString("_label", &label) != B_OK)
     85    if (archive->FindString("_label", &label) == B_OK)
    8686        SetLabel(label);
    8787
    8888    int32 value;
    89     if (archive->FindInt32("_val", &value) != B_OK)
     89    if (archive->FindInt32("_val", &value) == B_OK)
    9090        SetValue(value);
    9191
    9292    bool toggle;
    93     if (archive->FindBool("_disable", &toggle) != B_OK)
     93    if (archive->FindBool("_disable", &toggle) == B_OK)
    9494        SetEnabled(!toggle);
    9595
    96     if (archive->FindBool("be:wants_nav", &toggle) != B_OK)
     96    if (archive->FindBool("be:wants_nav", &toggle) == B_OK)
    9797        fWantsNav = toggle;
    9898}
    9999