diff options
Diffstat (limited to 'src/bookmarks')
-rw-r--r-- | src/bookmarks/bookmarkcontextmenu.cpp | 10 | ||||
-rw-r--r-- | src/bookmarks/bookmarksmanager.cpp | 10 | ||||
-rw-r--r-- | src/bookmarks/bookmarkstreemodel.cpp | 2 |
3 files changed, 14 insertions, 8 deletions
diff --git a/src/bookmarks/bookmarkcontextmenu.cpp b/src/bookmarks/bookmarkcontextmenu.cpp index 47608710..4422763a 100644 --- a/src/bookmarks/bookmarkcontextmenu.cpp +++ b/src/bookmarks/bookmarkcontextmenu.cpp @@ -213,11 +213,12 @@ void BookmarkContextMenu::deleteBookmark() { KBookmark bm = bookmark(); bool folder = bm.isGroup(); + QString name = QString(bm.text()).replace("&&", "&"); if (KMessageBox::warningContinueCancel( QApplication::activeWindow(), - folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", bm.text()) - : i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", bm.text()), + folder ? i18n("Are you sure you wish to remove the bookmark folder\n\"%1\"?", name) + : i18n("Are you sure you wish to remove the bookmark\n\"%1\"?", name), folder ? i18n("Bookmark Folder Deletion") : i18n("Bookmark Deletion"), KStandardGuiItem::del()) @@ -233,9 +234,10 @@ void BookmarkContextMenu::deleteBookmark() void BookmarkContextMenu::editBookmark() { KBookmark selected = bookmark(); - + selected.setFullText(selected.text().replace("&&", "&")); KBookmarkDialog *dialog = owner()->bookmarkDialog(manager(), QApplication::activeWindow()); dialog->editBookmark(selected); + selected.setFullText(selected.text().replace('&', "&&")); delete dialog; } @@ -317,7 +319,7 @@ void BookmarkContextMenu::bookmarkCurrentPage() if (selected.isGroup()) parent = selected.toGroup(); - KBookmark newBk = parent.addBookmark(owner()->currentTitle(), KUrl(owner()->currentUrl()), "text-html"); + KBookmark newBk = parent.addBookmark(owner()->currentTitle().replace('&', "&&"), KUrl(owner()->currentUrl()), "text-html"); parent.moveBookmark(newBk, selected.parentGroup().previous(selected)); } diff --git a/src/bookmarks/bookmarksmanager.cpp b/src/bookmarks/bookmarksmanager.cpp index 03146ea2..c430078b 100644 --- a/src/bookmarks/bookmarksmanager.cpp +++ b/src/bookmarks/bookmarksmanager.cpp @@ -100,8 +100,10 @@ void BookmarkOwner::openFolderinTabs(const KBookmarkGroup &bookmark) if (urlList.length() > 8) { if ( !(KMessageBox::warningContinueCancel( Application::instance()->mainWindow(), - i18n("You are about to open %1 tabs.\nAre you sure ?", - QString::number( urlList.length() )) + i18ncp("%1=Number of tabs. Value is always >=8", + "You are about to open %1 tabs.\nAre you sure?", + "You are about to open %1 tabs.\nAre you sure?", + urlList.length()) ) == KMessageBox::Continue) ) return; @@ -409,7 +411,9 @@ void BookmarkProvider::fillBookmarkBar(KToolBar *toolBar) else { - toolBar->addAction(new KBookmarkAction(bookmark, m_owner, this)); + KBookmarkAction* a = new KBookmarkAction(bookmark, m_owner, this); + a->setIconText(a->iconText().replace('&', "&&")); + toolBar->addAction(a); } } } diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp index 06732007..a865a99d 100644 --- a/src/bookmarks/bookmarkstreemodel.cpp +++ b/src/bookmarks/bookmarkstreemodel.cpp @@ -75,7 +75,7 @@ QVariant BtmItem::data(int role) const } if (m_kbm.isGroup()) { - tooltip += " [" + QString::number(childCount()) + ' ' + i18n("Items") + ']'; + tooltip += i18nc("%1=Number of items in bookmark folder", " (%1 items)", childCount()); } if (!m_kbm.url().url().isEmpty()) { |