summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bookmarks/bookmarkscontextmenu.cpp11
-rw-r--r--src/bookmarks/bookmarkscontextmenu.h8
-rw-r--r--src/bookmarks/bookmarkstoolbar.cpp9
-rw-r--r--src/bookmarks/bookmarkstreemodel.cpp7
-rw-r--r--src/tabbar.cpp8
-rw-r--r--src/tabbar.h1
6 files changed, 35 insertions, 9 deletions
diff --git a/src/bookmarks/bookmarkscontextmenu.cpp b/src/bookmarks/bookmarkscontextmenu.cpp
index 25cb9f24..1def2592 100644
--- a/src/bookmarks/bookmarkscontextmenu.cpp
+++ b/src/bookmarks/bookmarkscontextmenu.cpp
@@ -36,9 +36,10 @@
#include <KBookmarkManager>
-BookmarksContextMenu::BookmarksContextMenu(const KBookmark &bookmark, KBookmarkManager *manager, BookmarkOwner *owner, QWidget *parent)
+BookmarksContextMenu::BookmarksContextMenu(const KBookmark &bookmark, KBookmarkManager *manager, BookmarkOwner *owner, bool nullForced, QWidget *parent)
: KBookmarkContextMenu(bookmark, manager, owner, parent)
, m_bmOwner(owner)
+ , m_nullForced(nullForced)
{
}
@@ -132,17 +133,17 @@ void BookmarksContextMenu::addNullActions()
void BookmarksContextMenu::addActions()
{
- if (bookmark().isGroup())
+ if (bookmark().isNull() || m_nullForced)
{
- addFolderActions();
+ addNullActions();
}
else if (bookmark().isSeparator())
{
addSeparatorActions();
}
- else if (bookmark().isNull())
+ else if (bookmark().isGroup())
{
- addNullActions();
+ addFolderActions();
}
else
{
diff --git a/src/bookmarks/bookmarkscontextmenu.h b/src/bookmarks/bookmarkscontextmenu.h
index 416416ef..34ef66e0 100644
--- a/src/bookmarks/bookmarkscontextmenu.h
+++ b/src/bookmarks/bookmarkscontextmenu.h
@@ -36,8 +36,11 @@ class BookmarkOwner;
class BookmarksContextMenu : public KBookmarkContextMenu
{
public:
- BookmarksContextMenu(const KBookmark &bookmark, KBookmarkManager *manager, BookmarkOwner *owner, QWidget *parent = 0);
-
+ BookmarksContextMenu(const KBookmark &bookmark,
+ KBookmarkManager *manager,
+ BookmarkOwner *owner,
+ bool nullForced = false,
+ QWidget *parent = 0);
virtual void addActions();
private:
@@ -47,6 +50,7 @@ private:
void addNullActions();
BookmarkOwner *m_bmOwner;
+ bool m_nullForced;
};
#endif // BOOKMARKS_CONTEXT_MENU_H
diff --git a/src/bookmarks/bookmarkstoolbar.cpp b/src/bookmarks/bookmarkstoolbar.cpp
index 57d56fff..1f1e38c3 100644
--- a/src/bookmarks/bookmarkstoolbar.cpp
+++ b/src/bookmarks/bookmarkstoolbar.cpp
@@ -189,13 +189,18 @@ KToolBar* BookmarkToolBar::toolBar()
void BookmarkToolBar::contextMenu(const QPoint &point)
{
KBookmarkActionInterface *action = dynamic_cast<KBookmarkActionInterface*>(toolBar()->actionAt(point));
- KBookmark bookmark;
+ KBookmark bookmark = rApp->bookmarkProvider()->bookmarkManager()->toolbar();
+ bool nullAction = true;
if (action)
+ {
bookmark = action->bookmark();
+ nullAction = false;
+ }
BookmarksContextMenu menu(bookmark,
rApp->bookmarkProvider()->bookmarkManager(),
- rApp->bookmarkProvider()->bookmarkOwner());
+ rApp->bookmarkProvider()->bookmarkOwner(),
+ nullAction);
menu.exec(toolBar()->mapToGlobal(point));
}
diff --git a/src/bookmarks/bookmarkstreemodel.cpp b/src/bookmarks/bookmarkstreemodel.cpp
index 8d82e2b0..1e2e462f 100644
--- a/src/bookmarks/bookmarkstreemodel.cpp
+++ b/src/bookmarks/bookmarkstreemodel.cpp
@@ -94,6 +94,13 @@ QVariant BtmItem::data(int role) const
tooltip += url;
}
+ if (!m_kbm.description().isEmpty())
+ {
+ if (!tooltip.isEmpty())
+ tooltip += '\n';
+ tooltip += m_kbm.description();
+ }
+
return tooltip;
}
diff --git a/src/tabbar.cpp b/src/tabbar.cpp
index 1ab357f2..d2e0ff17 100644
--- a/src/tabbar.cpp
+++ b/src/tabbar.cpp
@@ -87,6 +87,7 @@ TabBar::TabBar(QWidget *parent)
connect(this, SIGNAL(contextMenu(int, const QPoint &)), this, SLOT(contextMenu(int, const QPoint &)));
connect(this, SIGNAL(emptyAreaContextMenu(const QPoint &)), this, SLOT(emptyAreaContextMenu(const QPoint &)));
+ connect(this, SIGNAL(tabMoved(int,int)), this, SLOT(tabMoved(int,int)));
connect(m_animationMapper, SIGNAL(mapped(int)), this, SLOT(removeAnimation(int)));
setGraphicsEffect(m_tabHighlightEffect);
@@ -303,6 +304,13 @@ void TabBar::mousePressEvent(QMouseEvent *event)
}
+void TabBar::tabMoved(int, int)
+{
+ MainView *mv = qobject_cast<MainView *>(parent());
+ QTimer::singleShot(200, mv, SIGNAL(tabsChanged()));
+}
+
+
void TabBar::contextMenu(int tab, const QPoint &pos)
{
setupHistoryActions();
diff --git a/src/tabbar.h b/src/tabbar.h
index c7bf88e6..5d4c6d63 100644
--- a/src/tabbar.h
+++ b/src/tabbar.h
@@ -94,6 +94,7 @@ private slots:
void contextMenu(int, const QPoint &);
void emptyAreaContextMenu(const QPoint &);
+ void tabMoved(int, int);
void showTabPreview();