aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-28 13:05:20 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-28 13:05:20 -0400
commitdc7f6bcfc9a9f5066dd734e1f163552a682333a4 (patch)
tree2ffc7e177f4d792e30f8eacf0095da4ed2589f46 /qt-ui
parent332cc0a418483cc69e76e1a91ba5e000118c8067 (diff)
downloadsubsurface-dc7f6bcfc9a9f5066dd734e1f163552a682333a4.tar.gz
Cloud storage: show progress bar when using Save with cloud storage open
When you have openend cloud storage, the Save and Save to cloud storage are basically the same thing... so we need to show the progress bar in that case, too. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/mainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index c1f6345c2..1f131402e 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -1469,10 +1469,13 @@ int MainWindow::file_save_as(void)
int MainWindow::file_save(void)
{
const char *current_default;
+ bool is_cloud = false;
if (!existing_filename)
return file_save_as();
+ is_cloud = (strncmp(existing_filename, "http", 4) == 0);
+
if (information()->isEditing())
information()->acceptChanges();
@@ -1484,10 +1487,16 @@ int MainWindow::file_save(void)
if (!current_def_dir.exists())
current_def_dir.mkpath(current_def_dir.absolutePath());
}
+ if (is_cloud)
+ showProgressBar();
if (save_dives(existing_filename)) {
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
+ if (is_cloud)
+ hideProgressBar();
return -1;
}
+ if (is_cloud)
+ hideProgressBar();
getNotificationWidget()->showNotification(get_error_string(), KMessageWidget::Error);
mark_divelist_changed(false);
addRecentFile(QStringList() << QString(existing_filename));