[Pkg-owncloud-commits] [owncloud-client] 81/159: Only show share dialog if we are connected.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Fri May 1 13:05:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 5a83636f81dfa28aae5099f1050cf603d43ee47e
Author: Roeland Jago Douma <roeland at famdouma.nl>
Date: Mon Mar 16 16:26:35 2015 +0100
Only show share dialog if we are connected.
---
src/gui/socketapi.cpp | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/gui/socketapi.cpp b/src/gui/socketapi.cpp
index 025abe3..0f42154 100644
--- a/src/gui/socketapi.cpp
+++ b/src/gui/socketapi.cpp
@@ -1,6 +1,7 @@
/*
* Copyright (C) by Dominik Schmidt <dev at dominik-schmidt.de>
* Copyright (C) by Klaas Freitag <freitag at owncloud.com>
+ * Copyright (C) by Roeland Jago Douma <roeland at famdouma.nl>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -24,6 +25,7 @@
#include "syncfileitem.h"
#include "filesystem.h"
#include "version.h"
+#include "accountstate.h"
#include <QDebug>
#include <QUrl>
@@ -425,6 +427,10 @@ void SocketApi::command_SHARE(const QString& localFile, QLocalSocket* socket)
const QString message = QLatin1String("SHARE:NOP:")+QDir::toNativeSeparators(localFile);
// files that are not within a sync folder are not synced.
sendMessage(socket, message);
+ } else if (!shareFolder->accountState()->isConnected()) {
+ const QString message = QLatin1String("SHARE:NOTCONNECTED:")+QDir::toNativeSeparators(localFile);
+ // if the folder isn't connected, don't open the share dialog
+ sendMessage(socket, message);
} else {
const QString folderForPath = shareFolder->path();
const QString remotePath = shareFolder->remotePath() + localFile.right(localFile.count()-folderForPath.count()+1);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list