X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=bookmarkinfodialog.cpp;h=18c16f7b64c14cb0bd39f770adddccb3382012a0;hb=43b8a9adfbf71b54c50d3b64f91e32635285add5;hp=7bdfb70e90620a1a25f9b6da6ad9f08f3a0570f8;hpb=6337ac23cc03c51054b8f208abf9eb832d65a39e;p=dorian diff --git a/bookmarkinfodialog.cpp b/bookmarkinfodialog.cpp index 7bdfb70..18c16f7 100644 --- a/bookmarkinfodialog.cpp +++ b/bookmarkinfodialog.cpp @@ -8,27 +8,27 @@ BookmarkInfoDialog::BookmarkInfoDialog(Book *b, int i, QWidget *parent): book(b), index(i) { - setWindowTitle(tr("Bookmark Details")); + setWindowTitle(tr("Bookmark details")); Book::Bookmark bookmark = book->bookmarks()[index]; QString label("At "); label += QString::number((int)(100 * book-> getProgress(bookmark.part, bookmark.pos))) + "%"; + if (!bookmark.note.isEmpty()) { + label += ": " + bookmark.note; + } + label += "\n"; int chapterIndex = book->chapterFromPart(bookmark.part); if (chapterIndex != -1) { QString chapterId = book->chapters[chapterIndex]; - label += ", in\n\"" + book->content[chapterId].name + "\""; + label += "In\"" + book->content[chapterId].name + "\""; } QLabel *info = new QLabel(label, this); addWidget(info); addStretch(); - - QPushButton *read = new QPushButton(tr("Go to"), this); - QPushButton *remove = new QPushButton(tr("Delete"), this); - connect(read, SIGNAL(clicked()), this, SLOT(onRead())); - connect(remove, SIGNAL(clicked()), this, SLOT(onRemove())); - addButton(read, QDialogButtonBox::ActionRole); - addButton(remove, QDialogButtonBox::DestructiveRole); + addButton(tr("Go to"), this, SLOT(onRead()), QDialogButtonBox::ActionRole); + addButton(tr("Delete"), this, SLOT(onRemove()), + QDialogButtonBox::DestructiveRole); } void BookmarkInfoDialog::onRead()