mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-05 05:34:18 +02:00
Compare commits
84 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4e2e5f586 | ||
|
|
43ed874789 | ||
|
|
e3f8a918d6 | ||
|
|
668bb94270 | ||
|
|
89e0543e0a | ||
|
|
6695b50965 | ||
|
|
5c02c85126 | ||
|
|
de99c0c7e7 | ||
|
|
5b5cd310b9 | ||
|
|
ea85d68a26 | ||
|
|
fb0a883f7b | ||
|
|
64a0efe29a | ||
|
|
1f361b7260 | ||
|
|
763b06477d | ||
|
|
cd7d2a0778 | ||
|
|
a4be3f304d | ||
|
|
88184d14d6 | ||
|
|
844d8eba47 | ||
|
|
5e65945a53 | ||
|
|
428040762f | ||
|
|
30e0a13bc5 | ||
|
|
275c2b1a6b | ||
|
|
e409814cb6 | ||
|
|
acdb624713 | ||
|
|
3cae8e7124 | ||
|
|
2595b9eae7 | ||
|
|
46a8561925 | ||
|
|
bb74cab887 | ||
|
|
dd7f58b9b9 | ||
|
|
ee080222d8 | ||
|
|
c7aaa3ab28 | ||
|
|
fcde01fd4c | ||
|
|
83be334ee8 | ||
|
|
819f76c2b9 | ||
|
|
783b16676f | ||
|
|
aa6160ab62 | ||
|
|
8bae06802b | ||
|
|
a20f572448 | ||
|
|
f74aa1e9a6 | ||
|
|
86525570aa | ||
|
|
d11ce781d0 | ||
|
|
be5a50a000 | ||
|
|
7309a894bc | ||
|
|
310f29d3fd | ||
|
|
07db03d6bc | ||
|
|
d68c4b379f | ||
|
|
396a12dfde | ||
|
|
c79f4f91a8 | ||
|
|
bec2f7c9b9 | ||
|
|
d4c8cad0e2 | ||
|
|
0ad2bd4b91 | ||
|
|
dcc8f9fa6c | ||
|
|
d7a93c74aa | ||
|
|
408547611b | ||
|
|
a8f0e79046 | ||
|
|
3e45147497 | ||
|
|
48310d3f5e | ||
|
|
1831a975eb | ||
|
|
a766a44bcf | ||
|
|
287f1c55ff | ||
|
|
1c6523bcec | ||
|
|
337c6d3e4e | ||
|
|
4a57957420 | ||
|
|
c633302f31 | ||
|
|
db95e7291d | ||
|
|
ae54c27805 | ||
|
|
284285d441 | ||
|
|
2554a67cc7 | ||
|
|
e2cccd8615 | ||
|
|
948a98a871 | ||
|
|
b50d201154 | ||
|
|
25a3ceb94d | ||
|
|
c514fe371a | ||
|
|
9169c70efe | ||
|
|
3c07cea229 | ||
|
|
d3f51c611f | ||
|
|
21123bb029 | ||
|
|
fb8d11650c | ||
|
|
2c250050d5 | ||
|
|
e9b3cbf3f7 | ||
|
|
d31a6e6179 | ||
|
|
26d8c213b0 | ||
|
|
4caca2ce1a | ||
|
|
e0645b4b63 |
57
ChangeLog
57
ChangeLog
@@ -1,6 +1,58 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
version 1.2.5 (release 2013-04-23 ), csync 0.70.7 required
|
||||
* [Fixes] NSIS installer fixes
|
||||
* [Fixes] Fix crash race by making certificateChain() thread safe
|
||||
* [Fixes] Build with older CMake versions (CentOS/RHEL 6)
|
||||
* [Fixes] Wording in GUI
|
||||
* [Fixes] Silently ignore "installed = true" status.php
|
||||
* Set log verbosity before calling csync_init.
|
||||
* GUI feedback for the statistics copy action
|
||||
* Safer approach for detecting duplicate sync runs
|
||||
|
||||
version 1.2.4 (release 2013-04-11 ), csync 0.70.6 required
|
||||
* [Fixes] Clarify string in folder wizard
|
||||
* [Fixes] Fixed some valgrind warnings
|
||||
* [Fixes] Ensure that only one sync thread can ever run
|
||||
* [Fixes] Fix default config storage path
|
||||
* [Fixes] Skip folders with no absolute path
|
||||
* [Fixes] Allow setting the configuration directory on command line
|
||||
|
||||
version 1.2.3 (release 2013-04-02 ), csync 0.70.5 required
|
||||
* [Fixes] Unbreak self-signed certificate handling
|
||||
|
||||
version 1.2.2 (release 2013-04-02 ), csync 0.70.5 required
|
||||
* [Fixes] Do not crash when local file tree contains symlinks
|
||||
* [Fixes] Correctly handle locked files on Windows
|
||||
* [Fixes] Display errors in all members of the SSL chain
|
||||
* [Fixes] Enable Accessibility features on Windows
|
||||
* [Fixes] Make setupFavLink work properly on Mac OS
|
||||
* [Fixes] Ignore temporary files created by MS Office
|
||||
* [Gui] Support Nautilus in setupFavLink
|
||||
|
||||
version 1.2.1 (release 2013-02-26 ), csync 0.70.4 required
|
||||
* [Fixes] Leave configured folders on configuration changes.
|
||||
* [Fixes] Do not allow to finish the setup dialog if connection can't be established.
|
||||
* [Fixes] Better handling of credentials in setup dialog.
|
||||
* [Fixes] Do not leak fd's to /dev/null when using gnutls
|
||||
* [Fixes] Stop sync scheduling when configuration wizard starts.
|
||||
* [Fixes] Clear pending network requests when stepping back in config wizard.
|
||||
* [Fixes] User password dialog asynchronous issues.
|
||||
* [Fixes] Make folderman starting and stoping the scheduling.
|
||||
* [Fixes] Various minor fixes and cleanups.
|
||||
* [Fixes] Crash on pausing sync
|
||||
* [Fixes] Stale lock file after pausing sync
|
||||
* [App] Load translations from app dir or bundle as well.
|
||||
* [Platform] Build fixes and simplifications, ie. build only one lib.
|
||||
* [Platform] Added some getter/setters for configuration values.
|
||||
* [Platform] Added man pages.
|
||||
* [Platform] Simplified/fixed credential store usage and custom configs.
|
||||
* [Platform] Added soname version to libowncloudsync.
|
||||
* [Platform] Pull in Qt translations
|
||||
* [Gui] Make sync result popups less annoyingq
|
||||
* [Gui] Fix for result popup
|
||||
|
||||
version 1.2.0 (release 2013-01-24 ), csync 0.70.2 required
|
||||
* [GUI] New status dialog to show a detailed list of synced files.
|
||||
* [GUI] New tray notifications about synced files.
|
||||
@@ -51,10 +103,6 @@ version 1.1.1 (release 2012-10-18), csync 0.60.1 required
|
||||
* [Fixes] csync: Allow single quote (') in file names
|
||||
* [Fixes] csync: Remove stray temporary files
|
||||
|
||||
version 1.1.0 (release 2012-10-10), csync 0.60.0 required
|
||||
* [GUI] Added an about dialog
|
||||
* [GUI] Improved themeing capabilities of the client.
|
||||
* [GUI] Minor fixes in folder assistant.
|
||||
* [GUI] Reworked tray context menu.
|
||||
* [GUI] Users can now sync the server root folder.
|
||||
* [Fixes] Proxy support: now supports Proxy Auto-Configuration (PAC)
|
||||
@@ -149,4 +197,3 @@ version 1.0.1 (release 2012-04-18), csync 0.50.5 required
|
||||
* [Platform] MacOSX Bundle creation added
|
||||
* [Platform] Enabled ranslations on Windows.
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set( VERSION_MAJOR 1 )
|
||||
set( VERSION_MINOR 2 )
|
||||
set( VERSION_PATCH 1 )
|
||||
set( VERSION_PATCH 5 )
|
||||
set( VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX})
|
||||
set( SOVERSION 0 )
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
!define BUILD_PATH "@CMAKE_BINARY_DIR@"
|
||||
!define SOURCE_PATH "@CMAKE_SOURCE_DIR@"
|
||||
!define QT_DLL_PATH "${MING_BIN}"
|
||||
!define ACCESSIBLE_DLL_PATH "${MING_LIB}/qt4/plugins/accessible"
|
||||
!define SQLITE_DLL_PATH "${MING_LIB}/qt4/plugins/sqldrivers"
|
||||
!define IMAGEFORMATS_DLL_PATH "${MING_LIB}/qt4/plugins/imageformats"
|
||||
|
||||
@@ -266,7 +267,7 @@ FunctionEnd
|
||||
# INSTALLER SECTIONS #
|
||||
# #
|
||||
##############################################################################
|
||||
Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
||||
Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
SectionIn 1 2 3 RO
|
||||
SetDetailsPrint listonly
|
||||
|
||||
@@ -358,6 +359,9 @@ Section "${APPLICATION_NAME}" SEC_OWNCLOUD
|
||||
|
||||
File "${MING_SHARE}\qt4\translations\qtkeychain_de.qm"
|
||||
|
||||
SetOutPath "$INSTDIR\accessible"
|
||||
File "${ACCESSIBLE_DLL_PATH}\qtaccessiblewidgets4.dll"
|
||||
|
||||
SetOutPath "$INSTDIR\modules"
|
||||
; FIXME: fix installation dir of module, currently needs manual copying to
|
||||
; /usr/i686-w64-mingw32/sys-root/mingw/bin/csync_modules/
|
||||
@@ -458,7 +462,7 @@ SectionGroupEnd
|
||||
DetailPrint "Creating Windows Start Entry"
|
||||
SetDetailsPrint listonly
|
||||
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Run" \
|
||||
"${APPLICATION_NAME}" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
||||
"${APPLICATION_NAME}" "$INSTDIR\${APPLICATION_EXECUTABLE}"
|
||||
${MementoSectionEnd}
|
||||
!endif
|
||||
|
||||
@@ -471,7 +475,7 @@ ${MementoSectionDone}
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_START_MENU} "${APPLICATION_NAME} program group."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_DESKTOP} "Desktop shortcut for ${APPLICATION_NAME}."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_LAUNCH} "Quick Launch shortcut for ${APPLICATION_NAME}."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_QUICK_AUTOSTART} "Register ${APPLICATION_NAME} to run on Windows startup."
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${SEC_AUTOSTART} "Register ${APPLICATION_NAME} to run on Windows startup."
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
Section -post
|
||||
|
||||
@@ -14,11 +14,13 @@ if(SPHINX_FOUND)
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/conf.py.in" conf.py @ONLY)
|
||||
|
||||
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||
if (UNIX AND (NOT APPLE))
|
||||
install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR})
|
||||
endif (UNIX AND (NOT APPLE))
|
||||
if(WITH_DOC)
|
||||
add_custom_target(doc ALL DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||
install(DIRECTORY ${SPHINX_HTML_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
install(DIRECTORY ${SPHINX_MAN_DIR} DESTINATION ${CMAKE_INSTALL_MANDIR})
|
||||
else(WITH_DOC)
|
||||
add_custom_target(doc DEPENDS doc-html doc-man COMMENT "Building documentation...")
|
||||
endif(WITH_DOC)
|
||||
|
||||
if(PDFLATEX_FOUND)
|
||||
# if this still fails on Debian/Ubuntu, run
|
||||
@@ -32,9 +34,9 @@ if(SPHINX_FOUND)
|
||||
add_custom_target(doc-pdf make -C ${SPHINX_PDF_DIR} all-pdf
|
||||
DEPENDS doc-latex )
|
||||
add_dependencies(doc doc-pdf)
|
||||
if (UNIX AND (NOT APPLE))
|
||||
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif (UNIX AND (NOT APPLE))
|
||||
if (WITH_DOC)
|
||||
install(DIRECTORY ${SPHINX_PDF_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif (WITH_DOC)
|
||||
endif(PDFLATEX_FOUND)
|
||||
if (EXISTS ${QT_QCOLLECTIONGENERATOR_EXECUTABLE})
|
||||
add_custom_target( doc-qch-sphinx ${SPHINX_EXECUTABLE}
|
||||
@@ -46,9 +48,9 @@ if(SPHINX_FOUND)
|
||||
${SPHINX_QCH_DIR}/*.qhcp
|
||||
DEPENDS doc-qch-sphinx )
|
||||
add_dependencies(doc doc-qch)
|
||||
if (UNIX AND (NOT APPLE))
|
||||
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif (UNIX AND (NOT APPLE))
|
||||
if (WITH_DOC)
|
||||
install(DIRECTORY ${SPHINX_QCH_DIR} DESTINATION ${CMAKE_INSTALL_DOCDIR})
|
||||
endif (WITH_DOC)
|
||||
endif()
|
||||
add_custom_target( doc-html ${SPHINX_EXECUTABLE}
|
||||
-q -c . -b html
|
||||
|
||||
@@ -151,6 +151,10 @@ To build in installer (requires the mingw32-cross-nsis packages)::
|
||||
|
||||
make package
|
||||
|
||||
Known cmake parameters:
|
||||
|
||||
* WITH_DOC=TRUE: create doc and manpages via running ``make``; also adds install statements to be able to install it via ``make install``.
|
||||
|
||||
.. _`ownCloud repository from OBS`: http://software.opensuse.org/download/package?project=isv:ownCloud:devel&package=owncloud-client
|
||||
.. _CSync: http://www.csync.org
|
||||
.. _`Client Download Page`: http://owncloud.org/sync-clients/
|
||||
|
||||
@@ -5,7 +5,7 @@ Troubleshooting
|
||||
Verify that you can log on to ownClouds WebDAV server. Assuming your ownCloud
|
||||
instance is installed at ``http://yourserver.com/owncloud``, type
|
||||
``http://yourserver.com/owncloud/remote.php/webdav`` into your browsers
|
||||
address bar.
|
||||
address bar.
|
||||
|
||||
If you are not prompted to enter your user name and password, please verify
|
||||
that your server installation is working correctly.
|
||||
@@ -14,6 +14,13 @@ Troubleshooting
|
||||
your provided are correct, please ensure that your authentication backend
|
||||
is configured properly.
|
||||
|
||||
A more sophisticated test is to use a WebDAV command line client and log
|
||||
into the ownCloud WebDAV server, such as a little app called cadaver, available
|
||||
on Linux. I can be used to further verify that the WebDAV server is running
|
||||
properly, for example by performing PROPFIND calls:
|
||||
|
||||
``propget .`` called within cadaver will return some properties of the current
|
||||
directory and thus be a successful WebDAV connect.
|
||||
|
||||
:The desktop client fails for an unknown reason:
|
||||
Start the client with ``--logwindow``. You can also open a log window for an
|
||||
@@ -26,3 +33,10 @@ Troubleshooting
|
||||
|
||||
The log output can help you with tracking down problem, and if you report
|
||||
a bug, it's useful to include the output.
|
||||
|
||||
Also, please take a look at your webservers error log file to check if there
|
||||
are problems. For apache on linux, the error logs usually can be found at
|
||||
``/var/log/apache2``. A file called ``error_log`` shows errors like PHP code
|
||||
problems. A file called ``access_log`` usually records all requests handled
|
||||
by the server. More information about the apache logging can be found at
|
||||
``http://httpd.apache.org/docs/current/logs.html``.
|
||||
BIN
resources/lock-http.png
Normal file
BIN
resources/lock-http.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 739 B |
BIN
resources/lock-https.png
Normal file
BIN
resources/lock-https.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 478 B |
@@ -142,7 +142,7 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
)
|
||||
if(NOT WIN32)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||
${APPLICATION_SHORTNAME}.desktop)
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop DESTINATION share/applications )
|
||||
endif()
|
||||
else()
|
||||
|
||||
@@ -48,10 +48,6 @@
|
||||
#include <QNetworkProxy>
|
||||
#include <QNetworkProxyFactory>
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
// application logging handler.
|
||||
@@ -93,7 +89,8 @@ Application::Application(int &argc, char **argv) :
|
||||
_showLogWindow(false),
|
||||
_logFlush(false),
|
||||
_helpOnly(false),
|
||||
_fileItemDialog(0)
|
||||
_fileItemDialog(0),
|
||||
_statusDialog(0)
|
||||
{
|
||||
setApplicationName( _theme->appNameGUI() );
|
||||
setWindowIcon( _theme->applicationIcon() );
|
||||
@@ -104,16 +101,6 @@ Application::Application(int &argc, char **argv) :
|
||||
//no need to waste time;
|
||||
if ( _helpOnly ) return;
|
||||
|
||||
#ifdef Q_OS_LINUX
|
||||
// HACK: bump the refcount for libgnutls by calling dlopen()
|
||||
// so gnutls, which is an dependency of libneon on some linux
|
||||
// distros, and does not cleanup it's FDs properly, does
|
||||
// not get unloaded. This works around a FD exhaustion crash
|
||||
// (#154). We are not using gnutls at all and it's fine
|
||||
// if loading fails, so no error handling is performed here.
|
||||
dlopen("libgnutls.so", RTLD_LAZY|RTLD_NODELETE);
|
||||
#endif
|
||||
|
||||
connect( this, SIGNAL(messageReceived(QString)), SLOT(slotParseOptions(QString)));
|
||||
connect( Logger::instance(), SIGNAL(guiLog(QString,QString)),
|
||||
this, SLOT(slotShowTrayMessage(QString,QString)));
|
||||
@@ -183,8 +170,8 @@ Application::Application(int &argc, char **argv) :
|
||||
Application::~Application()
|
||||
{
|
||||
delete _tray; // needed, see ctor
|
||||
if( _fileItemDialog) delete _fileItemDialog;
|
||||
if( _statusDialog && ! _helpOnly) delete _statusDialog;
|
||||
delete _fileItemDialog;
|
||||
delete _statusDialog;
|
||||
qDebug() << "* Mirall shutdown";
|
||||
}
|
||||
|
||||
@@ -268,7 +255,7 @@ void Application::slotFetchCredentials()
|
||||
this, SLOT(slotCredentialsFetched(bool)) );
|
||||
CredentialStore::instance()->fetchCredentials();
|
||||
if( CredentialStore::instance()->state() == CredentialStore::TooManyAttempts ) {
|
||||
trayMessage = tr("Too many attempts to get a valid password.");
|
||||
trayMessage = tr("Too many incorrect password attempts.");
|
||||
}
|
||||
} else {
|
||||
qDebug() << "Can not try again to fetch Credentials.";
|
||||
@@ -892,12 +879,18 @@ void Application::parseOptions(const QStringList &options)
|
||||
_logFlush = true;
|
||||
} else if (option == QLatin1String("--monoicons")) {
|
||||
_theme->setSystrayUseMonoIcons(true);
|
||||
} else {
|
||||
setHelp();
|
||||
std::cout << "Option not recognized: " << option.toStdString() << std::endl;
|
||||
break;
|
||||
} else if (option == QLatin1String("--confdir")) {
|
||||
if (it.hasNext() && !it.peekNext().startsWith(QLatin1String("--"))) {
|
||||
QString confDir = it.next();
|
||||
MirallConfigFile::setConfDir( confDir );
|
||||
} else {
|
||||
showHelp();
|
||||
}
|
||||
} else {
|
||||
setHelp();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Application::computeOverallSyncStatus()
|
||||
@@ -998,6 +991,7 @@ setHelp();
|
||||
std::cout << " --logfile <filename> : write log output to file <filename>." << std::endl;
|
||||
std::cout << " --logflush : flush the log file after every write." << std::endl;
|
||||
std::cout << " --monoicons : Use black/white pictograms for systray." << std::endl;
|
||||
std::cout << " --confdir <dirname> : Use the given configuration directory." << std::endl;
|
||||
std::cout << std::endl;
|
||||
if (_theme->appName() == QLatin1String("ownCloud"))
|
||||
std::cout << "For more information, see http://www.owncloud.org" << std::endl;
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include <QDebug>
|
||||
#include <QSslSocket>
|
||||
#include <QDir>
|
||||
@@ -48,6 +50,7 @@ QNetworkProxy CSyncThread::_proxy;
|
||||
QString CSyncThread::_csyncConfigDir; // to be able to remove the lock file.
|
||||
|
||||
QMutex CSyncThread::_mutex;
|
||||
QMutex CSyncThread::_syncMutex;
|
||||
|
||||
void csyncLogCatcher(CSYNC *ctx,
|
||||
int verbosity,
|
||||
@@ -279,10 +282,11 @@ int CSyncThread::treewalkError(TREE_WALK_FILE* file)
|
||||
if ( indx == -1 )
|
||||
return 0;
|
||||
|
||||
if( item._instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
|
||||
item._instruction == CSYNC_INSTRUCTION_ERROR ) {
|
||||
if( file &&
|
||||
file->instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
|
||||
file->instruction == CSYNC_INSTRUCTION_ERROR ) {
|
||||
_mutex.lock();
|
||||
_syncedItems[indx]._instruction = item._instruction;
|
||||
_syncedItems[indx]._instruction = file->instruction;
|
||||
_mutex.unlock();
|
||||
}
|
||||
|
||||
@@ -300,6 +304,7 @@ struct CSyncRunScopeHelper {
|
||||
|
||||
qDebug() << "CSync run took " << t.elapsed() << " Milliseconds";
|
||||
emit(parent->finished());
|
||||
parent->_syncMutex.unlock();
|
||||
}
|
||||
CSYNC *ctx;
|
||||
QTime t;
|
||||
@@ -323,6 +328,13 @@ void CSyncThread::handleSyncError(CSYNC *ctx, const char *state) {
|
||||
|
||||
void CSyncThread::startSync()
|
||||
{
|
||||
if (!_syncMutex.tryLock()) {
|
||||
qDebug() << Q_FUNC_INFO << "WARNING: Another sync seems to be running. Not starting a new one.";
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << Q_FUNC_INFO << "Sync started";
|
||||
|
||||
qDebug() << "starting to sync " << qApp->thread() << QThread::currentThread();
|
||||
CSYNC *csync;
|
||||
int proxyPort = _proxy.port();
|
||||
@@ -337,6 +349,7 @@ void CSyncThread::startSync()
|
||||
_target.toUtf8().data()) < 0 ) {
|
||||
emit csyncError( tr("CSync create failed.") );
|
||||
}
|
||||
csync_set_log_verbosity(csync, 11);
|
||||
|
||||
MirallConfigFile cfg;
|
||||
csync_set_config_dir( csync, cfg.configPath().toUtf8() );
|
||||
@@ -368,7 +381,6 @@ void CSyncThread::startSync()
|
||||
|
||||
// set module properties, mainly the proxy information.
|
||||
// do not use QLatin1String here because that has to be real const char* for C.
|
||||
csync_set_log_verbosity(csync, 11);
|
||||
csync_set_module_property(csync, "csync_context", csync);
|
||||
csync_set_module_property(csync, "proxy_type", (char*) proxyTypeToCStr(_proxy.type()) );
|
||||
csync_set_module_property(csync, "proxy_host", _proxy.hostName().toUtf8().data() );
|
||||
@@ -414,6 +426,7 @@ void CSyncThread::startSync()
|
||||
emit treeWalkResult(_syncedItems);
|
||||
}
|
||||
}
|
||||
qDebug() << Q_FUNC_INFO << "Sync finished";
|
||||
}
|
||||
|
||||
void CSyncThread::setConnectionDetails( const QString &user, const QString &passwd, const QNetworkProxy &proxy )
|
||||
|
||||
@@ -83,6 +83,7 @@ private:
|
||||
);
|
||||
|
||||
static QMutex _mutex;
|
||||
static QMutex _syncMutex;
|
||||
static QString _user;
|
||||
static QString _passwd;
|
||||
static QNetworkProxy _proxy;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include "mirall/fileitemdialog.h"
|
||||
#include "mirall/theme.h"
|
||||
#include "mirall/syncresult.h"
|
||||
#include "mirall/logger.h"
|
||||
|
||||
#define TYPE_SUCCESS 1
|
||||
#define TYPE_CONFLICT 2
|
||||
@@ -46,6 +47,7 @@ FileItemDialog::FileItemDialog(Theme *theme, QWidget *parent) :
|
||||
_treeWidget->setColumnWidth(0, 480);
|
||||
_timer.setInterval(1000);
|
||||
connect(&_timer, SIGNAL(timeout()), this, SLOT(slotSetFolderMessage()));
|
||||
connect(this, SIGNAL(guiLog(QString,QString)), Logger::instance(), SIGNAL(guiLog(QString,QString)));
|
||||
|
||||
QPushButton *copyBtn = _dialogButtonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
connect(copyBtn, SIGNAL(clicked()), SLOT(copyToClipboard()));
|
||||
@@ -118,7 +120,7 @@ void FileItemDialog::slotSetFolderMessage()
|
||||
QDateTime now = QDateTime::currentDateTime();
|
||||
int secs = _lastSyncTime.secsTo(now);
|
||||
|
||||
_timelabel->setText(tr("%1 (finished %2 sec. ago)").arg(_folderMessage).arg(secs));
|
||||
_timelabel->setText(tr("%1 (finished %n sec. ago)", "", secs).arg(_folderMessage));
|
||||
}
|
||||
|
||||
void FileItemDialog::copyToClipboard()
|
||||
@@ -147,6 +149,7 @@ void FileItemDialog::copyToClipboard()
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText(text);
|
||||
emit guiLog(tr("Copied to clipboard"), tr("The sync protocol has been copied to the clipboard."));
|
||||
}
|
||||
|
||||
void FileItemDialog::accept()
|
||||
@@ -219,8 +222,8 @@ void FileItemDialog::setSyncFileItems( const SyncFileItemVector& list )
|
||||
|
||||
QString dir;
|
||||
QStringList str( item._file );
|
||||
if( item._dir == SyncFileItem::Up ) dir = tr("Up");
|
||||
if( item._dir == SyncFileItem::Down ) dir = tr("Down");
|
||||
if( item._dir == SyncFileItem::Up ) dir = tr("Uploaded");
|
||||
if( item._dir == SyncFileItem::Down ) dir = tr("Downloaded");
|
||||
str << dir;
|
||||
|
||||
switch( item._instruction ) {
|
||||
|
||||
@@ -43,6 +43,9 @@ protected slots:
|
||||
void slotSetFolderMessage();
|
||||
void copyToClipboard();
|
||||
|
||||
signals:
|
||||
void guiLog(const QString&, const QString&);
|
||||
|
||||
private:
|
||||
void setSyncFileItems( const SyncFileItemVector& list );
|
||||
void formatHeaderItem( QTreeWidgetItem *, const QList<QTreeWidgetItem*>& );
|
||||
|
||||
@@ -25,7 +25,7 @@ QStringList FileUtils::subFoldersList(QString folder,
|
||||
SubFolderListOptions options)
|
||||
{
|
||||
QDir dir(folder);
|
||||
dir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot);
|
||||
dir.setFilter(QDir::Dirs | QDir::NoDotAndDotDot | QDir::NoSymLinks);
|
||||
|
||||
QFileInfoList list = dir.entryInfoList();
|
||||
QStringList dirList;
|
||||
|
||||
@@ -39,9 +39,10 @@ FolderMan::FolderMan(QObject *parent) :
|
||||
{
|
||||
// if QDir::mkpath would not be so stupid, I would not need to have this
|
||||
// duplication of folderConfigPath() here
|
||||
QDir storageDir(QDesktopServices::storageLocation(QDesktopServices::DataLocation));
|
||||
MirallConfigFile cfg;
|
||||
QDir storageDir(cfg.configPath());
|
||||
storageDir.mkpath(QLatin1String("folders"));
|
||||
_folderConfigPath = QDesktopServices::storageLocation(QDesktopServices::DataLocation) + QLatin1String("/folders");
|
||||
_folderConfigPath = cfg.configPath() + QLatin1String("folders");
|
||||
|
||||
_folderChangeSignalMapper = new QSignalMapper(this);
|
||||
connect(_folderChangeSignalMapper, SIGNAL(mapped(const QString &)),
|
||||
@@ -178,38 +179,6 @@ QString FolderMan::unescapeAlias( const QString& alias ) const
|
||||
return a;
|
||||
}
|
||||
|
||||
void FolderMan::setupFavLink(const QString &folder)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows Explorer: Place under "Favorites" (Links)
|
||||
wchar_t path[MAX_PATH];
|
||||
SHGetSpecialFolderPath(0, path, CSIDL_PROFILE, FALSE);
|
||||
QString profile = QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||
QDir folderDir(QDir::fromNativeSeparators(folder));
|
||||
QString linkName = profile+QLatin1String("/Links/") + folderDir.dirName() + QLatin1String(".lnk");
|
||||
if (!QFile::link(folder, linkName))
|
||||
qDebug() << Q_FUNC_INFO << "linking" << folder << "to" << linkName << "failed!";
|
||||
#elif defined (Q_OS_MAC)
|
||||
// Finder: Place under "Places"
|
||||
QString folderUrl = QUrl::fromLocalFile(folder).toString();
|
||||
CFStringRef folderCFStr = CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar *>(folderUrl.unicode()),
|
||||
folder.length());
|
||||
CFURLRef urlRef = CFURLCreateWithString(NULL, folderCFStr, 0);
|
||||
LSSharedFileListRef placesItems = LSSharedFileListCreate(0, kLSSharedFileListFavoriteItems, 0);
|
||||
if (placesItems) {
|
||||
//Insert an item to the list.
|
||||
LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(placesItems,
|
||||
kLSSharedFileListItemBeforeFirst, 0, 0,
|
||||
urlRef, 0, 0);
|
||||
if (item)
|
||||
CFRelease(item);
|
||||
}
|
||||
CFRelease(placesItems);
|
||||
CFRelease(folderCFStr);
|
||||
CFRelease(urlRef);
|
||||
#endif
|
||||
}
|
||||
|
||||
// filename is the name of the file only, it does not include
|
||||
// the configuration directory path
|
||||
Folder* FolderMan::setupFolderFromConfigFile(const QString &file) {
|
||||
@@ -456,8 +425,6 @@ void FolderMan::addFolderDefinition( const QString& backend, const QString& alia
|
||||
settings.setValue(QString::fromLatin1("%1/connection").arg(escapedAlias), Theme::instance()->appName());
|
||||
settings.setValue(QString::fromLatin1("%1/onlyThisLAN").arg(escapedAlias), onlyThisLAN );
|
||||
settings.sync();
|
||||
|
||||
setupFavLink(sourceFolder);
|
||||
}
|
||||
|
||||
void FolderMan::removeAllFolderDefinitions()
|
||||
|
||||
@@ -111,7 +111,6 @@ private:
|
||||
// finds all folder configuration files
|
||||
// and create the folders
|
||||
int setupKnownFolders();
|
||||
void setupFavLink(const QString& folder);
|
||||
void terminateCurrentSync();
|
||||
|
||||
// Escaping of the alias which is used in QSettings AND the file
|
||||
|
||||
@@ -170,7 +170,7 @@ void FolderWatcher::setProcessTimer()
|
||||
void FolderWatcher::changeDetected(const QString& f)
|
||||
{
|
||||
if( ! eventsEnabled() ) {
|
||||
qDebug() << "FolderWatcher::changeDetected when eventsEnabled() -> ignore";
|
||||
// qDebug() << "FolderWatcher::changeDetected when eventsEnabled() -> ignore";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ void WatcherThread::run()
|
||||
_handle = 0;
|
||||
return;
|
||||
}
|
||||
qDebug() << Q_FUNC_INFO << "Change detected in" << _path << "from" << QThread::currentThread ();
|
||||
// qDebug() << Q_FUNC_INFO << "Change detected in" << _path << "from" << QThread::currentThread ();
|
||||
emit changed(_path);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -82,6 +82,13 @@ bool FolderWizardSourcePage::isComplete() const
|
||||
while( isOk && i != map->constEnd() ) {
|
||||
Folder *f = static_cast<Folder*>(i.value());
|
||||
QString folderDir = QDir( f->path() ).canonicalPath();
|
||||
if( folderDir.isEmpty() )
|
||||
{
|
||||
isOk = true;
|
||||
qDebug() << "Absolute path for folder: " << f->path() << " doesn't exist. Skipping.";
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if( ! folderDir.endsWith(QLatin1Char('/')) ) folderDir.append(QLatin1Char('/'));
|
||||
|
||||
qDebug() << "Checking local path: " << folderDir << " <-> " << userInput;
|
||||
@@ -455,20 +462,29 @@ bool FolderWizardOwncloudPage::isComplete() const
|
||||
|
||||
FolderWizard::FolderWizard( QWidget *parent )
|
||||
: QWizard(parent),
|
||||
_folderWizardSourcePage(0)
|
||||
_folderWizardSourcePage(0),
|
||||
_folderWizardTargetPage(0)
|
||||
{
|
||||
_folderWizardSourcePage = new FolderWizardSourcePage();
|
||||
setPage(Page_Source, _folderWizardSourcePage );
|
||||
if (!Theme::instance()->singleSyncFolder())
|
||||
setPage(Page_Target, new FolderWizardTargetPage());
|
||||
// setPage(Page_Network, new FolderWizardNetworkPage());
|
||||
// setPage(Page_Owncloud, new FolderWizardOwncloudPage());
|
||||
if (!Theme::instance()->singleSyncFolder()) {
|
||||
_folderWizardTargetPage = new FolderWizardTargetPage();
|
||||
setPage(Page_Target, _folderWizardTargetPage );
|
||||
}
|
||||
|
||||
setWindowTitle( tr( "%1 Folder Wizard" ).arg( Theme::instance()->appNameGUI() ) );
|
||||
#ifdef Q_WS_MAC
|
||||
setWizardStyle( QWizard::ModernStyle );
|
||||
#endif
|
||||
}
|
||||
|
||||
FolderWizard::~FolderWizard()
|
||||
{
|
||||
delete _folderWizardSourcePage;
|
||||
if( _folderWizardTargetPage )
|
||||
delete _folderWizardTargetPage;
|
||||
}
|
||||
|
||||
void FolderWizard::setFolderMap( Folder::Map *fm)
|
||||
{
|
||||
if( _folderWizardSourcePage ) {
|
||||
|
||||
@@ -149,11 +149,13 @@ public:
|
||||
};
|
||||
|
||||
FolderWizard(QWidget *parent = 0);
|
||||
~FolderWizard();
|
||||
void setFolderMap( Folder::Map* );
|
||||
|
||||
private:
|
||||
|
||||
FolderWizardSourcePage *_folderWizardSourcePage;
|
||||
FolderWizardTargetPage *_folderWizardTargetPage;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>520</width>
|
||||
<height>360</height>
|
||||
<height>367</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -97,7 +97,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Folder on ownCloud:</string>
|
||||
<string>Remote folder:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -130,7 +130,7 @@
|
||||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap resource="../../mirall.qrc">:/mirall/resources/folder-grey-32.png</pixmap>
|
||||
<pixmap>:/mirall/resources/folder-grey-32.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
||||
@@ -114,6 +114,7 @@ INotify::~INotify()
|
||||
|
||||
close(_fd);
|
||||
free(_buffer);
|
||||
delete _notifier;
|
||||
}
|
||||
|
||||
void INotify::addPath(const QString &path)
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
namespace Mirall {
|
||||
|
||||
QString MirallConfigFile::_oCVersion;
|
||||
QString MirallConfigFile::_confDir = QString::null;
|
||||
bool MirallConfigFile::_askedUser = false;
|
||||
|
||||
MirallConfigFile::MirallConfigFile( const QString& appendix )
|
||||
@@ -37,9 +38,23 @@ MirallConfigFile::MirallConfigFile( const QString& appendix )
|
||||
{
|
||||
}
|
||||
|
||||
void MirallConfigFile::setConfDir(const QString &value)
|
||||
{
|
||||
if( value.isEmpty() ) return;
|
||||
|
||||
QFileInfo fi(value);
|
||||
if( fi.exists() && fi.isDir() ) {
|
||||
qDebug() << "** Using custom dir " << value;
|
||||
_confDir=value;
|
||||
}
|
||||
}
|
||||
|
||||
QString MirallConfigFile::configPath() const
|
||||
{
|
||||
QString dir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
QString dir = _confDir;
|
||||
if( _confDir.isEmpty() )
|
||||
_confDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
|
||||
|
||||
if( !dir.endsWith(QLatin1Char('/')) ) dir.append(QLatin1Char('/'));
|
||||
return dir;
|
||||
}
|
||||
|
||||
@@ -98,6 +98,8 @@ public:
|
||||
int proxyPort() const;
|
||||
QString proxyUser() const;
|
||||
QString proxyPassword() const;
|
||||
|
||||
static void setConfDir(const QString &value);
|
||||
|
||||
protected:
|
||||
// these classes can only be access from CredentialStore as a friend class.
|
||||
@@ -112,6 +114,7 @@ private:
|
||||
private:
|
||||
static bool _askedUser;
|
||||
static QString _oCVersion;
|
||||
static QString _confDir;
|
||||
QString _customHandle;
|
||||
|
||||
};
|
||||
|
||||
@@ -332,15 +332,15 @@ void ServerActionNotifier::slotSyncFinished(const SyncResult &result)
|
||||
if (removedItems == 1)
|
||||
emit guiLog(tr("File removed"), tr("'%1' has been removed.").arg(file));
|
||||
else
|
||||
emit guiLog(tr("New files available"), tr("'%1' and %n other file(s) have been removed.",
|
||||
emit guiLog(tr("Files removed"), tr("'%1' and %n other file(s) have been removed.",
|
||||
"", removedItems-1).arg(file));
|
||||
}
|
||||
if (updatedItems > 0) {
|
||||
QString file = QDir::toNativeSeparators(firstItemUpdated._file);
|
||||
if (updatedItems == 1)
|
||||
emit guiLog(tr("File removed"), tr("'%1' has been updated.").arg(file));
|
||||
emit guiLog(tr("File updated"), tr("'%1' has been updated.").arg(file));
|
||||
else
|
||||
emit guiLog(tr("New files available"), tr("'%1' and %n other file(s) have been updated.",
|
||||
emit guiLog(tr("Files updated"), tr("'%1' and %n other file(s) have been updated.",
|
||||
"", updatedItems-1).arg(file));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,9 +65,7 @@ void ownCloudInfo::setNetworkAccessManager( QNetworkAccessManager* qnam )
|
||||
_manager = qnam;
|
||||
|
||||
MirallConfigFile cfg( _configHandle );
|
||||
QSettings settings( cfg.configFile(), QSettings::IniFormat);
|
||||
QByteArray certs = settings.value(QLatin1String("CaCertificates")).toByteArray();
|
||||
QSslSocket::addDefaultCaCertificates(QSslCertificate::fromData(certs));
|
||||
QSslSocket::addDefaultCaCertificates(QSslCertificate::fromData(cfg.caCerts()));
|
||||
|
||||
connect( _manager, SIGNAL( sslErrors(QNetworkReply*, QList<QSslError>)),
|
||||
this, SIGNAL(sslFailed(QNetworkReply*, QList<QSslError>)) );
|
||||
@@ -296,6 +294,7 @@ QString ownCloudInfo::configHandle(QNetworkReply *reply)
|
||||
|
||||
QList<QSslCertificate> ownCloudInfo::certificateChain() const
|
||||
{
|
||||
QMutexLocker lock(const_cast<QMutex*>(&_certChainMutex));
|
||||
return _certificateChain;
|
||||
}
|
||||
|
||||
@@ -323,6 +322,7 @@ void ownCloudInfo::slotReplyFinished()
|
||||
QNetworkReply *reply = qobject_cast<QNetworkReply *>(sender());
|
||||
QSslConfiguration sslConfig = reply->sslConfiguration();
|
||||
if (!sslConfig.isNull()) {
|
||||
QMutexLocker lock(&_certChainMutex);
|
||||
_certificateChain = sslConfig.peerCertificateChain();
|
||||
}
|
||||
|
||||
@@ -416,7 +416,9 @@ void ownCloudInfo::slotReplyFinished()
|
||||
} else if( key == QLatin1String( "edition") ) {
|
||||
// get version out
|
||||
edition = val;
|
||||
} else {
|
||||
} else if(key == QLatin1String("installed")) {
|
||||
// Silently ignoring "installed = true" information
|
||||
} else {
|
||||
qDebug() << "Unknown info from ownCloud status.php: "<< key << "=" << val;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,6 +160,7 @@ private:
|
||||
bool _certsUntrusted;
|
||||
int _authAttempts;
|
||||
QMap<QString, oCICredentials> _credentials;
|
||||
QMutex _certChainMutex;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "mirall/owncloudinfo.h"
|
||||
#include "mirall/folderman.h"
|
||||
#include "mirall/credentialstore.h"
|
||||
#include "mirall/utility.h"
|
||||
|
||||
#include <QtCore>
|
||||
#include <QProcess>
|
||||
@@ -421,6 +422,7 @@ void OwncloudSetupWizard::setupLocalSyncFolder()
|
||||
} else {
|
||||
QString res = tr("Creating local sync folder %1... ").arg(_localFolder);
|
||||
if( fi.mkpath( _localFolder ) ) {
|
||||
Utility::setupFavLink( _localFolder );
|
||||
// FIXME: Create a local sync folder.
|
||||
res += tr("ok");
|
||||
} else {
|
||||
|
||||
@@ -14,14 +14,13 @@
|
||||
#include "mirall/mirallconfigfile.h"
|
||||
#include "mirall/utility.h"
|
||||
#include "mirall/sslerrordialog.h"
|
||||
#include "mirall/owncloudinfo.h"
|
||||
|
||||
#include <QtGui>
|
||||
#include <QtNetwork>
|
||||
|
||||
namespace Mirall
|
||||
{
|
||||
#define CA_CERTS_KEY QLatin1String("CaCertificates")
|
||||
|
||||
SslErrorDialog::SslErrorDialog(QWidget *parent) :
|
||||
QDialog(parent), _allTrusted(false)
|
||||
{
|
||||
@@ -42,14 +41,6 @@ SslErrorDialog::SslErrorDialog(QWidget *parent) :
|
||||
}
|
||||
}
|
||||
|
||||
QList<QSslCertificate> SslErrorDialog::storedCACerts()
|
||||
{
|
||||
MirallConfigFile cfg( _customConfigHandle );
|
||||
|
||||
QList<QSslCertificate> cacerts = QSslCertificate::fromData(cfg.caCerts());
|
||||
|
||||
return cacerts;
|
||||
}
|
||||
|
||||
QString SslErrorDialog::styleSheet() const
|
||||
{
|
||||
@@ -66,17 +57,25 @@ QString SslErrorDialog::styleSheet() const
|
||||
}
|
||||
#define QL(x) QLatin1String(x)
|
||||
|
||||
QList<QSslCertificate> SslErrorDialog::storedCACerts()
|
||||
{
|
||||
MirallConfigFile cfg( _customConfigHandle );
|
||||
QList<QSslCertificate> cacerts = QSslCertificate::fromData(cfg.caCerts());
|
||||
return cacerts;
|
||||
}
|
||||
|
||||
bool SslErrorDialog::setErrorList( QList<QSslError> errors )
|
||||
{
|
||||
QList<QSslCertificate> ourCerts = storedCACerts();
|
||||
|
||||
// check if unknown certs caused errors.
|
||||
_unknownCerts.clear();
|
||||
|
||||
QStringList errorStrings;
|
||||
|
||||
QList<QSslCertificate> trustedCerts = SslErrorDialog::storedCACerts();
|
||||
|
||||
for (int i = 0; i < errors.count(); ++i) {
|
||||
if (ourCerts.contains(errors.at(i).certificate()) ||
|
||||
_unknownCerts.contains(errors.at(i).certificate() ))
|
||||
if (trustedCerts.contains(errors.at(i).certificate()) ||
|
||||
_unknownCerts.contains(errors.at(i).certificate() ))
|
||||
continue;
|
||||
errorStrings += errors.at(i).errorString();
|
||||
if (!errors.at(i).certificate().isNull()) {
|
||||
@@ -191,9 +190,7 @@ void SslErrorDialog::accept()
|
||||
QSslSocket::addDefaultCaCertificates(_unknownCerts);
|
||||
|
||||
MirallConfigFile cfg( _customConfigHandle );
|
||||
|
||||
QByteArray certs = cfg.caCerts();
|
||||
|
||||
qDebug() << "Saving " << _unknownCerts.count() << " unknown certs.";
|
||||
foreach( const QSslCertificate& cert, _unknownCerts ) {
|
||||
certs += cert.toPem() + '\n';
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "ui_sslerrordialog.h"
|
||||
|
||||
class QSslError;
|
||||
class QSslCertificate;
|
||||
|
||||
|
||||
namespace Mirall
|
||||
@@ -39,13 +40,14 @@ public:
|
||||
|
||||
void setCustomConfigHandle( const QString& );
|
||||
|
||||
QList<QSslCertificate> storedCACerts();
|
||||
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
void accept();
|
||||
|
||||
private:
|
||||
QList<QSslCertificate> storedCACerts();
|
||||
QString styleSheet() const;
|
||||
bool _allTrusted;
|
||||
|
||||
|
||||
@@ -227,9 +227,9 @@ StatusDialog::StatusDialog( Theme *theme, QWidget *parent) :
|
||||
setWindowTitle( QString::fromLatin1( "%1 %2" ).arg(_theme->appNameGUI(), _theme->version() ) );
|
||||
|
||||
_model = new FolderStatusModel();
|
||||
FolderViewDelegate *delegate = new FolderViewDelegate();
|
||||
_delegate = new FolderViewDelegate();
|
||||
|
||||
_folderList->setItemDelegate( delegate );
|
||||
_folderList->setItemDelegate( _delegate );
|
||||
_folderList->setModel( _model );
|
||||
_folderList->setMinimumWidth( 300 );
|
||||
_folderList->setEditTriggers( QAbstractItemView::NoEditTriggers );
|
||||
@@ -259,6 +259,8 @@ StatusDialog::StatusDialog( Theme *theme, QWidget *parent) :
|
||||
|
||||
StatusDialog::~StatusDialog()
|
||||
{
|
||||
delete _model;
|
||||
delete _delegate;
|
||||
}
|
||||
|
||||
void StatusDialog::slotFolderActivated( const QModelIndex& indx )
|
||||
|
||||
@@ -106,6 +106,7 @@ private:
|
||||
void folderToModelItem( QStandardItem*, Folder* );
|
||||
|
||||
QStandardItemModel *_model;
|
||||
FolderViewDelegate *_delegate;
|
||||
QUrl _OCUrl;
|
||||
Theme *_theme;
|
||||
};
|
||||
|
||||
@@ -12,6 +12,20 @@
|
||||
*/
|
||||
|
||||
#include "utility.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QUrl>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
#include <CoreServices/CoreServices.h>
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
#include <shlobj.h>
|
||||
#endif
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
QString Utility::formatFingerprint( const QByteArray& fmhash )
|
||||
@@ -30,4 +44,50 @@ QString Utility::formatFingerprint( const QByteArray& fmhash )
|
||||
return fp;
|
||||
}
|
||||
|
||||
void Utility::setupFavLink(const QString &folder)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
// Windows Explorer: Place under "Favorites" (Links)
|
||||
wchar_t path[MAX_PATH];
|
||||
SHGetSpecialFolderPath(0, path, CSIDL_PROFILE, FALSE);
|
||||
QString profile = QDir::fromNativeSeparators(QString::fromWCharArray(path));
|
||||
QDir folderDir(QDir::fromNativeSeparators(folder));
|
||||
QString linkName = profile+QLatin1String("/Links/") + folderDir.dirName() + QLatin1String(".lnk");
|
||||
if (!QFile::link(folder, linkName))
|
||||
qDebug() << Q_FUNC_INFO << "linking" << folder << "to" << linkName << "failed!";
|
||||
#elif defined (Q_OS_MAC)
|
||||
// Finder: Place under "Places"/"Favorites" on the left sidebar
|
||||
CFStringRef folderCFStr = CFStringCreateWithCString(0, folder.toUtf8().data(), kCFStringEncodingUTF8);
|
||||
CFURLRef urlRef = CFURLCreateWithFileSystemPath (0, folderCFStr, kCFURLPOSIXPathStyle, true);
|
||||
|
||||
LSSharedFileListRef placesItems = LSSharedFileListCreate(0, kLSSharedFileListFavoriteItems, 0);
|
||||
if (placesItems) {
|
||||
//Insert an item to the list.
|
||||
LSSharedFileListItemRef item = LSSharedFileListInsertItemURL(placesItems,
|
||||
kLSSharedFileListItemLast, 0, 0,
|
||||
urlRef, 0, 0);
|
||||
if (item)
|
||||
CFRelease(item);
|
||||
}
|
||||
CFRelease(placesItems);
|
||||
CFRelease(folderCFStr);
|
||||
CFRelease(urlRef);
|
||||
#elif defined (Q_OS_UNIX)
|
||||
// Nautilus: add to ~/.gtk-bookmarks
|
||||
QFile gtkBookmarks(QDir::homePath()+QLatin1String("/.gtk-bookmarks"));
|
||||
QByteArray folderUrl = "file://" + folder.toUtf8();
|
||||
if (gtkBookmarks.open(QFile::ReadWrite)) {
|
||||
QByteArray places = gtkBookmarks.readAll();
|
||||
if (!places.contains(folderUrl)) {
|
||||
places += folderUrl;
|
||||
gtkBookmarks.reset();
|
||||
gtkBookmarks.write(places + '\n');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ class Utility
|
||||
{
|
||||
public:
|
||||
static QString formatFingerprint( const QByteArray& );
|
||||
static void setupFavLink( const QString &folder );
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -31,3 +31,6 @@ Thumbs.db
|
||||
.htaccess
|
||||
|
||||
Icon\r*
|
||||
|
||||
~$*
|
||||
.~lock.*
|
||||
|
||||
16
test/manual/favlink/favlink.pro
Normal file
16
test/manual/favlink/favlink.pro
Normal file
@@ -0,0 +1,16 @@
|
||||
######################################################################
|
||||
# Automatically generated by qmake (2.01a) Do. Mär 21 15:22:28 2013
|
||||
######################################################################
|
||||
|
||||
TEMPLATE = app
|
||||
CONFIG -= app_bundle
|
||||
|
||||
DEPENDPATH += .
|
||||
INCLUDEPATH += .
|
||||
macx {
|
||||
LIBS += -framework CoreFoundation -framework CoreServices
|
||||
}
|
||||
|
||||
# Input
|
||||
HEADERS += ../../../src/mirall/utility.h
|
||||
SOURCES += main.cpp ../../../src/mirall/utility.cpp
|
||||
10
test/manual/favlink/main.cpp
Normal file
10
test/manual/favlink/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "../../../src/mirall/utility.h"
|
||||
|
||||
#include <QDir>
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
QString dir="/tmp/linktest/";
|
||||
QDir().mkpath(dir);
|
||||
Mirall::Utility::setupFavLink(dir);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2155
translations/mirall_ka_GE.ts
Normal file
2155
translations/mirall_ka_GE.ts
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user