summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYoann Laissus <yoann.laissus@gmail.com>2010-08-10 15:07:56 +0200
committerYoann Laissus <yoann.laissus@gmail.com>2010-08-10 15:07:56 +0200
commite9e94ec1c9b7ca214d6a7e04ed0c28c363b77957 (patch)
tree02e278c4b2b239c065b8baefd863f728592097d3 /src
parentMerge branch 'm155' (diff)
downloadrekonq-e9e94ec1c9b7ca214d6a7e04ed0c28c363b77957.tar.xz
- Fix bookmarks' text which is truncated in some places (new tab page, some dialogues, ...)
- Fix bookmark icons with the bookmark panel BUG: 247196
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/bookmarkcontextmenu.cpp10
-rw-r--r--src/bookmarks/bookmarkspanel.cpp5
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp4
-rw-r--r--src/newtabpage.cpp4
4 files changed, 12 insertions, 11 deletions
diff --git a/src/bookmarks/bookmarkcontextmenu.cpp b/src/bookmarks/bookmarkcontextmenu.cpp
index e731d982..96668003 100644
--- a/src/bookmarks/bookmarkcontextmenu.cpp
+++ b/src/bookmarks/bookmarkcontextmenu.cpp
@@ -214,7 +214,7 @@ void BookmarkContextMenu::deleteBookmark()
KBookmark bm = bookmark();
KBookmarkGroup bmg = bm.parentGroup();
bool folder = bm.isGroup();
- QString name = QString(bm.text()).replace("&&", "&");
+ QString name = QString(bm.fullText()).replace("&&", "&");
if (KMessageBox::warningContinueCancel(
QApplication::activeWindow(),
@@ -237,10 +237,10 @@ void BookmarkContextMenu::deleteBookmark()
void BookmarkContextMenu::editBookmark()
{
KBookmark selected = bookmark();
- selected.setFullText(selected.text().replace("&&", "&"));
+ selected.setFullText(selected.fullText().replace("&&", "&"));
KBookmarkDialog *dialog = owner()->bookmarkDialog(manager(), QApplication::activeWindow());
dialog->editBookmark(selected);
- selected.setFullText(selected.text().replace('&', "&&"));
+ selected.setFullText(selected.fullText().replace('&', "&&"));
delete dialog;
}
@@ -322,13 +322,13 @@ void BookmarkContextMenu::bookmarkCurrentPage()
if (selected.isGroup())
parent = selected.toGroup();
- KBookmark newBk = parent.addBookmark(owner()->currentTitle().replace('&', "&&"), KUrl(owner()->currentUrl()), "text-html");
+ KBookmark newBk = parent.addBookmark(owner()->currentTitle().replace('&', "&&"), KUrl(owner()->currentUrl()));
parent.moveBookmark(newBk, selected.parentGroup().previous(selected));
}
else
{
- parent.addBookmark(owner()->currentTitle(), KUrl(owner()->currentUrl()), "text-html");
+ parent.addBookmark(owner()->currentTitle(), KUrl(owner()->currentUrl()));
}
manager()->emitChanged(parent);
diff --git a/src/bookmarks/bookmarkspanel.cpp b/src/bookmarks/bookmarkspanel.cpp
index 5e11601a..75d8faf3 100644
--- a/src/bookmarks/bookmarkspanel.cpp
+++ b/src/bookmarks/bookmarkspanel.cpp
@@ -220,11 +220,12 @@ void BookmarksPanel::deleteBookmark()
KBookmark bm = bookmarkForIndex(index);
KBookmarkGroup bmg = bm.parentGroup();
bool folder = bm.isGroup();
+ QString name = QString(bm.fullText()).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(),
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index b58b66e9..7063bf9b 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -69,9 +69,9 @@ QVariant BtmItem::data(int role) const
{
QString tooltip = "";
- if (!m_kbm.text().isEmpty())
+ if (!m_kbm.fullText().isEmpty())
{
- tooltip += m_kbm.text();
+ tooltip += m_kbm.fullText();
}
if (m_kbm.isGroup())
{
diff --git a/src/newtabpage.cpp b/src/newtabpage.cpp
index bbf6714e..62b97d4d 100644
--- a/src/newtabpage.cpp
+++ b/src/newtabpage.cpp
@@ -472,7 +472,7 @@ void NewTabPage::createBookItem(const KBookmark &bookmark, QWebElement parent)
KBookmarkGroup group = bookmark.toGroup();
KBookmark bm = group.first();
parent.appendInside(markup("h3"));
- parent.lastChild().setPlainText(group.text());
+ parent.lastChild().setPlainText(group.fullText());
parent.appendInside(markup(".bookfolder"));
while (!bm.isNull())
{
@@ -488,7 +488,7 @@ void NewTabPage::createBookItem(const KBookmark &bookmark, QWebElement parent)
{
parent.appendInside(markup("a"));
parent.lastChild().setAttribute("href" , bookmark.url().prettyUrl());
- parent.lastChild().setPlainText(bookmark.text());
+ parent.lastChild().setPlainText(bookmark.fullText());
parent.appendInside("<br/>");
}
}