| 356 | |
| 357 | |
| 358 | bool Bookmark::Load(tExpr expr) |
| 359 | { |
| 360 | Items.Empty(); |
| 361 | if (expr.Item0() != "Bookmark") |
| 362 | return false; |
| 363 | |
| 364 | if (expr.CountItems() < 3) |
| 365 | return false; |
| 366 | |
| 367 | switch (expr.Item1().Hash()) |
| 368 | { |
| 369 | case tHash::tHashCT("User"): BookmarkType = Type::User; break; |
| 370 | case tHash::tHashCT("Home"): BookmarkType = Type::Home; break; |
| 371 | case tHash::tHashCT("Root"): BookmarkType = Type::Root; break; |
| 372 | } |
| 373 | |
| 374 | for (tExpr e = expr.Item2(); e.IsValid(); e = e.Next()) |
| 375 | Items.Append(new tStringItem(e.GetAtomString())); |
| 376 | |
| 377 | return false; |
| 378 | } |
| 379 | |
| 380 | |
| 381 | bool Bookmark::operator==(const Bookmark& b) const |