From 9295b3aa3742ea3af4427de831af58ed2a268c9b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 18 Nov 2015 19:17:32 -0800 Subject: Add menu entry for creating GPS location And disable it if there is no satellite based location service (but see the comment in the previous commit - this doesn't appear to work reliably). Nothing happens when you use the menu entry. This just allows us to hook this up later. Signed-off-by: Dirk Hohndel --- desktop-widgets/mainwindow.cpp | 3 +++ desktop-widgets/mainwindow.ui | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'desktop-widgets') diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 732425ea7..11d5fb153 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -206,6 +206,9 @@ MainWindow::MainWindow() : QMainWindow(), #endif GpsLocation *locationProvider = new GpsLocation(&report_message, this); + if (!locationProvider->hasLocationsSource()) { + ui.menuFile->removeAction(ui.add_GPS_location_here); + } ui.mainErrorMessage->hide(); graphics()->setEmptyState(); initialUiSetup(); diff --git a/desktop-widgets/mainwindow.ui b/desktop-widgets/mainwindow.ui index c62e1df7f..724c83657 100644 --- a/desktop-widgets/mainwindow.ui +++ b/desktop-widgets/mainwindow.ui @@ -92,6 +92,8 @@ + + @@ -738,6 +740,11 @@ Facebook + + + Add GPS location here + + -- cgit v1.2.3-70-g09d2