From e19944ce14d280d1ee88e91cd1318d917f0f2957 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 8 Aug 2018 06:08:15 -0700 Subject: QML UI: when triggering download page, set up vendor/product/connection This only works if the USB device contains enough information to do so. We need to collect more information to understand what information we get if those get plugged in. Maybe we'll get only the vendor and need to leave it to the user to set the product (which we can do by passing an index of -1 for product). Signed-off-by: Dirk Hohndel --- mobile-widgets/qml/main.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mobile-widgets') diff --git a/mobile-widgets/qml/main.qml b/mobile-widgets/qml/main.qml index 069024cc8..332e4c921 100644 --- a/mobile-widgets/qml/main.qml +++ b/mobile-widgets/qml/main.qml @@ -617,7 +617,13 @@ if you have network connectivity and want to sync your data to cloud storage."), console.log("Download page requested by Android Intent, but adding/editing dive; no action taken") } else { console.log("Show download page for device " + pluggedInDeviceName) - diveList.showDownloadPage() + /* if we recognized the device, we'll pass in a triple of ComboBox indeces as "vendor;product;connection" */ + var vendorProductConnection = pluggedInDeviceName.split(';') + if (vendorProductConnection.length === 3) + diveList.showDownloadPage(vendorProductConnection[0], vendorProductConnection[1], vendorProductConnection[2]) + else + diveList.showDownloadPage() + console.log("done showing download page") } } -- cgit v1.2.3-70-g09d2