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

« back to all changes in this revision

Viewing changes to fbreader/src/fbreader/BookInfoDialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Eugene V. Lyubimkin
  • Date: 2008-06-17 23:01:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20080617230153-a16c45tq69j8geru
Tags: 0.8.17-11
* debian/control:
  - Enhanced all ZLibrary descriptions, not the main one.
  - Done some renaming to use canonical names of libraries and toolkits in
    decriptions, as suggested by developers-reference:
    'qt' -> 'Qt', 'gtk' -> 'GTK+', 'zlibrary' -> 'ZLibrary'.
  - Bump 'Depends' on quilt to (>= 0.24).
* debian/rules:
  - Included quilt makefile instead of quilt makefile instead
    of copy&paste'ing it.
* debian/fbreader.links:
  - Added this file to relay on dh_link's work instead of using 'ln -sf'
    directly in the debian/rules.

Show diffs side-by-side

added added

removed removed

Lines of Context:
149
149
}
150
150
 
151
151
const std::string &SeriesTitleEntry::initialValue() const {
152
 
        return myInfoDialog.myBookInfo.SequenceNameOption.value();
 
152
        return myInfoDialog.myBookInfo.SeriesNameOption.value();
153
153
}
154
154
 
155
155
const std::vector<std::string> &SeriesTitleEntry::values() const {
158
158
        valuesSet.insert(initialValue());
159
159
        valuesSet.insert("");
160
160
        if (!myOriginalAuthor.isNull()) {
161
 
                const Books &books = myInfoDialog.myCollection.books(myOriginalAuthor);
162
 
                for (Books::const_iterator it = books.begin(); it != books.end(); ++it) {
163
 
                        valuesSet.insert((*it)->sequenceName());
164
 
                }
 
161
                myInfoDialog.myCollection.collectSeriesNames(myOriginalAuthor, valuesSet);
165
162
        }
166
163
        AuthorPtr currentAuthor = myInfoDialog.myAuthorDisplayNameEntry->myCurrentAuthor;
167
164
        if (!currentAuthor.isNull() && (currentAuthor != myOriginalAuthor)) {
168
 
                const Books &books = myInfoDialog.myCollection.books(currentAuthor);
169
 
                for (Books::const_iterator it = books.begin(); it != books.end(); ++it) {
170
 
                        valuesSet.insert((*it)->sequenceName());
171
 
                }
 
165
                myInfoDialog.myCollection.collectSeriesNames(currentAuthor, valuesSet);
172
166
        }
173
167
        for (std::set<std::string>::const_iterator it = valuesSet.begin(); it != valuesSet.end(); ++it) {
174
168
                myValues.push_back(*it);
177
171
}
178
172
 
179
173
void SeriesTitleEntry::onAccept(const std::string &value) {
180
 
        myInfoDialog.myBookInfo.SequenceNameOption.setValue(value);
 
174
        myInfoDialog.myBookInfo.SeriesNameOption.setValue(value);
181
175
}
182
176
 
183
177
void SeriesTitleEntry::onValueSelected(int index) {
211
205
        languageCodes.push_back("de-traditional");
212
206
        myLanguageEntry = new ZLLanguageOptionEntry(myBookInfo.LanguageOption, languageCodes);
213
207
        mySeriesTitleEntry = new SeriesTitleEntry(*this);
214
 
        myBookNumberEntry = new ZLSimpleSpinOptionEntry(myBookInfo.NumberInSequenceOption, 1);
 
208
        myBookNumberEntry = new ZLSimpleSpinOptionEntry(myBookInfo.NumberInSeriesOption, 1);
215
209
 
216
210
        commonTab.addOption(ZLResourceKey("authorDisplayName"), myAuthorDisplayNameEntry);
217
211
        commonTab.addOption(ZLResourceKey("authorSortKey"), myAuthorSortKeyEntry);
233
227
        orderEntry->values().push_back("Third");
234
228
        orderEntry->values().push_back("Fourth");
235
229
        orderEntry->values().push_back("Fifth");
236
 
        sequenceTab.addOption(orderEntry);
 
230
        seriesTab.addOption(orderEntry);
237
231
        */
238
232
 
 
233
        ZLDialogContent &tagsTab = myDialog->createTab(ZLResourceKey("Tags"));
 
234
        tagsTab.addOption(ZLResourceKey("tags"), myBookInfo.TagsOption);
 
235
 
239
236
        FormatPlugin *plugin = PluginCollection::instance().plugin(ZLFile(fileName), false);
240
237
        if (plugin != 0) {
241
238
                myFormatInfoPage = plugin->createInfoPage(*myDialog, fileName);