~ubuntu-branches/ubuntu/vivid/fbreader/vivid-proposed

« back to all changes in this revision

Viewing changes to fbreader/src/collection/LastOpenedBooks.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Joey Hess
  • Date: 2008-01-23 16:51:07 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080123165107-5q19etahzd72c33a
Tags: 0.8.12-3
* Add libzlui-maemo which allows using fbreader on the maemo platform, on
  Debian. Thanks, Riku Voipio. Closes: #462299
* makefiles/arch/maemo.mk: Don't build with -thumb. (Riku)
* Loosen dependency versions some more, so it only depends on the current
  upstream version or higher, ignoring the Debian revision.
* Use binary:Version instead of deprecated Source-Version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * FBReader -- electronic book reader
3
 
 * Copyright (C) 2004-2007 Nikolay Pultsin <geometer@mawhrin.net>
4
 
 * Copyright (C) 2005 Mikhail Sobolev <mss@mawhrin.net>
 
2
 * Copyright (C) 2004-2008 Geometer Plus <contact@geometerplus.com>
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or modify
7
5
 * it under the terms of the GNU General Public License as published by
30
28
const std::string BOOK = "Book";
31
29
 
32
30
LastOpenedBooks::LastOpenedBooks() :
33
 
        MaxListSizeOption(ZLOption::STATE_CATEGORY, GROUP, "MaxSize", 1, 100, 10) {
 
31
        MaxListSizeOption(ZLCategoryKey::STATE, GROUP, "MaxSize", 1, 100, 10) {
34
32
 
35
33
        const int size = MaxListSizeOption.value();
36
34
        for (int i = 0; i < size; ++i) {
37
35
                std::string num = BOOK;
38
36
                ZLStringUtil::appendNumber(num, i);
39
 
                std::string name = ZLStringOption(ZLOption::STATE_CATEGORY, GROUP, num, "").value();
 
37
                std::string name = ZLStringOption(ZLCategoryKey::STATE, GROUP, num, "").value();
40
38
                if (!name.empty()) {
41
39
                        BookDescriptionPtr description = BookDescription::getDescription(name);
42
40
                        if (!description.isNull()) {
51
49
        for (int i = 0; i < size; ++i) {
52
50
                std::string num = BOOK;
53
51
                ZLStringUtil::appendNumber(num, i);
54
 
                ZLStringOption(ZLOption::STATE_CATEGORY, GROUP, num, "").setValue(myBooks[i]->fileName());
 
52
                ZLStringOption(ZLCategoryKey::STATE, GROUP, num, "").setValue(myBooks[i]->fileName());
55
53
        }
56
54
}
57
55