| Index: shell/src/SubscriptionsCommand.cpp |
| =================================================================== |
| --- a/shell/src/SubscriptionsCommand.cpp |
| +++ b/shell/src/SubscriptionsCommand.cpp |
| @@ -7,21 +7,22 @@ namespace |
| { |
| typedef std::vector<AdblockPlus::SubscriptionPtr> SubscriptionList; |
| void ShowSubscriptionList(const SubscriptionList& subscriptions) |
| { |
| for (SubscriptionList::const_iterator it = subscriptions.begin(); |
| it != subscriptions.end(); it++) |
| { |
| - std::cout << (*it)->GetProperty("title", "(no title)") << " - " << (*it)->GetProperty("url", ""); |
| - if ((*it)->GetProperty("author", "") != "") |
| - std::cout << " - " << (*it)->GetProperty("author", ""); |
| - if ((*it)->GetProperty("specialization", "") != "") |
| - std::cout << " - " << (*it)->GetProperty("specialization", ""); |
| + std::cout << (*it)->GetProperty("title")->AsString(); |
| + std::cout << " - " << (*it)->GetProperty("url")->AsString(); |
| + if (!(*it)->GetProperty("author")->IsUndefined()) |
| + std::cout << " - " << (*it)->GetProperty("author")->AsString(); |
| + if (!(*it)->GetProperty("specialization")->IsUndefined()) |
| + std::cout << " - " << (*it)->GetProperty("specialization")->AsString(); |
| std::cout << std::endl; |
| } |
| } |
| } |
| SubscriptionsCommand::SubscriptionsCommand( |
| AdblockPlus::FilterEngine& filterEngine) |
| : Command("subscriptions"), filterEngine(filterEngine) |