┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2012-05-03 16:36:00 +0200
committerPeter Penz <[email protected]>2012-05-03 16:37:32 +0200
commit9c033396b93d429b2cbefb0304e1eddd3b6c5cd2 (patch)
tree707ac3df91c5562d4319b8d179e11264325750bb /src
parentaacf20282d9b7d78bda93ba946cdcf2e0fee5692 (diff)
Places Panel: Provide "Open in New Tab" entry
Additionally some translation cleanups have been done because of the soft-feature-freeze. BUG: 176718 FIXED-IN: 4.9.0
Diffstat (limited to 'src')
-rw-r--r--src/panels/places/placespanel.cpp24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/panels/places/placespanel.cpp b/src/panels/places/placespanel.cpp
index 89b4b4a31..de5c95b77 100644
--- a/src/panels/places/placespanel.cpp
+++ b/src/panels/places/placespanel.cpp
@@ -157,17 +157,23 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
menu.addSeparator();
}
addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry..."));
- if (!isSystemItem) {
- mainSeparator = menu.addSeparator();
- editAction = menu.addAction(KIcon("document-properties"), i18nc("@item:inmenu", "Edit Entry '%1'...", label));
- }
+ mainSeparator = menu.addSeparator();
+ editAction = menu.addAction(KIcon("document-properties"), i18nc("@item:inmenu", "Edit '%1'...", label));
}
if (!addAction) {
addAction = menu.addAction(KIcon("document-new"), i18nc("@item:inmenu", "Add Entry..."));
}
- QAction* hideAction = menu.addAction(i18nc("@item:inmenu", "Hide Entry '%1'", label));
+ QAction* openInNewTabAction = menu.addAction(i18nc("@item:inmenu", "Open '%1' in New Tab", label));
+ openInNewTabAction->setIcon(KIcon("tab-new"));
+
+ QAction* removeAction = 0;
+ if (!isDevice && !isSystemItem) {
+ removeAction = menu.addAction(KIcon("edit-delete"), i18nc("@item:inmenu", "Remove '%1'", label));
+ }
+
+ QAction* hideAction = menu.addAction(i18nc("@item:inmenu", "Hide '%1'", label));
hideAction->setCheckable(true);
hideAction->setChecked(data.value("isHidden").toBool());
@@ -181,11 +187,6 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
showAllAction->setChecked(m_model->hiddenItemsShown());
}
- QAction* removeAction = 0;
- if (!isDevice && !isSystemItem) {
- removeAction = menu.addAction(KIcon("edit-delete"), i18nc("@item:inmenu", "Remove Entry '%1'", label));
- }
-
menu.addSeparator();
foreach (QAction* action, customContextMenuActions()) {
menu.addAction(action);
@@ -203,6 +204,9 @@ void PlacesPanel::slotItemContextMenuRequested(int index, const QPointF& pos)
m_model->removeItem(index);
} else if (action == hideAction) {
m_model->setItemHidden(index, hideAction->isChecked());
+ } else if (action == openInNewTabAction) {
+ const KUrl url = m_model->item(index)->dataValue("url").value<KUrl>();
+ emit placeMiddleClicked(url);
} else if (action == showAllAction) {
m_model->setHiddenItemsShown(showAllAction->isChecked());
} else if (action == tearDownAction) {