diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-24 07:52:16 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-24 07:52:16 -0700 |
commit | 2a88a72f1aeae6a0dd9713d9c4779d8d009f9335 (patch) | |
tree | 13d658b6404e3c33bf67c14ef507f02f1180121f | |
parent | d2569c6688caa595b33ab756f4bc62d93edd4b03 (diff) | |
download | subsurface-2a88a72f1aeae6a0dd9713d9c4779d8d009f9335.tar.gz |
Remove export and save as from dive list context menu
The context menu is getting way too big and confusing. This is now much
more cleanly done from the File->Export dialog.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/divelistview.cpp | 35 | ||||
-rw-r--r-- | qt-ui/divelistview.h | 2 |
2 files changed, 0 insertions, 37 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 49fdce127..ebad73b09 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -775,8 +775,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) popup.addAction(tr("merge selected dives"), this, SLOT(mergeDives())); if (amount_selected >= 1) { popup.addAction(tr("renumber dive(s)"), this, SLOT(renumberDives())); - popup.addAction(tr("save As"), this, SLOT(saveSelectedDivesAs())); - popup.addAction(tr("export dive log"), this, SLOT(exportDives())); popup.addAction(tr("shift times"), this, SLOT(shiftTimes())); popup.addAction(tr("load images"), this, SLOT(loadImages())); } @@ -792,39 +790,6 @@ void DiveListView::contextMenuEvent(QContextMenuEvent *event) event->accept(); } -void DiveListView::saveSelectedDivesAs() -{ - QSettings settings; - QString lastDir = QDir::homePath(); - - settings.beginGroup("FileDialog"); - if (settings.contains("LastDir")) { - if (QDir::setCurrent(settings.value("LastDir").toString())) { - lastDir = settings.value("LastDir").toString(); - } - } - settings.endGroup(); - - QString fileName = QFileDialog::getSaveFileName(MainWindow::instance(), tr("Save Dives As..."), QDir::homePath()); - if (fileName.isEmpty()) - return; - - // Keep last open dir - QFileInfo fileInfo(fileName); - settings.beginGroup("FileDialog"); - settings.setValue("LastDir", fileInfo.dir().path()); - settings.endGroup(); - - QByteArray bt = QFile::encodeName(fileName); - save_dives_logic(bt.data(), true); -} - -void DiveListView::exportDives() -{ - DiveLogExportDialog *diveLogExport = new DiveLogExportDialog(); - diveLogExport->show(); -} - void DiveListView::shiftTimes() { ShiftTimesDialog::instance()->show(); diff --git a/qt-ui/divelistview.h b/qt-ui/divelistview.h index fd3a31cb7..7d577bcbf 100644 --- a/qt-ui/divelistview.h +++ b/qt-ui/divelistview.h @@ -49,8 +49,6 @@ slots: void addToTripBelow(); void mergeDives(); void renumberDives(); - void saveSelectedDivesAs(); - void exportDives(); void shiftTimes(); void loadImages(); static QString lastUsedImageDir(); |