Ticket #11849: fix.patch

File fix.patch, 1.0 KB (added by atalax, 10 years ago)
  • src/preferences/shortcuts/ShortcutsSpec.cpp

    diff --git a/src/preferences/shortcuts/ShortcutsSpec.cpp b/src/preferences/shortcuts/ShortcutsSpec.cpp
    index b4a651b..3bb63e2 100644
    a b ShortcutsSpec::ShortcutsSpec(BMessage* from)  
    191191            printf(" Error, no modifiers int32 in archive BMessage!\n");
    192192        }
    193193
    194     const char* string;
    195     for (int i = 0; (string = from->GetString("strings", i, NULL)); i++)
    196         SetField(new BStringField(string), i);
     194    for (int i = 0; i <= STRING_COLUMN_INDEX; i++)
     195        SetField(new BStringField(GetCellText(i)), i);
    197196}
    198197
    199198
    ShortcutsSpec::Archive(BMessage* into, bool deep) const  
    226225
    227226    into->AddString("class", "ShortcutsSpec");
    228227
    229     for (int i = 0; i < CountFields(); i++) {
    230         const BStringField* field =
    231             static_cast<const BStringField*>(GetField(i));
    232         into->AddString("strings", field->String());
    233     }
    234 
    235228    // These fields are for our prefs panel's benefit only
    236229    into->AddString("command", fCommand);
    237230    into->AddInt32("key", fKey);