aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/maintab.cpp13
-rw-r--r--desktop-widgets/maintab.h2
2 files changed, 15 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());
diff --git a/desktop-widgets/maintab.h b/desktop-widgets/maintab.h
index c3f6649a8..d4f7aaaa9 100644
--- a/desktop-widgets/maintab.h
+++ b/desktop-widgets/maintab.h
@@ -98,6 +98,8 @@ slots:
void photoDoubleClicked(const QString filePath);
void removeSelectedPhotos();
void removeAllPhotos();
+ void addPhotosFromFile();
+ void addPhotosFromURL();
void showLocation();
void enableGeoLookupEdition();
void disableGeoLookupEdition();