diff options
Diffstat (limited to 'desktop-widgets/maintab.cpp')
-rw-r--r-- | desktop-widgets/maintab.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index 5c6d831f8..864c24782 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -1584,6 +1584,16 @@ void MainTab::removeAllPhotos() } } +void MainTab::addPhotosFromFile() +{ + MainWindow::instance()->dive_list()->loadImages(); +} + +void MainTab::addPhotosFromURL() +{ + MainWindow::instance()->dive_list()->loadWebImages(); +} + #define SHOW_SELECTIVE(_component) \ if (what._component) \ ui._component->setText(displayed_dive._component); @@ -1627,6 +1637,9 @@ void MainTab::showAndTriggerEditSelective(struct dive_components what) void MainTab::contextMenuEvent(QContextMenuEvent *event) { QMenu popup(this); + popup.addAction(tr("Load image(s) from file(s)"), this, SLOT(addPhotosFromFile())); + popup.addAction(tr("Load image(s) from web"), this, SLOT(addPhotosFromURL())); + popup.addSeparator(); popup.addAction(tr("Delete selected images"), this, SLOT(removeSelectedPhotos())); popup.addAction(tr("Delete all images"), this, SLOT(removeAllPhotos())); QAction *actionTaken = popup.exec(event->globalPos()); |