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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-11-18 19:17:32 -08:00
parent ca5b751610
commit 9295b3aa37
2 changed files with 10 additions and 0 deletions

View file

@ -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();

View file

@ -92,6 +92,8 @@
<addaction name="copy"/>
<addaction name="paste"/>
<addaction name="separator"/>
<addaction name="add_GPS_location_here"/>
<addaction name="separator"/>
<addaction name="actionRenumber"/>
<addaction name="actionAutoGroup"/>
<addaction name="separator"/>
@ -738,6 +740,11 @@
<string>Facebook</string>
</property>
</action>
<action name="add_GPS_location_here">
<property name="text">
<string>Add GPS location here</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>