1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2026-04-05 05:34:18 +02:00

Compare commits

..

84 Commits

Author SHA1 Message Date
Daniel Molkentin
b4e2e5f586 1.2.5 ChangeLog 2013-04-22 15:48:21 +02:00
Jenkins for ownCloud
43ed874789 [tx-robot] updated from transifex 2013-04-22 15:28:38 +02:00
Daniel Molkentin
e3f8a918d6 Merge pull request #559 from ghmer/master
Fix for Issue #424
2013-04-22 04:01:22 -07:00
Daniel Molkentin
668bb94270 1.2.5 2013-04-22 12:46:16 +02:00
Daniel Molkentin
89e0543e0a Merge pull request #562 from fastfwd/master
Fix Issue #382 (Minor Windows Installer Issue: Missing descriptions on the "Choose Components" screen).
2013-04-22 03:41:17 -07:00
fastfwd
6695b50965 Fix Issue #382
Just a couple of typo/cut-and-paste errors.
2013-04-22 01:22:16 -07:00
Jenkins for ownCloud
5c02c85126 [tx-robot] updated from transifex 2013-04-21 01:26:18 +02:00
Mario Enrico Ragucci
de99c0c7e7 Silently ignore "installed = true" string in JSON string returned by status.php 2013-04-21 00:46:37 +02:00
Jenkins for ownCloud
5b5cd310b9 [tx-robot] updated from transifex 2013-04-20 01:27:05 +02:00
Daniel Molkentin
ea85d68a26 Revert non-working hack 2013-04-19 16:20:30 +02:00
Daniel Molkentin
fb0a883f7b Init member to 0, remove nonsensical if (foo) delete foo 2013-04-19 16:20:30 +02:00
Jenkins for ownCloud
64a0efe29a [tx-robot] updated from transifex 2013-04-19 01:26:30 +02:00
Daniel Molkentin
1f361b7260 Make certificateChain() thread safe
Fixes #487, #491, #454
2013-04-18 14:02:20 +02:00
Jenkins for ownCloud
763b06477d [tx-robot] updated from transifex 2013-04-18 01:28:59 +02:00
Klaas Freitag
cd7d2a0778 Set path for configure_file of desktop file. 2013-04-17 16:21:05 +02:00
Klaas Freitag
a4be3f304d Set log verbosity before calling csync_init. 2013-04-17 15:29:44 +02:00
Jenkins for ownCloud
88184d14d6 [tx-robot] updated from transifex 2013-04-17 01:53:47 +02:00
Daniel Molkentin
844d8eba47 Fix tr plural usage 2013-04-17 01:21:15 +02:00
Daniel Molkentin
5e65945a53 filitemdialog: more wording changes 2013-04-16 17:28:03 +02:00
Daniel Molkentin
428040762f fileitemdialog: GUI feedback for the copy action 2013-04-16 16:49:53 +02:00
Daniel Molkentin
30e0a13bc5 invalid password: Improve wording 2013-04-16 14:28:00 +02:00
Daniel Molkentin
275c2b1a6b Fix misleading balloon titles
Fixes #546
2013-04-16 11:24:07 +02:00
Jenkins for ownCloud
e409814cb6 [tx-robot] updated from transifex 2013-04-16 01:03:40 +02:00
Daniel Molkentin
acdb624713 safer approach for detecting duplicate sync runs 2013-04-15 15:55:54 +02:00
Daniel Molkentin
3cae8e7124 Remove debugging code 2013-04-15 14:32:23 +02:00
Jenkins for ownCloud
2595b9eae7 [tx-robot] updated from transifex 2013-04-15 01:02:18 +02:00
Jenkins for ownCloud
46a8561925 [tx-robot] updated from transifex 2013-04-14 01:02:45 +02:00
Jenkins for ownCloud
bb74cab887 [tx-robot] updated from transifex 2013-04-13 01:02:28 +02:00
Jenkins for ownCloud
dd7f58b9b9 [tx-robot] updated from transifex 2013-04-12 01:02:18 +02:00
Daniel Molkentin
ee080222d8 Bump version 2013-04-11 12:52:58 +04:00
Daniel Molkentin
c7aaa3ab28 Add 1.2.4 changelog 2013-04-11 12:34:33 +04:00
Daniel Molkentin
fcde01fd4c Clarify string in folder wizard 2013-04-11 10:57:19 +04:00
Jenkins for ownCloud
83be334ee8 [tx-robot] updated from transifex 2013-04-11 01:02:21 +02:00
Jenkins for ownCloud
819f76c2b9 [tx-robot] updated from transifex 2013-04-10 01:02:30 +02:00
Jenkins for ownCloud
783b16676f [tx-robot] updated from transifex 2013-04-09 01:09:43 +02:00
Klaas Freitag
aa6160ab62 Fixed some valgrind warnings. 2013-04-08 14:50:47 +02:00
Jenkins for ownCloud
8bae06802b [tx-robot] updated from transifex 2013-04-06 00:06:25 +02:00
Jenkins for ownCloud
a20f572448 [tx-robot] updated from transifex 2013-04-05 00:24:21 +02:00
Daniel Molkentin
f74aa1e9a6 terminate if more than one thread is being started. 2013-04-04 17:25:53 +02:00
Klaas Freitag
86525570aa Fix default config storage path. 2013-04-04 15:19:45 +02:00
Jenkins for ownCloud
d11ce781d0 [tx-robot] updated from transifex 2013-04-04 00:07:40 +02:00
Klaas Freitag
be5a50a000 Merge branch 'confdir' of https://github.com/smessmer/mirall into smessmer-confdir 2013-04-03 14:42:13 +02:00
dragotin
7309a894bc Merge pull request #477 from rominf/master
Fix for bug with folders adding
2013-04-03 04:39:17 -07:00
Jenkins for ownCloud
310f29d3fd [tx-robot] updated from transifex 2013-04-03 00:04:53 +02:00
Daniel Molkentin
07db03d6bc 1.2.3 2013-04-02 15:27:37 +02:00
Daniel Molkentin
d68c4b379f Unbreak self-signed certificate handling 2013-04-02 15:22:27 +02:00
Daniel Molkentin
396a12dfde Amend ChangeLog 2013-04-02 10:14:02 +02:00
Jenkins for ownCloud
c79f4f91a8 [tx-robot] updated from transifex 2013-04-02 00:05:14 +02:00
Klaas Freitag
bec2f7c9b9 Removed verbose logging on Win32. 2013-03-28 11:14:16 +01:00
Jenkins for ownCloud
d4c8cad0e2 [tx-robot] updated from transifex 2013-03-27 00:11:52 +01:00
Daniel Molkentin
0ad2bd4b91 Add favlink generation support for Nautilus 2013-03-25 18:00:58 +01:00
Daniel Molkentin
dcc8f9fa6c Fix favlink manual test 2013-03-25 18:00:25 +01:00
Markus Goetz
d7a93c74aa OS X: Fix creation of Finder Favorite 2013-03-25 14:57:34 +01:00
Daniel Molkentin
408547611b Manual test for favlinks 2013-03-25 12:53:40 +01:00
rominf
a8f0e79046 Skipping folders with no absolute path. 2013-03-23 10:48:37 +04:00
Jenkins for ownCloud
3e45147497 [tx-robot] updated from transifex 2013-03-23 00:07:09 +01:00
Daniel Molkentin
48310d3f5e Add 1.2.2 changelog 2013-03-22 14:59:22 +01:00
Daniel Molkentin
1831a975eb SSLErrorDialog: We cannot use the existing key chain
... use the one returned by the new server instead.
2013-03-22 14:59:22 +01:00
Jenkins for ownCloud
a766a44bcf [tx-robot] updated from transifex 2013-03-22 12:08:57 +01:00
Jenkins for ownCloud
287f1c55ff [tx-robot] updated from transifex 2013-03-22 00:05:37 +01:00
Daniel Molkentin
1c6523bcec Add plugin for screenreader support 2013-03-21 17:49:03 +03:00
Daniel Molkentin
337c6d3e4e Try to avoid crash on Mac OS during setup
... by moving setupFavLink to a place only called
if the folder to be referenced exists for sure.
2013-03-21 12:50:47 +01:00
Jenkins for ownCloud
4a57957420 [tx-robot] updated from transifex 2013-03-21 00:05:23 +01:00
Daniel Molkentin
c633302f31 Use the certificateChain() in the SSL error dialog
This includes the self-signed certificate anyway, and the previous
behavior led to funny side-effects.
2013-03-20 15:53:55 +01:00
Daniel Molkentin
db95e7291d bump version 2013-03-19 16:30:17 +01:00
Klaas Freitag
ae54c27805 Added office doc lock files. 2013-03-19 16:20:00 +01:00
Daniel Molkentin
284285d441 Do not follow symlinks when recursing
We do not support symlinks anyway
2013-03-18 14:12:25 +01:00
Jenkins for ownCloud
2554a67cc7 [tx-robot] updated from transifex 2013-03-15 00:08:00 +01:00
Jenkins for ownCloud
e2cccd8615 [tx-robot] updated from transifex 2013-03-13 00:07:52 +01:00
Jenkins for ownCloud
948a98a871 [tx-robot] updated from transifex 2013-03-12 00:15:38 +01:00
Daniel Molkentin
b50d201154 Merge pull request #423 from hefee/master
adding WITH_DOC parameter to cmake
2013-03-11 08:28:51 -07:00
hefee
25a3ceb94d adding WITH_DOC parameter to cmake
Fixes #412
2013-03-11 16:18:20 +01:00
Jenkins for ownCloud
c514fe371a [tx-robot] updated from transifex 2013-03-10 00:08:00 +01:00
Jenkins for ownCloud
9169c70efe [tx-robot] updated from transifex 2013-03-09 00:07:47 +01:00
Jenkins for ownCloud
3c07cea229 [tx-robot] updated from transifex 2013-03-08 00:27:56 +01:00
Klaas Freitag
d3f51c611f Some more troubleshooting details. 2013-03-06 08:51:04 +01:00
Jenkins for ownCloud
21123bb029 [tx-robot] updated from transifex 2013-03-04 00:09:00 +01:00
Jenkins for ownCloud
fb8d11650c [tx-robot] updated from transifex 2013-03-03 00:08:15 +01:00
Jan-Christoph Borchardt
2c250050d5 add http and https icons for connection feedback 2013-03-01 16:09:10 +01:00
Jenkins for ownCloud
e9b3cbf3f7 [tx-robot] updated from transifex 2013-02-28 00:07:02 +01:00
Jenkins for ownCloud
d31a6e6179 [tx-robot] updated from transifex 2013-02-27 00:10:59 +01:00
Klaas Freitag
26d8c213b0 Updated Changelog. 2013-02-26 12:08:40 +01:00
Sebastian Meßmer
4caca2ce1a The configuration directory is a static attribute in mirallconfigfile class 2013-01-14 00:48:26 +01:00
Sebastian Meßmer
e0645b4b63 Allow setting the configuration directory on command line 2013-01-02 19:08:14 +01:00
72 changed files with 10767 additions and 7005 deletions

View File

@@ -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.

View File

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

View File

@@ -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

View File

@@ -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

View File

@@ -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/

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

BIN
resources/lock-https.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

View File

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

View File

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

View File

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

View File

@@ -83,6 +83,7 @@ private:
);
static QMutex _mutex;
static QMutex _syncMutex;
static QString _user;
static QString _passwd;
static QNetworkProxy _proxy;

View File

@@ -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 ) {

View File

@@ -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*>& );

View File

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

View File

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

View File

@@ -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

View 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;
}

View File

@@ -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:

View File

@@ -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 ) {

View File

@@ -149,11 +149,13 @@ public:
};
FolderWizard(QWidget *parent = 0);
~FolderWizard();
void setFolderMap( Folder::Map* );
private:
FolderWizardSourcePage *_folderWizardSourcePage;
FolderWizardTargetPage *_folderWizardTargetPage;
};

View File

@@ -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>

View File

@@ -114,6 +114,7 @@ INotify::~INotify()
close(_fd);
free(_buffer);
delete _notifier;
}
void INotify::addPath(const QString &path)

View File

@@ -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;
}

View File

@@ -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;
};

View File

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

View 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;
}
}

View File

@@ -160,6 +160,7 @@ private:
bool _certsUntrusted;
int _authAttempts;
QMap<QString, oCICredentials> _credentials;
QMutex _certChainMutex;
};
};

View File

@@ -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 {

View File

@@ -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';

View File

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

View File

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

View File

@@ -106,6 +106,7 @@ private:
void folderToModelItem( QStandardItem*, Folder* );
QStandardItemModel *_model;
FolderViewDelegate *_delegate;
QUrl _OCUrl;
Theme *_theme;
};

View File

@@ -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
}
}

View File

@@ -24,6 +24,7 @@ class Utility
{
public:
static QString formatFingerprint( const QByteArray& );
static void setupFavLink( const QString &folder );
};
}

View File

@@ -31,3 +31,6 @@ Thumbs.db
.htaccess
Icon\r*
~$*
.~lock.*

View 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

View 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

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