From a48a5a4157e9af22adb3a7673203ed8ced5ceeab Mon Sep 17 00:00:00 2001 From: Yoann Laissus Date: Tue, 6 Apr 2010 12:43:21 +0200 Subject: - Enable context menu for folders and separators of the bookmark bar - Use the same context menu for the bookmark panel and the bookmark bar - Use a list to store the different bookmark bars - Fix the different crashes when there are more than one window - When the bookmarks are changed, all the bars are refreshed --- src/history/historypanel.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/history') diff --git a/src/history/historypanel.cpp b/src/history/historypanel.cpp index 03f2b880..ec84bc02 100644 --- a/src/history/historypanel.cpp +++ b/src/history/historypanel.cpp @@ -121,7 +121,6 @@ void HistoryPanel::setup() void HistoryPanel::contextMenuItem(const QPoint &pos) { - QPoint position = m_treeView->mapToGlobal(pos); KMenu *menu = new KMenu(this); KAction* action; @@ -143,12 +142,11 @@ void HistoryPanel::contextMenuItem(const QPoint &pos) if (!menu) return; - menu->popup(position); + menu->popup(m_treeView->mapToGlobal(pos)); } void HistoryPanel::contextMenuGroup(const QPoint &pos) { - QPoint position = m_treeView->mapToGlobal(pos); KMenu *menu = new KMenu(this); KAction* action; @@ -159,7 +157,7 @@ void HistoryPanel::contextMenuGroup(const QPoint &pos) if (!menu) return; - menu->popup(position); + menu->popup(m_treeView->mapToGlobal(pos)); } void HistoryPanel::openAll() @@ -173,9 +171,9 @@ void HistoryPanel::openAll() for(int i = 0; i < index.model()->rowCount(index); i++) allChild << qVariantValue(index.child(i, 0).data(Qt::UserRole)); - if(allChild.length() > 8) // 8, a good choice ? + if(allChild.length() > 8) { - if(!(KMessageBox::warningContinueCancel(this, i18n("You are about to open a lot of tabs : %1\nAre you sure ?", QString::number(allChild.length()))) == KMessageBox::Continue)) + if(!(KMessageBox::warningContinueCancel(this, i18n("You are about to open %1 tabs.\nAre you sure ?", QString::number(allChild.length()))) == KMessageBox::Continue)) return; } -- cgit v1.2.1