Comparar commits
327 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| e4f4e96567 | |||
| abe136f0b7 | |||
| e1804c3393 | |||
| 8fcc014a51 | |||
| 60a0671a45 | |||
| 600cae7423 | |||
| feb8d342f5 | |||
| e900632c5e | |||
| 524220d090 | |||
| af9c4d0e2f | |||
| c97d8aa8fd | |||
| 86eab48981 | |||
| d2bde5489f | |||
| 39e93768ea | |||
| c1eb9244d1 | |||
| 6ecda6e7f4 | |||
| 7362575d64 | |||
| 6a9b6c1167 | |||
| 8e00fd66de | |||
| ef035ea7f9 | |||
| 77b5c5e963 | |||
| 687549c455 | |||
| b28123bed9 | |||
| 677c34fbf8 | |||
| 2ff7b63551 | |||
| b541fea793 | |||
| efb6b8c2c9 | |||
| e974771796 | |||
| 82ef1bcfe0 | |||
| b7ff4a76e8 | |||
| 465639af82 | |||
| 7f59dec0bb | |||
| 583f9586aa | |||
| 2507ba9818 | |||
| 88cd5421bf | |||
| 7b26e6b8f9 | |||
| 573d942969 | |||
| 1a454ec6b2 | |||
| 02df088843 | |||
| ce4daaaae2 | |||
| cd9335e043 | |||
| 775ad25be3 | |||
| 7e43fe599c | |||
| 20531e57a8 | |||
| 3e64840e33 | |||
| e6db2ee960 | |||
| be34bfb276 | |||
| e2e16aeaaa | |||
| 6fbeb60d86 | |||
| a46a69f250 | |||
| bb5c2cbfa5 | |||
| 60904496d2 | |||
| 94c9a2cca1 | |||
| 3187a22300 | |||
| 9626021a63 | |||
| b72a19ad64 | |||
| 2ae37c6beb | |||
| f8f376ac03 | |||
| 632d231435 | |||
| fc868d89f3 | |||
| 5a57e4a7a6 | |||
| 70a1671dc1 | |||
| 7de70516f1 | |||
| 50bd4b8f4f | |||
| 4a7f3cb486 | |||
| b7663d00b9 | |||
| b307f2b65c | |||
| 6c94d56b53 | |||
| 73a6939b70 | |||
| 88e5a9411a | |||
| c51a80bffa | |||
| 87f4f70abb | |||
| 19a52b9e6b | |||
| 4ea70ebd18 | |||
| d58c392d93 | |||
| b9a6970282 | |||
| a58ef9c586 | |||
| cef24da44c | |||
| 23c7f10b79 | |||
| 5ac434a740 | |||
| 9e514d6cc7 | |||
| 4d109e43fa | |||
| b575ded464 | |||
| a83c5598e8 | |||
| 03a90bf03f | |||
| ff7b2381e9 | |||
| 24cd8041a8 | |||
| 3eaadfe52f | |||
| ebcec44202 | |||
| 7b0b7fde51 | |||
| fa9ec12ae7 | |||
| 54aa4dce46 | |||
| 7c19f748b7 | |||
| 5aa82944a4 | |||
| 0d9cf26890 | |||
| eadecc5802 | |||
| 39bde6f3e4 | |||
| a4837e9291 | |||
| 5672557a84 | |||
| 0b31f2601d | |||
| a5850d4515 | |||
| c39eb315dd | |||
| 6c8e88e2ed | |||
| 3465024898 | |||
| eeea255104 | |||
| 8e2af57b57 | |||
| 7c671756e6 | |||
| f3f387c36b | |||
| b53ce78eb6 | |||
| 0c6788f03d | |||
| bc4753e938 | |||
| 6bd4de19a8 | |||
| 927a8b5071 | |||
| aefbca0787 | |||
| a4310f0f5c | |||
| cb64ba22b3 | |||
| 653b42216f | |||
| 3ec9cd1d9e | |||
| b21e3e0fdc | |||
| 20d0c835b6 | |||
| 3335c733d7 | |||
| 4da55b69df | |||
| b7085987b8 | |||
| a1b44cd82a | |||
| 11b44358f6 | |||
| 4979181e85 | |||
| 651cc25e3f | |||
| 699d1ba13b | |||
| 3c575a2f37 | |||
| bd7ec19644 | |||
| a338b9f269 | |||
| 81ff4e02c5 | |||
| 8a1a2eb5b3 | |||
| 0c646b974f | |||
| e661bf2324 | |||
| 2abb5c95bb | |||
| c3ef1a996f | |||
| 7a2a439426 | |||
| ce26afb262 | |||
| 56e1737c61 | |||
| dff57362f9 | |||
| 3f3a679f81 | |||
| cde9017340 | |||
| 05a7c18635 | |||
| 3a77074b97 | |||
| 446e7cbd93 | |||
| b4d26ba952 | |||
| 622017adcf | |||
| 088a4f0bbe | |||
| ba96fb89a5 | |||
| 70ae11fcad | |||
| 86fd982b00 | |||
| bdb304f8ec | |||
| 001075daf0 | |||
| 2a98aa7130 | |||
| 9904fb200e | |||
| 6822ae5bec | |||
| 440a804836 | |||
| 9b66dd7166 | |||
| 7601783553 | |||
| 6e9df8673f | |||
| c0b0bd5b63 | |||
| 28d86cee17 | |||
| 32bb8295a2 | |||
| 5d71ad83ec | |||
| ab24980001 | |||
| 07dea72c37 | |||
| a734be347b | |||
| 1443ddc7c9 | |||
| 191177ff22 | |||
| 43a2aec92b | |||
| 681243277e | |||
| c848097c6b | |||
| 096e2cf233 | |||
| 7181aedb4b | |||
| edfd75949d | |||
| 7fb134b4e0 | |||
| 87e3553c85 | |||
| 6f3aaecb78 | |||
| 40e3653722 | |||
| 5a4f50a0ff | |||
| 3342ebfcc5 | |||
| b4900d60b7 | |||
| 92309013da | |||
| 4895589e4d | |||
| cb50fae0a7 | |||
| 05d199881e | |||
| 147cf798a6 | |||
| d40c56eda5 | |||
| 6dade0b114 | |||
| 5de44407bf | |||
| 2df741e456 | |||
| 8b5f71f49e | |||
| 77791ccb34 | |||
| a6e4f9939c | |||
| 523cdff1cf | |||
| c4d6277ce3 | |||
| 73cc3a4fd4 | |||
| d655074f85 | |||
| 85a173e174 | |||
| 87b4693a9d | |||
| 28c12a3ca0 | |||
| 70196eb48c | |||
| 9b249716a3 | |||
| a4b46db91e | |||
| ebc44fa494 | |||
| 355a8a0a27 | |||
| 66f041f74c | |||
| 6d02d76cfd | |||
| 48efbcb8ca | |||
| ab050f9093 | |||
| bf9cffe4b3 | |||
| 43f727cf69 | |||
| 256331fbaa | |||
| 32e6585ae6 | |||
| d072e4a678 | |||
| b99c8fe28b | |||
| 5a3120bd52 | |||
| 9ea69be6ab | |||
| 86680a53e0 | |||
| 801cb42d57 | |||
| 51f8a59a9a | |||
| ebbe5acf2b | |||
| 6ccd9e872d | |||
| da69756bb0 | |||
| 1787da8a9d | |||
| f0f82d02ff | |||
| ff20cd4d57 | |||
| 9ab812f89b | |||
| e031f7d090 | |||
| de82d8fcdb | |||
| af2b712dc6 | |||
| d4b72132d6 | |||
| a507558dee | |||
| e73c3199c0 | |||
| d88ab4653b | |||
| 9a2450c4c1 | |||
| 3c1f5e662f | |||
| 100ee69ddd | |||
| d45d6ca9da | |||
| 2608c7007e | |||
| 06a88ea9a4 | |||
| 0194ebb222 | |||
| dc654ac846 | |||
| 370fd5062c | |||
| 763016bd8f | |||
| 00d20b4a42 | |||
| 7f0cc5b699 | |||
| a2b238e2e5 | |||
| 0e2c16e827 | |||
| b9fdae6d67 | |||
| c34115610e | |||
| d3a93cbaeb | |||
| 275ad1e157 | |||
| 85d3c7a263 | |||
| 1855950fa1 | |||
| 159535fe90 | |||
| fff5c280b3 | |||
| e960b265a8 | |||
| f6b35e5d58 | |||
| 088a294fac | |||
| 1d93af5f64 | |||
| 75efa8b252 | |||
| 009a0b03da | |||
| 8379a36a75 | |||
| 2f1a40ff7c | |||
| c041ca6163 | |||
| eacc0c8bd6 | |||
| 171de99e00 | |||
| bf02ccc1e8 | |||
| 7ba961c21a | |||
| cb7be78352 | |||
| 813bc15a78 | |||
| 6cb194e0d5 | |||
| 552ba94c41 | |||
| fc1933803e | |||
| 46e4ec3183 | |||
| 03e3b3bf50 | |||
| 9aed8dbce8 | |||
| c6794cd338 | |||
| 65ec1b74d5 | |||
| 567fe87e98 | |||
| a1ba23eea9 | |||
| 1a3c9a9c1a | |||
| a038c99232 | |||
| 30c8fa1c93 | |||
| 010649f997 | |||
| 597f2a4dfc | |||
| cf1fe690a3 | |||
| 194db066b6 | |||
| 31b27bea38 | |||
| 04f99f3bd7 | |||
| fbf92ac239 | |||
| 669a72f0e1 | |||
| 2f0e65d37c | |||
| 5676685f58 | |||
| db9ccb40a4 | |||
| d4c15d2c38 | |||
| edb3759684 | |||
| 0f9c32452c | |||
| 45dd1d0acf | |||
| 552af7b94d | |||
| 8934979ba1 | |||
| b3e16e0eb0 | |||
| 7773380deb | |||
| e22050a434 | |||
| 7b0231bfce | |||
| edc58c045f | |||
| 035058934f | |||
| 9b1f46e560 | |||
| 9e7a8e619b | |||
| 9c0cd2b13e | |||
| 58ad781bd4 | |||
| 9d6701ecbe | |||
| d659c54798 | |||
| 0e9170cb36 | |||
| 8820bc1c17 | |||
| 74f67c97a9 | |||
| fd96b482c5 | |||
| 727e73d640 | |||
| 129c17651a | |||
| 0469236d80 | |||
| 93e0d52dd3 | |||
| 9f3e576348 | |||
| 5479aaeb5b | |||
| 8dc178a9f3 | |||
| 35d4b96339 |
@@ -1,15 +1,21 @@
|
||||
sudo: required
|
||||
|
||||
language: cpp
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
branches:
|
||||
only:
|
||||
- coverity_scan
|
||||
|
||||
before_install:
|
||||
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/xUbuntu_12.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/xUbuntu_12.04/Release.key
|
||||
- sudo sh -c "echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- sudo sh -c "echo 'deb-src http://download.opensuse.org/repositories/isv:/ownCloud:/desktop/Ubuntu_14.04/ /' >> /etc/apt/sources.list.d/owncloud-client.list"
|
||||
- wget http://download.opensuse.org/repositories/isv:ownCloud:desktop/Ubuntu_14.04/Release.key
|
||||
- sudo apt-key add - < Release.key
|
||||
- sudo apt-get update
|
||||
- sudo apt-get build-dep owncloud-client
|
||||
- sudo apt-get -y build-dep owncloud-client
|
||||
- checkout=$(git show-ref --head --hash head)
|
||||
- cd ../
|
||||
- wget https://scan.coverity.com/download/linux-64 --post-data "token=$token&project=owncloud%2Fmirall" -O coverity_tool.tgz
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
cmake_policy(VERSION 2.8.0)
|
||||
|
||||
@@ -125,6 +126,17 @@ if(OWNCLOUD_5XX_NO_BLACKLIST)
|
||||
add_definitions(-DOWNCLOUD_5XX_NO_BLACKLIST=1)
|
||||
endif()
|
||||
|
||||
# When this option is enabled, a rename that is not allowed will be renamed back
|
||||
# do the original as a restoration step. Withut this option, the restoration will
|
||||
# re-download the file instead.
|
||||
# The default is off because we don't want to rename the files back behind the user's back
|
||||
# Added for IL issue #550
|
||||
option(OWNCLOUD_RESTORE_RENAME "OWNCLOUD_RESTORE_RENAME" OFF)
|
||||
if(OWNCLOUD_RESTORE_RENAME)
|
||||
add_definitions(-DOWNCLOUD_RESTORE_RENAME=1)
|
||||
endif()
|
||||
|
||||
|
||||
if(APPLE)
|
||||
set( SOCKETAPI_TEAM_IDENTIFIER_PREFIX "" CACHE STRING "SocketApi prefix (including a following dot) that must match the codesign key's TeamIdentifier/Organizational Unit" )
|
||||
endif()
|
||||
@@ -151,11 +163,6 @@ endif()
|
||||
|
||||
find_package(ZLIB)
|
||||
|
||||
find_package(LibsnoreQt5 0.6.0)
|
||||
if(LibsnoreQt5_FOUND)
|
||||
find_package(LibsnoreSettingsQt5)
|
||||
endif()
|
||||
|
||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
configure_file(test/test_journal.db "${CMAKE_BINARY_DIR}/test/test_journal.db" COPYONLY)
|
||||
|
||||
@@ -1,5 +1,62 @@
|
||||
ChangeLog
|
||||
=========
|
||||
|
||||
version 2.2.3 (release 2016-08-08)
|
||||
* SyncEngine: Fix detection of backup (#5104)
|
||||
* Fix bug with overriding URL in config (#5016)
|
||||
* Sharing: Fix bug with file names containing percent encodes (#5042, #5043)
|
||||
* Sharing: Permissions for federated shares on servers >=9.1 (#4996, #5001)
|
||||
* Overlays: Fix issues with file name casing on OS X and Windows
|
||||
* Windows: Skip symlinks and junctions again (#5019)
|
||||
* Only accept notification API Capability if endpoint is OCS-enabled (#5034)
|
||||
* Fix windows HiDPI (#4994)
|
||||
* SocketAPI: Use different pipe name to avoid unusual delay (#4977)
|
||||
* Tray: Add minimal mode as workaround and testing tool for Linux issues (#4985, #4990)
|
||||
* owncloudcmd: Fix --exclude regression #4979
|
||||
* Small memleak: Use the full file stat destructors (#4992)
|
||||
* Fix small QAction memleak (#5008)
|
||||
* Fix crash on shutting down during propagation (#4979)
|
||||
* Decrease memory usage during sync #4979
|
||||
* Setup csync logging earlier to get all log output (#4991)
|
||||
* Enable Shibboleth debug view with OWNCLOUD_SHIBBOLETH_DEBUG env
|
||||
|
||||
version 2.2.2 (release 2016-06-21)
|
||||
* Excludes: Don't redundantly add the same exclude files (memleak) (#4967, #4988)
|
||||
* Excludes: Only log if the pattern was really logged. (#4989)
|
||||
|
||||
version 2.2.1 (release 2016-06-06)
|
||||
* Fix out of memory error when too many uploads happen (#4611)
|
||||
* Fix display errors in progress display (#4803 #4856)
|
||||
* LockWatcher: Remember to upload files after they become unlocked (#4865)
|
||||
* Fix overlay icons for files with umlauts (#4884)
|
||||
* Certs: Re-ask for different cert after rejection (#4898, #4911)
|
||||
* Progress: Don't count items without propagation jobs (#4856, #4910)
|
||||
* Utility: Fix for the translation of minutes, second (#4855)
|
||||
* SyncEngine: invalid the blacklist entry when the rename destination change
|
||||
|
||||
version 2.2.0 (release 2016-05-12)
|
||||
* Overlay icons: Refactoring - mainly for performance improvements
|
||||
* Improved error handling with Sync Journal on USB storages (#4632)
|
||||
* Sharing Completion: Improved UI of completion in sharing from desktop. (#3737)
|
||||
* Show server notifications on the client (#3733)
|
||||
* Improved Speed with small files by dynamic parallel request count (#4529)
|
||||
* LockWatcher: Make sure to sync files after apps released exclusive locks on Windows.
|
||||
* Improved handling of Win32 file locks and network files
|
||||
* Workaround Ubuntu 16.04 tray icon bug (#4693)
|
||||
* Removed the Alias field from the folder definition (#4695)
|
||||
* Improved netrc parser (#4691)
|
||||
* Improved user notifications about ignored files and conflicts (#4761, #3222)
|
||||
* Add warnings for old server versions (#4523)
|
||||
* Enable tranportation checksums if the server supports based on server capabilities (#3735)
|
||||
|
||||
* Default Chunk-size changed to 10MB (#4354)
|
||||
* Documentation Improvements, ie. about overlay icons
|
||||
* Translation fixes
|
||||
* Countless other bugfixes
|
||||
* Sqlite Update to recent version
|
||||
* Update of QtKeyChain to support Windows credential store
|
||||
* Packaging of dolphin overlay icon module for bleeding edge distros
|
||||
|
||||
version 2.1.1 (release 2016-02-10)
|
||||
* UI improvements for HiDPI screens, error messages, RTL languages
|
||||
* Fix occurences of "Connection Closed" when a new unauthenticated TCP socket is used
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
#!groovy
|
||||
|
||||
node('CLIENT') {
|
||||
stage 'Checkout'
|
||||
checkout scm
|
||||
sh '''git submodule update --init'''
|
||||
|
||||
stage 'Qt4'
|
||||
sh '''rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
|
||||
make
|
||||
ctest --output-on-failure'''
|
||||
|
||||
stage 'Qt4 - clang'
|
||||
sh '''rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=ON ..
|
||||
make
|
||||
ctest --output-on-failure'''
|
||||
|
||||
stage 'Qt5'
|
||||
sh '''rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
|
||||
make
|
||||
ctest --output-on-failure'''
|
||||
|
||||
stage 'Qt5 - clang'
|
||||
sh '''rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUNIT_TESTING=1 -DBUILD_WITH_QT4=OFF ..
|
||||
make
|
||||
ctest --output-on-failure'''
|
||||
|
||||
|
||||
stage 'Win32'
|
||||
def win32 = docker.image('deepdiver/docker-owncloud-client-win32:latest')
|
||||
win32.pull() // make sure we have the latest available from Docker Hub
|
||||
win32.inside {
|
||||
sh '''
|
||||
rm -rf build-win32
|
||||
mkdir build-win32
|
||||
cd build-win32
|
||||
../admin/win/download_runtimes.sh
|
||||
cmake .. -DCMAKE_TOOLCHAIN_FILE=../admin/win/Toolchain-mingw32-openSUSE.cmake -DWITH_CRASHREPORTER=ON
|
||||
make -j4
|
||||
make package
|
||||
ctest .
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ with your computer.
|
||||
|
||||
### Binary packages
|
||||
|
||||
* Refer to the download page http://owncloud.org/sync-clients/
|
||||
* Refer to the download page https://owncloud.org/install/#install-clients
|
||||
|
||||
### Source code
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
set( MIRALL_VERSION_MAJOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 2 )
|
||||
set( MIRALL_VERSION_MINOR 3 )
|
||||
set( MIRALL_VERSION_PATCH 0 )
|
||||
set( MIRALL_VERSION_YEAR 2016 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
@@ -33,11 +33,11 @@ StrCpy $UNINSTALL_MESSAGEBOX "Ez dirudi ${APPLICATION_NAME} '$INSTDIR'.$ direkto
|
||||
StrCpy $UNINSTALL_ABORT "Desinstalazioak erabiltzaileak bertan behera utzi du"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Abiarazle Bizkorreko Lasterbidea (E/E)"
|
||||
StrCpy $INIT_NO_DESKTOP "Mahaigaineko Lasterbidea (dagoena berridazten du)"
|
||||
StrCpy $UAC_ERROR_ELEVATE "Ezin izan da goratu, errorea:"
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Instalatzaileak administratzaile baimenak behar ditu, saiatu berriro"
|
||||
StrCpy $INIT_INSTALLER_RUNNING "Instalatzailea dagoeneko martxan da."
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Desinstalatzaile honek administratzaile baimenak behar ditu, saiatu berriro"
|
||||
StrCpy $UAC_ERROR_LOGON_SERVICE "Saioa hasteko zerbitzua ez dago martxan, bertan behera uzten!"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "Desinstalatzailea dagoeneko martxan da."
|
||||
StrCpy $SectionGroup_Shortcuts "Lasterbideak"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
|
||||
StrCpy $UAC_ERROR_ELEVATE "Unable to elevate, error:"
|
||||
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
|
||||
|
||||
@@ -30,7 +30,7 @@ StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Z
|
||||
StrCpy $UNINSTALLER_FILE_Detail "Zapisuji odinstal tor"
|
||||
StrCpy $UNINSTALLER_REGISTRY_Detail "Zapisuji instal tor do registr…"
|
||||
StrCpy $UNINSTALLER_FINISHED_Detail "DokonŸeno"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Nezd se, §e ${APPLICATION_NAME} je nainstalov na ve slo§ce '$INSTDIR'.$\n$\nChcete pokraŸovat (nedoporuŸuje se)?"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Nezd se, §e ${APPLICATION_NAME} je nainstalov na v adres ýi '$INSTDIR'.$\n$\nChcete pokraŸovat (nedoporuŸuje se)?"
|
||||
StrCpy $UNINSTALL_ABORT "Odinstalace zruçena u§ivatelem"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Z stupce rychl‚ho spuçtØn¡ (nen¡ k dispozici)"
|
||||
StrCpy $INIT_NO_DESKTOP "Z stupce na ploçe (pýep¡çe existuj¡c¡)"
|
||||
|
||||
@@ -9,7 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "インストール済"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "${APPLICATION_NAME} のインストール方法を選択する"
|
||||
StrCpy $PageReinstall_OLD_Field_1 "${APPLICATION_NAME} の最新バージョンがすでにインストールされています。$\n旧バージョンのインストールはお勧めしません。旧バージョンのインストールが本当に必要な場合は、まず最新バージョンをアンインストールしてから、旧バージョンをインストールしてください。$\nオペレーションを選択し、次へをクリックする。"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} は、${VERSION} が既にインストールされています。$\n$\n実行したい操作を選択し、次へをクリックする。"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} は、${VERSION} がすでにインストールされています。$\n$\n実行したい操作を選択して、次へをクリックしてください。"
|
||||
StrCpy $PageReinstall_SAME_Field_2 "追加/再インストールコンポーネント"
|
||||
StrCpy $PageReinstall_SAME_Field_3 "${APPLICATION_NAME} をアンインストール"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "${APPLICATION_NAME} をアンインストール"
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
# Auto-generated - do not modify
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar notas de lançamento"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Existem ${APPLICATION_EXECUTABLE} processo(s) em execução que precisa(m) de ser interrompido(s).$\nDeseja que o instalador o(s) termine automaticamente?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar os processos ${APPLICATION_EXECUTABLE}."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado o processo a terminar!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "Uma versão antiga de ${APPLICATION_NAME} está instalada no sistema. É recomendado que você desinstale a versão atual antes de instalar a mais recente. Selecione a operação que deseja executar e clique em $\"Avançar$\" para continuar."
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "Encontrados ${APPLICATION_EXECUTABLE} processo(s) em execução que precisa(m) de ser interrompido(s).$\nDeseja que o instalador o(s) termine por si?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "A terminar os processos de ${APPLICATION_EXECUTABLE}."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "Não foi encontrado nenhum processo para terminar!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "Está instalada no sistema uma versão antiga de ${APPLICATION_NAME}. É recomendado que desinstale a versão atual antes de instalar a mais recente. Selecione a operação que deseja executar e clique em $\"Seguinte$\" para continuar."
|
||||
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
|
||||
StrCpy $PageReinstall_NEW_Field_3 "Não desinstale"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Já instalado"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Escolha como pretende instalar ${APPLICATION_NAME}."
|
||||
StrCpy $PageReinstall_OLD_Field_1 "Uma versão mais recente do ${APPLICATION_NAME} já está instalada! Não é recomendada a instalação de uma versão mais antiga. Se realmente deseja instalar esta versão, aconselha-se a desinstalação da versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
|
||||
StrCpy $PageReinstall_OLD_Field_1 "Uma versão mais recente da aplicação ${APPLICATION_NAME} já está instalada! Não é recomendada a instalação de uma versão mais antiga. Se realmente deseja instalar esta versão, aconselha-se a desinstalação da versão atual primeiro. Selecione a operação que deseja executar e clique em Avançar para continuar."
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} já está instalada.$\nSelecione a operação que deseja realizar e clique em 'Seguinte' para continuar."
|
||||
StrCpy $PageReinstall_SAME_Field_2 "Adicionar/Reinstalar Componentes"
|
||||
StrCpy $PageReinstall_SAME_Field_3 "Desinstalar ${APPLICATION_NAME}"
|
||||
@@ -20,17 +20,17 @@ StrCpy $OPTION_SECTION_SC_SHELL_EXT_DetailPrint "A instalar integração para Wi
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_SECTION "Atalho do progama no Menu Inicial"
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_DetailPrint "A adicionar o atalho de ${APPLICATION_NAME} ao Menu Inicial."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_SECTION "Atalho da área de trabalho"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "A criar atalhos da área de trabalho"
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_DetailPrint "A criar atalhos na área de trabalho"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_SECTION "Atalho de início rápido"
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_DetailPrint "A criar atalho de início rápido"
|
||||
StrCpy $OPTION_SECTION_SC_APPLICATION_Desc "O essencial de ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_START_MENU_Desc "Atalho de ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Atalho no ambiente de trabalho de ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_DESKTOP_Desc "Atalho do ambiente de trabalho para ${APPLICATION_NAME}."
|
||||
StrCpy $OPTION_SECTION_SC_QUICK_LAUNCH_Desc "Atalho de início rápido de ${APPLICATION_NAME}."
|
||||
StrCpy $UNINSTALLER_FILE_Detail "A escrever o Desinstalador"
|
||||
StrCpy $UNINSTALLER_REGISTRY_Detail "A escrever chaves de registo do instalador"
|
||||
StrCpy $UNINSTALLER_FINISHED_Detail "Terminado"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que ${APPLICATION_NAME} esteja instalado no diretório '$INSTDIR'.$\n$\nContinuar na mesma (não recomendado)?"
|
||||
StrCpy $UNINSTALL_MESSAGEBOX "Não parece que a aplicação ${APPLICATION_NAME} esteja instalada no diretório '$INSTDIR'.$\n$\nContinuar na mesma (não recomendado)?"
|
||||
StrCpy $UNINSTALL_ABORT "Desinstalação cancelada pelo utilizador"
|
||||
StrCpy $INIT_NO_QUICK_LAUNCH "Atalho de Início Rápido (N/A)"
|
||||
StrCpy $INIT_NO_DESKTOP "Atalho do Ambiente de Trabalho (sobrepõe o existente)"
|
||||
|
||||
@@ -9,6 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "Neodin
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Už je nainštalovaný"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Vyberte si, ako chcete nainštalova� ${APPLICATION_NAME}."
|
||||
StrCpy $PageReinstall_OLD_Field_1 "Novšia verzia ${APPLICATION_NAME} je už nainštalovaná! Neodporúèam vám nainštalova� staršiu verziu. Ak naozaj chcete nainštalova� túto staršiu verziu, je lepšie najprv odinštalova� aktuálnu verziu. Vyberte operáciu, ktorú chcete vykona�, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} je už nainštalovaná.$\n$\nVyberte operáciu, ktorú chcete vykona�, a kliknite na tlaèidlo Ïalej pre pokraèovanie."
|
||||
StrCpy $PageReinstall_SAME_Field_2 "Prida�/Preinštalova� komponenty"
|
||||
StrCpy $PageReinstall_SAME_Field_3 "Odinštalova� ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Odinštalova� ${APPLICATION_NAME}"
|
||||
@@ -37,7 +38,6 @@ StrCpy $UAC_ERROR_ELEVATE "Nemo
|
||||
StrCpy $UAC_INSTALLER_REQUIRE_ADMIN "Tento inštalátor vyžaduje admin prístup, skúste to znova"
|
||||
StrCpy $INIT_INSTALLER_RUNNING "Inštalátor je už spustený."
|
||||
StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Tento odinštalátor vyžaduje admin prístup, skúste to znova"
|
||||
StrCpy $UAC_ERROR_LOGON_SERVICE "Prihlasovacia služba nebeží! Prerušuje sa."
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "Odinštalátor je už spustený."
|
||||
StrCpy $SectionGroup_Shortcuts "Zástupcovia"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
|
||||
StrCpy $UAC_ERROR_LOGON_SERVICE "Logon service is not running, aborting!"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "Mostrar las notas de la versión"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "El/los proceso/s ${APPLICATION_EXECUTABLE} debe/n ser detenidos.$\n¿Quiere que el instalador lo haga por usted?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "Deteniendo el/los proceso/s ${APPLICATION_EXECUTABLE}."
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso para detener no encontrado!"
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "¡Proceso para finalizar no encontrado!"
|
||||
StrCpy $PageReinstall_NEW_Field_1 "Una versión anterior de ${APPLICATION_NAME} se encuentra instalada en el sistema. Se recomienda de instalar la versión actual antes de instalar la nueva. Seleccione la operacion deseada y haga click en Siguiente para continuar."
|
||||
StrCpy $PageReinstall_NEW_Field_2 "Desinstalar antes de instalar"
|
||||
StrCpy $PageReinstall_NEW_Field_3 "No desinstalar"
|
||||
|
||||
@@ -9,6 +9,7 @@ StrCpy $PageReinstall_NEW_Field_3 "Avinstallera inte"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_TITLE "Redan installerad"
|
||||
StrCpy $PageReinstall_NEW_MUI_HEADER_TEXT_SUBTITLE "Välj hur du vill installera ${APPLICATION_NAME}."
|
||||
StrCpy $PageReinstall_OLD_Field_1 "En nyare version av ${APPLICATION_NAME} är redan installerad! Det rekommenderas inte att du installerar en äldre version. Om du verkligen vill installera denna äldre versionen, är det bättre att du avinstallerar den nuvarande versionen först. Välj den åtgärd du vill utföra och klicka Nästa för att fortsätta."
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} är redan installerad.$\n$\nVälj den åtgärd du vill utföra och klicka på Nästa för att fortsätta."
|
||||
StrCpy $PageReinstall_SAME_Field_2 "Lägg till/Ominstallera komponenter"
|
||||
StrCpy $PageReinstall_SAME_Field_3 "Avinstallera ${APPLICATION_NAME}"
|
||||
StrCpy $UNINSTALLER_APPDATA_TITLE "Avinstallera ${APPLICATION_NAME}"
|
||||
@@ -40,4 +41,3 @@ StrCpy $UAC_UNINSTALLER_REQUIRE_ADMIN "Detta avinstallationsprogram kräver adm
|
||||
StrCpy $UAC_ERROR_LOGON_SERVICE "Login-service körs inte, avbryter!"
|
||||
StrCpy $INIT_UNINSTALLER_RUNNING "Avinstallationsprogrammet körs redan."
|
||||
StrCpy $SectionGroup_Shortcuts "Genvägar"
|
||||
StrCpy $PageReinstall_SAME_Field_1 "${APPLICATION_NAME} ${VERSION} is already installed.$\r$\nSelect the operation you want to perform and click Next to continue."
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Auto-generated - do not modify
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "แสดงบันทึกประจำรุ่น"
|
||||
StrCpy $MUI_FINISHPAGE_SHOWREADME_TEXT_STRING "แสดงบันทึกที่มี"
|
||||
StrCpy $ConfirmEndProcess_MESSAGEBOX_TEXT "พบว่ากระบวนการ ${APPLICATION_EXECUTABLE} จะต้องหยุดทำงาน$\nคุณต้องการติดตั้งเพื่อหยุดการทำงานเหล่านี้ของคุณ?"
|
||||
StrCpy $ConfirmEndProcess_KILLING_PROCESSES_TEXT "ฆ่ากระบวนการทำงาน ${APPLICATION_EXECUTABLE}"
|
||||
StrCpy $ConfirmEndProcess_KILL_NOT_FOUND_TEXT "ไม่พบการฆ่ากระบวนการ!"
|
||||
|
||||
@@ -2,27 +2,27 @@
|
||||
!insertmacro MUI_LANGUAGE "Swedish"
|
||||
!insertmacro MUI_LANGUAGE "Estonian"
|
||||
!insertmacro MUI_LANGUAGE "Turkish"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Slovenian"
|
||||
!insertmacro MUI_LANGUAGE "SpanishInternational"
|
||||
!insertmacro MUI_LANGUAGE "Dutch"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Hungarian"
|
||||
!insertmacro MUI_LANGUAGE "Ukrainian"
|
||||
!insertmacro MUI_LANGUAGE "French"
|
||||
!insertmacro MUI_LANGUAGE "Norwegian"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Russian"
|
||||
!insertmacro MUI_LANGUAGE "Thai"
|
||||
!insertmacro MUI_LANGUAGE "Finnish"
|
||||
!insertmacro MUI_LANGUAGE "Basque"
|
||||
!insertmacro MUI_LANGUAGE "Greek"
|
||||
!insertmacro MUI_LANGUAGE "SimpChinese"
|
||||
!insertmacro MUI_LANGUAGE "PortugueseBR"
|
||||
!insertmacro MUI_LANGUAGE "Catalan"
|
||||
!insertmacro MUI_LANGUAGE "Italian"
|
||||
!insertmacro MUI_LANGUAGE "Portuguese"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "Japanese"
|
||||
!insertmacro MUI_LANGUAGE "Galician"
|
||||
!insertmacro MUI_LANGUAGE "Czech"
|
||||
!insertmacro MUI_LANGUAGE "German"
|
||||
!insertmacro MUI_LANGUAGE "Slovak"
|
||||
!insertmacro MUI_LANGUAGE "Spanish"
|
||||
!insertmacro MUI_LANGUAGE "Polish"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
[Paths]
|
||||
Prefix = .
|
||||
Plugins = .
|
||||
Binaries = .
|
||||
Imports = .
|
||||
Qml2Imports = .
|
||||
LibraryExecutables = .
|
||||
@@ -1,5 +0,0 @@
|
||||
--- binary
|
||||
+++ binary
|
||||
@@ -1 +1 @@
|
||||
-Subproject commit 1fb9ddfa9a9a1b4dbc447eee10dbed89172d968a
|
||||
+Subproject commit 01d73965dc8b862d1b2310d3ef801c297b697ec7
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -411,6 +411,9 @@ Section "${APPLICATION_NAME}" SEC_APPLICATION
|
||||
File "@CPACK_RESOURCE_FILE_LICENSE@"
|
||||
;File /oname=NOTES.txt ${NSI_PATH}\RELEASE_NOTES.txt
|
||||
|
||||
;Qt config:
|
||||
File "${NSI_PATH}\qt.conf"
|
||||
|
||||
;Qt stuff:
|
||||
File "${QT_DLL_PATH}\Qt5Core.dll"
|
||||
File "${QT_DLL_PATH}\Qt5Gui.dll"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# (c) 2014 Copyright ownCloud, Inc.
|
||||
# (c) 2014 Copyright ownCloud GmbH
|
||||
# Redistribution and use is allowed according to the terms of the BSD license.
|
||||
# For details see the accompanying COPYING* file.
|
||||
|
||||
|
||||
@@ -23,4 +23,6 @@
|
||||
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||
#cmakedefine SHAREDIR "@SHAREDIR@"
|
||||
|
||||
#cmakedefine WITH_UNIT_TESTING 1
|
||||
|
||||
#endif
|
||||
|
||||
@@ -41,6 +41,8 @@ endif (MEM_NULL_TESTS)
|
||||
add_subdirectory(src)
|
||||
|
||||
if (UNIT_TESTING)
|
||||
set(WITH_UNIT_TESTING ON)
|
||||
|
||||
find_package(CMocka)
|
||||
if (CMOCKA_FOUND)
|
||||
include(AddCMockaTest)
|
||||
|
||||
@@ -62,8 +62,4 @@ if (WIN32)
|
||||
check_function_exists(__mingw_asprintf HAVE___MINGW_ASPRINTF)
|
||||
endif(WIN32)
|
||||
|
||||
if (UNIT_TESTING)
|
||||
set(WITH_UNIT_TESTING ON)
|
||||
endif (UNIT_TESTING)
|
||||
|
||||
set(CSYNC_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} CACHE INTERNAL "csync required system libraries")
|
||||
|
||||
@@ -387,7 +387,6 @@ static int _csync_treewalk_visitor(void *obj, void *data) {
|
||||
trav.inode = cur->inode;
|
||||
|
||||
trav.error_status = cur->error_status;
|
||||
trav.should_update_metadata = cur->should_update_metadata;
|
||||
trav.has_ignored_files = cur->has_ignored_files;
|
||||
trav.checksum = cur->checksum;
|
||||
trav.checksumTypeId = cur->checksumTypeId;
|
||||
|
||||
@@ -98,6 +98,7 @@ enum csync_status_codes_e {
|
||||
CSYNC_STATUS_INDIVIDUAL_IS_SYMLINK,
|
||||
CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST,
|
||||
CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS,
|
||||
CSYNC_STATUS_INDIVIDUAL_TRAILING_SPACE,
|
||||
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME,
|
||||
CYSNC_STATUS_FILE_LOCKED_OR_OPEN,
|
||||
CSYNC_STATUS_INDIVIDUAL_EXCLUDE_HIDDEN,
|
||||
@@ -124,20 +125,22 @@ typedef enum csync_status_codes_e CSYNC_STATUS;
|
||||
* the csync state of a file.
|
||||
*/
|
||||
enum csync_instructions_e {
|
||||
CSYNC_INSTRUCTION_NONE = 0x00000000, /* Nothing to do (UPDATE|RECONCILE) */
|
||||
CSYNC_INSTRUCTION_EVAL = 0x00000001, /* There was changed compared to the DB (UPDATE) */
|
||||
CSYNC_INSTRUCTION_REMOVE = 0x00000002, /* The file need to be removed (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_RENAME = 0x00000004, /* The file need to be renamed (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_EVAL_RENAME= 0x00000800, /* The file is new, it is the destination of a rename (UPDATE) */
|
||||
CSYNC_INSTRUCTION_NEW = 0x00000008, /* The file is new compared to the db (UPDATE) */
|
||||
CSYNC_INSTRUCTION_CONFLICT = 0x00000010, /* The file need to be downloaded because it is a conflict (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_IGNORE = 0x00000020, /* The file is ignored (UPDATE|RECONCILE) */
|
||||
CSYNC_INSTRUCTION_SYNC = 0x00000040, /* The file need to be pushed to the other remote (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_STAT_ERROR = 0x00000080,
|
||||
CSYNC_INSTRUCTION_ERROR = 0x00000100,
|
||||
CSYNC_INSTRUCTION_TYPE_CHANGE = 0x0000200, /* Like NEW, but deletes the old entity first (RECONCILE)
|
||||
Used when the type of something changes from directory to file
|
||||
or back. */
|
||||
CSYNC_INSTRUCTION_NONE = 0x00000000, /* Nothing to do (UPDATE|RECONCILE) */
|
||||
CSYNC_INSTRUCTION_EVAL = 0x00000001, /* There was changed compared to the DB (UPDATE) */
|
||||
CSYNC_INSTRUCTION_REMOVE = 0x00000002, /* The file need to be removed (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_RENAME = 0x00000004, /* The file need to be renamed (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_EVAL_RENAME = 0x00000800, /* The file is new, it is the destination of a rename (UPDATE) */
|
||||
CSYNC_INSTRUCTION_NEW = 0x00000008, /* The file is new compared to the db (UPDATE) */
|
||||
CSYNC_INSTRUCTION_CONFLICT = 0x00000010, /* The file need to be downloaded because it is a conflict (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_IGNORE = 0x00000020, /* The file is ignored (UPDATE|RECONCILE) */
|
||||
CSYNC_INSTRUCTION_SYNC = 0x00000040, /* The file need to be pushed to the other remote (RECONCILE) */
|
||||
CSYNC_INSTRUCTION_STAT_ERROR = 0x00000080,
|
||||
CSYNC_INSTRUCTION_ERROR = 0x00000100,
|
||||
CSYNC_INSTRUCTION_TYPE_CHANGE = 0x00000200, /* Like NEW, but deletes the old entity first (RECONCILE)
|
||||
Used when the type of something changes from directory to file
|
||||
or back. */
|
||||
CSYNC_INSTRUCTION_UPDATE_METADATA = 0x00000400, /* If the etag has been updated and need to be writen to the db,
|
||||
but without any propagation (UPDATE|RECONCILE) */
|
||||
};
|
||||
|
||||
enum csync_ftw_type_e {
|
||||
@@ -253,9 +256,6 @@ struct csync_tree_walk_file_s {
|
||||
enum csync_ftw_type_e type;
|
||||
enum csync_instructions_e instruction;
|
||||
|
||||
/* For directories: If the etag has been updated and need to be writen on the db */
|
||||
int should_update_metadata;
|
||||
|
||||
/* For directories: Does it have children that were ignored (hidden or ignore pattern) */
|
||||
int has_ignored_files;
|
||||
|
||||
|
||||
@@ -40,10 +40,22 @@
|
||||
#define CSYNC_LOG_CATEGORY_NAME "csync.exclude"
|
||||
#include "csync_log.h"
|
||||
|
||||
#ifndef NDEBUG
|
||||
#ifndef WITH_UNIT_TESTING
|
||||
static
|
||||
#endif
|
||||
int _csync_exclude_add(c_strlist_t **inList, const char *string) {
|
||||
size_t i = 0;
|
||||
|
||||
// We never want duplicates, so check whether the string is already
|
||||
// in the list first.
|
||||
if (*inList) {
|
||||
for (i = 0; i < (*inList)->count; ++i) {
|
||||
char *pattern = (*inList)->vector[i];
|
||||
if (c_streq(pattern, string)) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return c_strlist_add_grow(inList, string);
|
||||
}
|
||||
|
||||
@@ -139,8 +151,10 @@ int csync_exclude_load(const char *fname, c_strlist_t **list) {
|
||||
buf[i] = '\0';
|
||||
if (*entry != '#') {
|
||||
const char *unescaped = csync_exclude_expand_escapes(entry);
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
|
||||
rc = _csync_exclude_add(list, unescaped);
|
||||
if( rc == 0 ) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
|
||||
}
|
||||
SAFE_FREE(unescaped);
|
||||
if (rc < 0) {
|
||||
goto out;
|
||||
@@ -229,9 +243,14 @@ static CSYNC_EXCLUDE_TYPE _csync_excluded_common(c_strlist_t *excludes, const ch
|
||||
// distinguish files ending in '.' from files without an ending,
|
||||
// as '.' is a separator that is not stored internally, so let's
|
||||
// not allow to sync those to avoid file loss/ambiguities (#416)
|
||||
if (blen > 1 && (bname[blen-1]== ' ' || bname[blen-1]== '.' )) {
|
||||
match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
|
||||
goto out;
|
||||
if (blen > 1) {
|
||||
if (bname[blen-1]== ' ') {
|
||||
match = CSYNC_FILE_EXCLUDE_TRAILING_SPACE;
|
||||
goto out;
|
||||
} else if (bname[blen-1]== '.' ) {
|
||||
match = CSYNC_FILE_EXCLUDE_INVALID_CHAR;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
if (csync_is_windows_reserved_word(bname)) {
|
||||
|
||||
@@ -27,13 +27,14 @@ enum csync_exclude_type_e {
|
||||
CSYNC_FILE_EXCLUDE_AND_REMOVE,
|
||||
CSYNC_FILE_EXCLUDE_LIST,
|
||||
CSYNC_FILE_EXCLUDE_INVALID_CHAR,
|
||||
CSYNC_FILE_EXCLUDE_TRAILING_SPACE,
|
||||
CSYNC_FILE_EXCLUDE_LONG_FILENAME,
|
||||
CSYNC_FILE_EXCLUDE_HIDDEN,
|
||||
CSYNC_FILE_EXCLUDE_STAT_FAILED
|
||||
};
|
||||
typedef enum csync_exclude_type_e CSYNC_EXCLUDE_TYPE;
|
||||
|
||||
#ifdef NDEBUG
|
||||
#ifdef WITH_UNIT_TESTING
|
||||
int _csync_exclude_add(c_strlist_t **inList, const char *string);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -186,8 +186,6 @@ struct csync_file_stat_s {
|
||||
mode_t mode; /* u32 */
|
||||
unsigned int type : 4;
|
||||
unsigned int child_modified : 1;
|
||||
unsigned int should_update_metadata : 1; /*specify that the etag, or the remote perm or fileid has
|
||||
changed and need to be updated on the db even for INSTRUCTION_NONE */
|
||||
unsigned int has_ignored_files : 1; /* specify that a directory, or child directory contains ignored files */
|
||||
|
||||
char *destpath; /* for renames */
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
#include "config_csync.h"
|
||||
|
||||
#include <assert.h>
|
||||
#include "csync_private.h"
|
||||
#include "csync_reconcile.h"
|
||||
#include "csync_util.h"
|
||||
@@ -130,6 +131,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
break;
|
||||
/* file has been removed on the opposite replica */
|
||||
case CSYNC_INSTRUCTION_NONE:
|
||||
case CSYNC_INSTRUCTION_UPDATE_METADATA:
|
||||
if (cur->has_ignored_files) {
|
||||
/* Do not remove a directory that has ignored files */
|
||||
break;
|
||||
@@ -181,13 +183,8 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
|
||||
if(!other) {
|
||||
cur->instruction = CSYNC_INSTRUCTION_NEW;
|
||||
if (cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||
// For new directories we always want to update the etag once
|
||||
// the directory has been propagated. Otherwise the directory
|
||||
// could appear locally without being added to the database.
|
||||
cur->should_update_metadata = true;
|
||||
}
|
||||
} else if (other->instruction == CSYNC_INSTRUCTION_NONE
|
||||
|| other->instruction == CSYNC_INSTRUCTION_UPDATE_METADATA
|
||||
|| cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||
other->destpath = c_strdup( cur->path );
|
||||
@@ -195,7 +192,6 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
}
|
||||
other->inode = cur->inode;
|
||||
other->should_update_metadata = true;
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else if (other->instruction == CSYNC_INSTRUCTION_REMOVE) {
|
||||
other->instruction = CSYNC_INSTRUCTION_RENAME;
|
||||
@@ -205,12 +201,12 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
csync_vio_set_file_id( other->file_id, cur->file_id );
|
||||
}
|
||||
other->inode = cur->inode;
|
||||
other->should_update_metadata = true;
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else if (other->instruction == CSYNC_INSTRUCTION_NEW) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "OOOO=> NEW detected in other tree!");
|
||||
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
|
||||
} else {
|
||||
assert(other->type != CSYNC_FTW_TYPE_DIR);
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
other->instruction = CSYNC_INSTRUCTION_SYNC;
|
||||
}
|
||||
@@ -222,13 +218,19 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
bool is_equal_files = false;
|
||||
bool is_conflict = true;
|
||||
/*
|
||||
* file found on the other replica
|
||||
*/
|
||||
other = (csync_file_stat_t *) node->data;
|
||||
|
||||
switch (cur->instruction) {
|
||||
case CSYNC_INSTRUCTION_UPDATE_METADATA:
|
||||
if (other->instruction == CSYNC_INSTRUCTION_UPDATE_METADATA && ctx->current == LOCAL_REPLICA) {
|
||||
// Remote wins, the SyncEngine will pick relevant local metadata since the remote tree is walked last.
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
}
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_EVAL_RENAME:
|
||||
/* If the file already exist on the other side, we have a conflict.
|
||||
Abort the rename and consider it is a new file. */
|
||||
@@ -253,42 +255,39 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
case CSYNC_INSTRUCTION_EVAL:
|
||||
if (other->type == CSYNC_FTW_TYPE_DIR &&
|
||||
cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||
is_equal_files = (other->modtime == cur->modtime);
|
||||
// Folders of the same path are always considered equals
|
||||
is_conflict = false;
|
||||
} else {
|
||||
is_equal_files = ((other->size == cur->size) && (other->modtime == cur->modtime));
|
||||
is_conflict = ((other->size != cur->size) || (other->modtime != cur->modtime));
|
||||
// FIXME: do a binary comparision of the file here because of the following
|
||||
// edge case:
|
||||
// The files could still have different content, even though the mtime
|
||||
// and size are the same.
|
||||
}
|
||||
if (is_equal_files) {
|
||||
/* The files are considered equal. */
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
if (ctx->current == REMOTE_REPLICA) {
|
||||
// If the files are considered equal, only update the DB with the etag from remote
|
||||
cur->instruction = is_conflict ? CSYNC_INSTRUCTION_CONFLICT : CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
|
||||
/* update DB with new etag from remote */
|
||||
if (ctx->current == LOCAL_REPLICA) {
|
||||
other->should_update_metadata = true;
|
||||
} else {
|
||||
cur->should_update_metadata = true;
|
||||
}
|
||||
} else if(ctx->current == REMOTE_REPLICA) {
|
||||
cur->instruction = CSYNC_INSTRUCTION_CONFLICT;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else {
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
other->instruction = CSYNC_INSTRUCTION_CONFLICT;
|
||||
cur->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
other->instruction = is_conflict ? CSYNC_INSTRUCTION_CONFLICT : CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
}
|
||||
|
||||
break;
|
||||
/* file on the other replica has not been modified */
|
||||
case CSYNC_INSTRUCTION_NONE:
|
||||
case CSYNC_INSTRUCTION_UPDATE_METADATA:
|
||||
if (cur->type != other->type) {
|
||||
// If the type of the entity changed, it's like NEW, but
|
||||
// needs to delete the other entity first.
|
||||
cur->instruction = CSYNC_INSTRUCTION_TYPE_CHANGE;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else if (cur->type == CSYNC_FTW_TYPE_DIR) {
|
||||
cur->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
} else {
|
||||
cur->instruction = CSYNC_INSTRUCTION_SYNC;
|
||||
other->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
}
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_IGNORE:
|
||||
@@ -310,7 +309,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
if(cur->type == CSYNC_FTW_TYPE_DIR)
|
||||
{
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE,
|
||||
"%-20s %s dir: %s",
|
||||
"%-30s %s dir: %s",
|
||||
csync_instruction_str(cur->instruction),
|
||||
repo,
|
||||
cur->path);
|
||||
@@ -318,7 +317,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
else
|
||||
{
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE,
|
||||
"%-20s %s file: %s",
|
||||
"%-30s %s file: %s",
|
||||
csync_instruction_str(cur->instruction),
|
||||
repo,
|
||||
cur->path);
|
||||
@@ -329,7 +328,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
if(cur->type == CSYNC_FTW_TYPE_DIR)
|
||||
{
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
|
||||
"%-20s %s dir: %s",
|
||||
"%-30s %s dir: %s",
|
||||
csync_instruction_str(cur->instruction),
|
||||
repo,
|
||||
cur->path);
|
||||
@@ -337,7 +336,7 @@ static int _csync_merge_algorithm_visitor(void *obj, void *data) {
|
||||
else
|
||||
{
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG,
|
||||
"%-20s %s file: %s",
|
||||
"%-30s %s file: %s",
|
||||
csync_instruction_str(cur->instruction),
|
||||
repo,
|
||||
cur->path);
|
||||
|
||||
@@ -472,7 +472,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
|
||||
|
||||
if (excluded == CSYNC_FILE_EXCLUDE_AND_REMOVE
|
||||
|| excluded == CSYNC_FILE_SILENTLY_EXCLUDED) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ int csync_statedb_get_below_path( CSYNC *ctx, const char *path ) {
|
||||
|
||||
/* store into result list. */
|
||||
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -269,7 +269,8 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
tmp = csync_statedb_get_stat_by_hash(ctx, h);
|
||||
|
||||
if(_last_db_return_error(ctx)) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
csync_file_stat_free(tmp);
|
||||
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
return -1;
|
||||
}
|
||||
@@ -313,8 +314,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
}
|
||||
if (checksumIdentical) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "NOTE: Checksums are identical, file did not actually change: %s", path);
|
||||
st->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
st->should_update_metadata = true;
|
||||
st->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
@@ -340,23 +340,24 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Reading from database: %s", path);
|
||||
ctx->remote.read_from_db = true;
|
||||
}
|
||||
if (metadata_differ) {
|
||||
/* file id or permissions has changed. Which means we need to update them in the DB. */
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
|
||||
st->should_update_metadata = true;
|
||||
}
|
||||
/* If it was remembered in the db that the remote dir has ignored files, store
|
||||
* that so that the reconciler can make advantage of.
|
||||
*/
|
||||
if( ctx->current == REMOTE_REPLICA ) {
|
||||
st->has_ignored_files = tmp->has_ignored_files;
|
||||
}
|
||||
st->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
if (metadata_differ) {
|
||||
/* file id or permissions has changed. Which means we need to update them in the DB. */
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Need to update metadata for: %s", path);
|
||||
st->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
} else {
|
||||
st->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
}
|
||||
} else {
|
||||
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
|
||||
|
||||
/* tmp might point to malloc mem, so free it here before reusing tmp */
|
||||
SAFE_FREE(tmp);
|
||||
csync_file_stat_free(tmp);
|
||||
|
||||
/* check if it's a file and has been renamed */
|
||||
if (ctx->current == LOCAL_REPLICA) {
|
||||
@@ -365,7 +366,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
tmp = csync_statedb_get_stat_by_inode(ctx, fs->inode);
|
||||
|
||||
if(_last_db_return_error(ctx)) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
return -1;
|
||||
}
|
||||
@@ -421,7 +422,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
tmp = csync_statedb_get_stat_by_file_id(ctx, fs->file_id);
|
||||
|
||||
if(_last_db_return_error(ctx)) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
return -1;
|
||||
}
|
||||
@@ -450,7 +451,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
|
||||
if (fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY && ctx->current == REMOTE_REPLICA && ctx->callbacks.checkSelectiveSyncNewFolderHook) {
|
||||
if (ctx->callbacks.checkSelectiveSyncNewFolderHook(ctx->callbacks.update_callback_userdata, path)) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -460,7 +461,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
}
|
||||
} else {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_DEBUG, "Unable to open statedb" );
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_UNSUCCESSFUL;
|
||||
return -1;
|
||||
}
|
||||
@@ -476,6 +477,8 @@ out:
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_IGNORE_LIST; /* File listed on ignore list. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_INVALID_CHAR) {
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_IS_INVALID_CHARS; /* File contains invalid characters. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_TRAILING_SPACE) {
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_TRAILING_SPACE; /* File ends with a trailing space. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_LONG_FILENAME) {
|
||||
st->error_status = CSYNC_STATUS_INDIVIDUAL_EXCLUDE_LONG_FILENAME; /* File name is too long. */
|
||||
} else if (excluded == CSYNC_FILE_EXCLUDE_HIDDEN ) {
|
||||
@@ -485,7 +488,9 @@ out:
|
||||
}
|
||||
}
|
||||
}
|
||||
if (st->instruction != CSYNC_INSTRUCTION_NONE && st->instruction != CSYNC_INSTRUCTION_IGNORE
|
||||
if (st->instruction != CSYNC_INSTRUCTION_NONE
|
||||
&& st->instruction != CSYNC_INSTRUCTION_IGNORE
|
||||
&& st->instruction != CSYNC_INSTRUCTION_UPDATE_METADATA
|
||||
&& type != CSYNC_FTW_TYPE_DIR) {
|
||||
st->child_modified = 1;
|
||||
}
|
||||
@@ -522,14 +527,14 @@ out:
|
||||
switch (ctx->current) {
|
||||
case LOCAL_REPLICA:
|
||||
if (c_rbtree_insert(ctx->local.tree, (void *) st) < 0) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
||||
return -1;
|
||||
}
|
||||
break;
|
||||
case REMOTE_REPLICA:
|
||||
if (c_rbtree_insert(ctx->remote.tree, (void *) st) < 0) {
|
||||
SAFE_FREE(st);
|
||||
csync_file_stat_free(st);
|
||||
ctx->status_code = CSYNC_STATUS_TREE_ERROR;
|
||||
return -1;
|
||||
}
|
||||
@@ -874,10 +879,11 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
|
||||
if (ctx->current_fs && !ctx->current_fs->child_modified
|
||||
&& ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL) {
|
||||
ctx->current_fs->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
if (ctx->current == REMOTE_REPLICA) {
|
||||
ctx->current_fs->should_update_metadata = true;
|
||||
}
|
||||
if (ctx->current == REMOTE_REPLICA) {
|
||||
ctx->current_fs->instruction = CSYNC_INSTRUCTION_UPDATE_METADATA;
|
||||
} else {
|
||||
ctx->current_fs->instruction = CSYNC_INSTRUCTION_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
if (ctx->current_fs && previous_fs && ctx->current_fs->has_ignored_files) {
|
||||
@@ -891,12 +897,6 @@ int csync_ftw(CSYNC *ctx, const char *uri, csync_walker_fn fn,
|
||||
previous_fs->child_modified = ctx->current_fs->child_modified;
|
||||
}
|
||||
|
||||
if (flag == CSYNC_FTW_FLAG_DIR && ctx->current_fs
|
||||
&& (ctx->current_fs->instruction == CSYNC_INSTRUCTION_EVAL ||
|
||||
ctx->current_fs->instruction == CSYNC_INSTRUCTION_NEW)) {
|
||||
ctx->current_fs->should_update_metadata = true;
|
||||
}
|
||||
|
||||
ctx->current_fs = previous_fs;
|
||||
ctx->remote.read_from_db = read_from_db;
|
||||
SAFE_FREE(filename);
|
||||
|
||||
@@ -56,6 +56,7 @@ static const _instr_code_struct _instr[] =
|
||||
{ "INSTRUCTION_STAT_ERR", CSYNC_INSTRUCTION_STAT_ERROR },
|
||||
{ "INSTRUCTION_ERROR", CSYNC_INSTRUCTION_ERROR },
|
||||
{ "INSTRUCTION_TYPE_CHANGE", CSYNC_INSTRUCTION_TYPE_CHANGE },
|
||||
{ "INSTRUCTION_UPDATE_METADATA", CSYNC_INSTRUCTION_UPDATE_METADATA },
|
||||
{ NULL, CSYNC_INSTRUCTION_ERROR }
|
||||
};
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ void csync_vio_file_stat_destroy(csync_vio_file_stat_t *file_stat) {
|
||||
SAFE_FREE(file_stat->directDownloadUrl);
|
||||
SAFE_FREE(file_stat->directDownloadCookies);
|
||||
SAFE_FREE(file_stat->name);
|
||||
SAFE_FREE(file_stat->original_name);
|
||||
SAFE_FREE(file_stat);
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
|
||||
return file_stat;
|
||||
|
||||
err:
|
||||
SAFE_FREE(file_stat);
|
||||
csync_vio_file_stat_destroy(file_stat);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -167,16 +167,20 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
|
||||
}
|
||||
file_stat->name = c_utf8_from_locale(handle->ffd.cFileName);
|
||||
|
||||
file_stat->flags = CSYNC_VIO_FILE_FLAGS_NONE;
|
||||
file_stat->fields |= CSYNC_VIO_FILE_STAT_FIELDS_TYPE;
|
||||
if ( (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)
|
||||
&& (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SYMLINK)
|
||||
// The SIS or DEDUP flag points to a MS deduplication feature of
|
||||
// certain file storage products. It is not a normal symlink
|
||||
// that should be ignored.
|
||||
&& (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_SIS))
|
||||
&& (! (handle->ffd.dwReserved0 & IO_REPARSE_TAG_DEDUP)) ) {
|
||||
file_stat->flags = CSYNC_VIO_FILE_FLAGS_SYMLINK;
|
||||
file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
|
||||
if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) {
|
||||
// Detect symlinks, and treat junctions as symlinks too.
|
||||
if (handle->ffd.dwReserved0 == IO_REPARSE_TAG_SYMLINK
|
||||
|| handle->ffd.dwReserved0 == IO_REPARSE_TAG_MOUNT_POINT) {
|
||||
file_stat->flags |= CSYNC_VIO_FILE_FLAGS_SYMLINK;
|
||||
file_stat->type = CSYNC_VIO_FILE_TYPE_SYMBOLIC_LINK;
|
||||
} else {
|
||||
// The SIS and DEDUP reparse points should be treated as
|
||||
// regular files. We don't know about the other ones yet,
|
||||
// but will also treat them normally for now.
|
||||
file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
|
||||
}
|
||||
} else if (handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_DEVICE
|
||||
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_OFFLINE
|
||||
|| handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_TEMPORARY) {
|
||||
@@ -187,7 +191,6 @@ csync_vio_file_stat_t *csync_vio_local_readdir(csync_vio_handle_t *dhandle) {
|
||||
file_stat->type = CSYNC_VIO_FILE_TYPE_REGULAR;
|
||||
}
|
||||
|
||||
file_stat->flags = CSYNC_VIO_FILE_FLAGS_NONE;
|
||||
/* Check for the hidden flag */
|
||||
if( handle->ffd.dwFileAttributes & FILE_ATTRIBUTE_HIDDEN ) {
|
||||
file_stat->flags |= CSYNC_VIO_FILE_FLAGS_HIDDEN;
|
||||
|
||||
@@ -30,7 +30,6 @@
|
||||
|
||||
static void setup(void **state) {
|
||||
CSYNC *csync;
|
||||
int rc;
|
||||
|
||||
csync_create(&csync, "/tmp/check_csync1", "/tmp/check_csync2");
|
||||
|
||||
@@ -179,6 +178,20 @@ static void check_csync_excluded(void **state)
|
||||
|
||||
rc = csync_excluded_no_ctx(csync->excludes, "latex/songbook/my_manuscript.tex.tmp", CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_LIST);
|
||||
|
||||
#ifdef _WIN32
|
||||
rc = csync_excluded_no_ctx(csync->excludes, "file_trailing_space ", CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_TRAILING_SPACE);
|
||||
|
||||
rc = csync_excluded_no_ctx(csync->excludes, "file_trailing_dot.", CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
|
||||
|
||||
rc = csync_excluded_no_ctx(csync->excludes, "AUX", CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
|
||||
|
||||
rc = csync_excluded_no_ctx(csync->excludes, "file_invalid_char<", CSYNC_FTW_TYPE_FILE);
|
||||
assert_int_equal(rc, CSYNC_FILE_EXCLUDE_INVALID_CHAR);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void check_csync_excluded_traversal(void **state)
|
||||
@@ -305,13 +318,14 @@ static void check_csync_excluded_performance(void **state)
|
||||
|
||||
const int N = 10000;
|
||||
int totalRc = 0;
|
||||
int i = 0;
|
||||
|
||||
// Being able to use QElapsedTimer for measurement would be nice...
|
||||
{
|
||||
struct timeval before, after;
|
||||
gettimeofday(&before, 0);
|
||||
|
||||
for (int i = 0; i < N; ++i) {
|
||||
for (i = 0; i < N; ++i) {
|
||||
totalRc += csync_excluded_no_ctx(csync->excludes, "/this/is/quite/a/long/path/with/many/components", CSYNC_FTW_TYPE_DIR);
|
||||
totalRc += csync_excluded_no_ctx(csync->excludes, "/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/29", CSYNC_FTW_TYPE_FILE);
|
||||
}
|
||||
@@ -329,7 +343,7 @@ static void check_csync_excluded_performance(void **state)
|
||||
struct timeval before, after;
|
||||
gettimeofday(&before, 0);
|
||||
|
||||
for (int i = 0; i < N; ++i) {
|
||||
for (i = 0; i < N; ++i) {
|
||||
totalRc += csync_excluded_traversal(csync->excludes, "/this/is/quite/a/long/path/with/many/components", CSYNC_FTW_TYPE_DIR);
|
||||
totalRc += csync_excluded_traversal(csync->excludes, "/1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19/20/21/22/23/24/25/26/27/29", CSYNC_FTW_TYPE_FILE);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,6 @@ static void teardown(void **state) {
|
||||
static void check_csync_init(void **state)
|
||||
{
|
||||
CSYNC *csync = *state;
|
||||
int rc;
|
||||
|
||||
csync_init(csync);
|
||||
|
||||
|
||||
@@ -520,7 +520,7 @@ sub put_to_dir( $$;$ )
|
||||
$targetUrl = $optionsRef->{url};
|
||||
}
|
||||
}
|
||||
$d->open($dir);
|
||||
$d->open($targetUrl . $dir);
|
||||
|
||||
my $filename = $file;
|
||||
$filename =~ s/^.*\///;
|
||||
|
||||
@@ -31,6 +31,13 @@ use strict;
|
||||
|
||||
print "Hello, this is t6, a tester for csync with ownCloud.\n";
|
||||
|
||||
# Checking CURL is installed to avoid misleading errors later...
|
||||
system(("curl", "--help", ">", "/dev/null"));
|
||||
if ($? != 0) {
|
||||
print "CURL is needed for this script, aborting with error\n";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
initTesting();
|
||||
|
||||
sub createPostUpdateScript($)
|
||||
|
||||
@@ -64,6 +64,10 @@ csync();
|
||||
assert( -e glob(localDir().'dir/file2_.sys.admin#recall#-*.dat' ) );
|
||||
assert( -e glob(localDir().'dir/file3_.sys.admin#recall#-*.dat' ) );
|
||||
|
||||
# verify that the original files still exist
|
||||
assert( -e glob(localDir().'dir/file2.dat' ) );
|
||||
assert( -e glob(localDir().'dir/file3.dat' ) );
|
||||
|
||||
#Remove the recall file
|
||||
unlink(localDir() . ".sys.admin#recall#");
|
||||
|
||||
|
||||
@@ -159,8 +159,8 @@ In order to make setup simple, you can use the provided Dockerfile to build your
|
||||
1. Assuming you are in the root of the ownCloud Client's source tree, you can
|
||||
build an image from this Dockerfile like this::
|
||||
|
||||
cd admin/win32/docker
|
||||
docker build . -t ownCloud-client-win32:<version>
|
||||
cd admin/win/docker
|
||||
docker build . -t owncloud-client-win32:<version>
|
||||
|
||||
Replace ``<version>`` by the version of the client you are building, e.g.
|
||||
|version| for the release of the client that this document describes.
|
||||
@@ -174,8 +174,8 @@ In order to make setup simple, you can use the provided Dockerfile to build your
|
||||
|
||||
2. From within the source tree Run the docker instance::
|
||||
|
||||
docker run ownCloud-client-win32:<version> -v "$PWD:/home/jenkins/client" \
|
||||
admin/win32/docker/build.sh $(id -u)
|
||||
docker run -v "$PWD:/home/user/client" owncloud-client-win32:<version> \
|
||||
/home/user/client/admin/win/docker/build.sh client/ $(id -u)
|
||||
|
||||
It will run the build, create an NSIS based installer, as well as run tests.
|
||||
You will find the resulting binary in an newly created ``build-win32`` subfolder.
|
||||
|
||||
@@ -41,7 +41,7 @@ master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'ownCloud Client Manual'
|
||||
copyright = u'2013, The ownCloud developers'
|
||||
copyright = u'2013-2016, The ownCloud developers'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
@@ -250,7 +250,7 @@ texinfo_documents = [
|
||||
epub_title = u'ownCloud Client Manual'
|
||||
epub_author = u'The ownCloud developers'
|
||||
epub_publisher = u'The ownCloud developers'
|
||||
epub_copyright = u'2013, The ownCloud developers'
|
||||
epub_copyright = u'2013-2016, The ownCloud developers'
|
||||
|
||||
# The language of the text. It defaults to the language option
|
||||
# or en if the language is not set.
|
||||
|
||||
@@ -7,7 +7,7 @@ On Microsoft Windows systems:
|
||||
``%LOCALAPPDATA%\ownCloud\owncloud.cfg``
|
||||
|
||||
On MAC OS X systems:
|
||||
``$HOME/Library/Application Support/ownCloud``
|
||||
``$HOME/Library/Application Support/ownCloud/owncloud.cfg``
|
||||
|
||||
|
||||
The configuration file contains settings using the Microsoft Windows .ini file
|
||||
|
||||
|
Antes Largura: | Altura: | Tamanho: 86 KiB Depois Largura: | Altura: | Tamanho: 52 KiB |
|
Depois Largura: | Altura: | Tamanho: 82 KiB |
|
Antes Largura: | Altura: | Tamanho: 49 KiB Depois Largura: | Altura: | Tamanho: 58 KiB |
|
Antes Largura: | Altura: | Tamanho: 58 KiB Depois Largura: | Altura: | Tamanho: 224 KiB |
|
Antes Largura: | Altura: | Tamanho: 23 KiB Depois Largura: | Altura: | Tamanho: 20 KiB |
|
Antes Largura: | Altura: | Tamanho: 24 KiB Depois Largura: | Altura: | Tamanho: 34 KiB |
@@ -4,16 +4,16 @@ ownCloud Desktop Client Manual
|
||||
==============================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 3
|
||||
:maxdepth: 2
|
||||
|
||||
introduction
|
||||
installing
|
||||
navigating
|
||||
advancedusage
|
||||
autoupdate
|
||||
|
||||
building
|
||||
architecture
|
||||
troubleshooting
|
||||
faq
|
||||
glossary
|
||||
glossary
|
||||
|
||||
@@ -12,26 +12,22 @@ Desktop Sync client enables you to:
|
||||
Your files are always automatically synchronized between your ownCloud server
|
||||
and local PC.
|
||||
|
||||
.. note:: Because of various technical issues, desktop sync clients older than
|
||||
1.7 will not allowed to connect and sync with the ownCloud 8.1+ server. It
|
||||
is highly recommended to keep your client updated.
|
||||
|
||||
Because of various technical issues, desktop sync clients older than 1.7 will
|
||||
not allowed to connect and sync with the ownCloud 8.1+ server. It is highly
|
||||
recommended to keep your client updated.
|
||||
|
||||
Improvements and New Features
|
||||
-----------------------------
|
||||
|
||||
The 2.1 release of the ownCloud desktop sync client has many new features and
|
||||
The 2.2 release of the ownCloud desktop sync client has many new features and
|
||||
improvements. (See the `complete changelog
|
||||
<https://owncloud.org/changelog/desktop/>`_.)
|
||||
|
||||
* Improved appearance on HiDPI screens
|
||||
* Improved error messages
|
||||
* Several fixes/improvements to the sharing dialog
|
||||
* Several fixes/improvements to the server activity tab
|
||||
* Allow changeable upload chunk size in owncloud.cfg
|
||||
* Forget password on explicit sign-out
|
||||
* Windows: Fix deleting and replacing of read-only files
|
||||
* Share with internal ownCloud users from your desktop
|
||||
* Separate views for server activity, sync activity, and errors
|
||||
* Don't re-upload *eml-files if size and checksum are unchanged
|
||||
* Improved upload/download progress indicator
|
||||
* Show server notifications on the client
|
||||
* Improved sync speed
|
||||
* Improved handling of Win32 file locks and network files
|
||||
* Improved user notifications about ignored files and conflicts
|
||||
* Add warnings for old server versions
|
||||
* Update of QtKeyChain to support Windows credential store
|
||||
* Packaging of dolphin overlay icon module for bleeding edge distros
|
||||
|
||||
@@ -62,6 +62,7 @@ This menu provides the following options:
|
||||
* Recent Changes, showing latest activities
|
||||
* Settings
|
||||
* Help menu
|
||||
* Pause synchronizations
|
||||
* An option to log in or log out of all of your accounts at once
|
||||
* Quit ownCloud, logging out and closing the client
|
||||
|
||||
@@ -83,7 +84,7 @@ have the following features:
|
||||
* Connection status, showing which ownCloud server you are connected to, and
|
||||
your ownCloud username.
|
||||
* An **Account** button, which contains a dropdown menu with **Add New**,
|
||||
**Log In/Log Out**, and **Remove**.
|
||||
**Log Out**, and **Remove**.
|
||||
* Used and available space on the server.
|
||||
* Current synchronization status.
|
||||
* **Add Folder Sync Connection** button, which is active only when you have
|
||||
@@ -93,26 +94,17 @@ The little button with three dots (the overflow menu) that sits to the right of
|
||||
the sync status bar offers four additional options:
|
||||
|
||||
* Open Folder
|
||||
* Choose What to Sync
|
||||
* Choose What to Sync (This appears only when your file tree is collapsed, and
|
||||
expands the file tree)
|
||||
* Pause Sync / Resume Sync
|
||||
* Remove folder sync connection
|
||||
|
||||
**Open Folder** opens a file explorer window displaying the client-side folder
|
||||
that is being synced.
|
||||
|
||||
**Choose What to Sync** opens the folder sync tree view. Use this to sync all
|
||||
or only some of the folders in the folder tree.
|
||||
**Open Folder** opens your local ownCloud sync folder.
|
||||
|
||||
**Pause Sync** pauses sync operations without making any changes to your
|
||||
account. It will continue to update file and folder lists, without
|
||||
downloading or updating files. To stop all sync activity use **Remove Sync**.
|
||||
|
||||
**Resume Sync** resumes sync operations.
|
||||
|
||||
**Remove Sync** removes the sync connection without removing the account. This
|
||||
stops all sync activity, including file and folder list updates. If you want to
|
||||
synchronize the folder tree again then click the **Add Folder Sync Connection**
|
||||
button, and re-select the folder tree that you want to sync.
|
||||
downloading or updating files. To stop all sync activity use **Remove
|
||||
Folder Sync Connection**.
|
||||
|
||||
.. figure:: images/client-7.png
|
||||
:alt: Extra options for sync operations
|
||||
@@ -125,12 +117,10 @@ button, and re-select the folder tree that you want to sync.
|
||||
Adding New Accounts
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
You may configure multiple ownCloud accounts in your desktop sync client.
|
||||
Simply
|
||||
You may configure multiple ownCloud accounts in your desktop sync client. Simply
|
||||
click the **Account** > **Add New** button on any account tab to add a new
|
||||
account, and then follow the account creation wizard. The new account will
|
||||
appear as a new tab in the settings dialog, where you can adjust its settings
|
||||
at
|
||||
appear as a new tab in the settings dialog, where you can adjust its settings at
|
||||
any time. Use **Account** > **Remove** to delete accounts.
|
||||
|
||||
File Manager Overlay Icons
|
||||
@@ -175,9 +165,7 @@ the ``owncloud-client-nautilus`` plugin.) You can create share links, and share
|
||||
with internal ownCloud users the same way as in your ownCloud Web interface.
|
||||
|
||||
.. figure:: images/mac-share.png
|
||||
:alt: Sync client integration in Finder on Mac OS X.
|
||||
|
||||
*Shared ownCloud files in Finder on Mac OS X*
|
||||
:alt: Sync client integration in Windows Explorer.
|
||||
|
||||
Right-click your systray icon, hover over the account you want to use, and
|
||||
left-click "Open folder [folder name] to quickly enter your local ownCloud
|
||||
@@ -206,6 +194,25 @@ such as files not synced.
|
||||
|
||||
.. figure:: images/client-8.png
|
||||
:alt: Activity windows logs all server and client activities.
|
||||
|
||||
Server Notifications
|
||||
--------------------
|
||||
|
||||
Starting with version 2.2.0, the client will display notifications from your
|
||||
ownCloud server that require manual interaction by you. For example, when a
|
||||
user on a remote ownCloud creates a new Federated share for you, you can accept
|
||||
it from your desktop client.
|
||||
|
||||
The desktop client automatically checks for available notifications
|
||||
automatically on a regular basis. Notifications are displayed in the Server
|
||||
Activity tab, and if you have **Show Desktop Notifications** enabled (General
|
||||
tab) you'll also see a systray notification.
|
||||
|
||||
.. figure:: images/client12.png
|
||||
:alt: Activity window with notification.
|
||||
|
||||
This also displays notifications sent to users by the ownCloud admin via the
|
||||
Announcements app.
|
||||
|
||||
General Window
|
||||
--------------
|
||||
|
||||
@@ -1,3 +1,11 @@
|
||||
<!---
|
||||
Please try to only report a bug if it happens with the latest version
|
||||
The latest version can be seen by checking the ChangeLog: https://owncloud.org/changelog/desktop/
|
||||
|
||||
For support try: https://central.owncloud.org/c/help/desktop-file-sync
|
||||
--->
|
||||
|
||||
|
||||
### Expected behaviour
|
||||
Tell us what should happen
|
||||
|
||||
@@ -20,7 +28,7 @@ PHP version:
|
||||
|
||||
ownCloud version:
|
||||
|
||||
Storage backend:
|
||||
Storage backend (external storage):
|
||||
|
||||
### Client configuration
|
||||
Client version:
|
||||
@@ -38,11 +46,11 @@ logs.
|
||||
|
||||
```Template for output < 10 lines```
|
||||
|
||||
1. Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
|
||||
1. Client logfile: Output of `owncloud --logwindow` or `owncloud --logfile log.txt`
|
||||
(On Windows using `cmd.exe`, you might need to first `cd` into the ownCloud directory)
|
||||
(See also http://doc.owncloud.org/desktop/1.8/troubleshooting.html#client-logfile )
|
||||
(See also http://doc.owncloud.org/desktop/2.2/troubleshooting.html#client-logfile )
|
||||
|
||||
2. Web server error log:
|
||||
|
||||
3. ownCloud log (data/owncloud.log):
|
||||
3. Server logfile: ownCloud log (data/owncloud.log):
|
||||
|
||||
|
||||
@@ -11,11 +11,436 @@ X-GNOME-Autostart-Delay=3
|
||||
|
||||
|
||||
# Translations
|
||||
Comment[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
GenericName[sq]=Njëkohësim Dosjesh
|
||||
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
Icon[sq]=@APPLICATION_EXECUTABLE@
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
Name[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
Icon[oc]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
|
||||
GenericName[ar]=مزامنة المجلد
|
||||
Name[ar]=@APPLICATION_NAME@ زبون مزامنة مكتبي
|
||||
Icon[ar]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
|
||||
GenericName[ca]=Sincronització de carpetes
|
||||
Name[ca]=Client de sincronització d'escriptori @APPLICATION_NAME@
|
||||
Icon[ca]=@APPLICATION_EXECUTABLE@
|
||||
Comment[da]=@APPLICATION_NAME@ skrivebordsklient til synkronisering
|
||||
GenericName[da]=Mappesynkronisering
|
||||
Name[da]=@APPLICATION_NAME@ skrivebordsklient til synk
|
||||
Icon[da]=@APPLICATION_EXECUTABLE@
|
||||
Comment[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de]=Ordner-Synchronisation
|
||||
Name[de]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
Icon[de]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
|
||||
GenericName[ja_JP]=フォルダー同期
|
||||
Name[ja_JP]=@APPLICATION_NAME@ デスクトップ同期クライアント
|
||||
Icon[ja_JP]=@APPLICATION_EXECUTABLE@
|
||||
GenericName[el]=Συγχρονισμός φακέλου
|
||||
Icon[el]=@APPLICATION_EXECUTABLE@
|
||||
Comment[en_GB]=@APPLICATION_NAME@ desktop synchronisation client
|
||||
GenericName[en_GB]=Folder Sync
|
||||
Name[en_GB]=@APPLICATION_NAME@ desktop sync client
|
||||
Icon[en_GB]=@APPLICATION_EXECUTABLE@
|
||||
Comment[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
|
||||
GenericName[es]=Sincronización de carpeta
|
||||
Name[es]=@APPLICATION_NAME@ cliente de sincronización de escritorio
|
||||
Icon[es]=@APPLICATION_EXECUTABLE@
|
||||
Comment[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
GenericName[de_DE]=Ordner-Synchronisation
|
||||
Name[de_DE]=@APPLICATION_NAME@ Desktop-Synchronisationsclient
|
||||
Icon[de_DE]=@APPLICATION_EXECUTABLE@
|
||||
Comment[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
|
||||
GenericName[pl]=Folder Synchronizacji
|
||||
Name[pl]=@APPLICATION_NAME@ klient synchronizacji dla komputerów stacjonarnych
|
||||
Icon[pl]=@APPLICATION_EXECUTABLE@
|
||||
Comment[fr]=@APPLICATION_NAME@ synchronisation du client
|
||||
GenericName[fr]=Dossier de Synchronisation
|
||||
Name[fr]=@APPLICATION_NAME@ synchronisation du client
|
||||
Icon[fr]=@APPLICATION_EXECUTABLE@
|
||||
Comment[he]=@APPLICATION_NAME@ לקוח סנכון שולחן עבודה
|
||||
GenericName[he]=סנכון תיקייה
|
||||
Name[he]=@APPLICATION_NAME@ לקוח סנכרון שולחן עבודה
|
||||
Icon[he]=@APPLICATION_EXECUTABLE@
|
||||
Comment[id]=Klien sinkronisasi desktop @APPLICATION_NAME@
|
||||
GenericName[id]=Folder Sync
|
||||
Name[id]=Klien sync desktop @APPLICATION_NAME@
|
||||
Icon[id]=@APPLICATION_EXECUTABLE@
|
||||
Comment[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
|
||||
GenericName[is]=Samstilling möppu
|
||||
Name[is]=@APPLICATION_NAME@ skjáborðsforrit samstillingar
|
||||
Icon[is]=@APPLICATION_EXECUTABLE@
|
||||
Comment[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
|
||||
GenericName[it]=Sincronizzazione cartella
|
||||
Name[it]=Client di sincronizzazione del desktop di @APPLICATION_NAME@
|
||||
Icon[it]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
GenericName[ko]=폴더 동기화
|
||||
Name[ko]=@APPLICATION_NAME@ 데스크톱 동기화 클라이언트
|
||||
Comment[hu_HU]=@APPLICATION_NAME@ asztali szinkronizációs kliens
|
||||
GenericName[hu_HU]=Könyvtár szinkronizálás
|
||||
Name[hu_HU]=@APPLICATION_NAME@ asztali szinkr. kliens
|
||||
Icon[hu_HU]=@APPLICATION_EXECUTABLE@
|
||||
Comment[nl]=@APPLICATION_NAME@ desktop synchronisatie client
|
||||
GenericName[nl]=Mappen sync
|
||||
Name[nl]=@APPLICATION_NAME@ desktop sync client
|
||||
Icon[nl]=@APPLICATION_EXECUTABLE@
|
||||
Comment[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
|
||||
GenericName[et_EE]=Kaustade sünkroonimine
|
||||
Name[et_EE]=@APPLICATION_NAME@ sünkroonimise klient töölauale
|
||||
Icon[et_EE]=@APPLICATION_EXECUTABLE@
|
||||
Comment[bg_BG]=@APPLICATION_NAME@ клиент за десктоп синхронизация
|
||||
GenericName[bg_BG]=Синхронизиране на папката
|
||||
Name[bg_BG]=@APPLICATION_NAME@ клиент десктоп синхронизация
|
||||
Icon[bg_BG]=@APPLICATION_EXECUTABLE@
|
||||
Comment[pt_BR]=@APPLICATION_NAME@ cliente de sincronização do computador
|
||||
GenericName[pt_BR]=Sincronização de Pasta
|
||||
Name[pt_BR]=@APPLICATION_NAME@ cliente de sincronização de desktop
|
||||
Icon[pt_BR]=@APPLICATION_EXECUTABLE@
|
||||
Comment[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
|
||||
GenericName[cs_CZ]=Synchronizace adresáře
|
||||
Name[cs_CZ]=@APPLICATION_NAME@ počítačový synchronizační klient
|
||||
Icon[cs_CZ]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ru]=Настольный клиент синхронизации @НАЗВАНИЕ_ПРИЛОЖЕНИЯ@
|
||||
GenericName[ru]=Синхронизация папки
|
||||
Name[ru]=Настольный клиент синхронизации @НАЗВАНИЕ_ПРИЛОЖЕНИЯ@
|
||||
Icon[ru]=@ВЫПОЛНЯЕМОЕ_ПРИЛОЖЕНИЕ@
|
||||
Comment[sl]=@APPLICATION_NAME@ ‒ Program za usklajevanje datotek z namizjem
|
||||
GenericName[sl]=Usklajevanje map
|
||||
Name[sl]=@APPLICATION_NAME@ ‒ Program za usklajevanje datotek z namizjem
|
||||
Icon[sl]=@APPLICATION_EXECUTABLE@
|
||||
Comment[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
GenericName[sq]=Njëkohësim Dosjesh
|
||||
Name[sq]=Klient njëkohësimesh @APPLICATION_NAME@ për desktop
|
||||
Icon[sq]=@APPLICATION_EXECUTABLE@
|
||||
Comment[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
|
||||
GenericName[fi_FI]=Kansion synkronointi
|
||||
Name[fi_FI]=@APPLICATION_NAME@ työpöytäsynkronointisovellus
|
||||
Icon[fi_FI]=@APPLICATION_EXECUTABLE@
|
||||
Comment[sv]=@APPLICATION_NAME@ desktop synkroniseringsklient
|
||||
GenericName[sv]=Mappsynk
|
||||
Name[sv]=@APPLICATION_NAME@ desktop synk-klient
|
||||
Icon[sv]=@APPLICATION_EXECUTABLE@
|
||||
Comment[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
|
||||
GenericName[tr]=Dosya Eşitleme
|
||||
Name[tr]=@APPLICATION_NAME@ masaüstü eşitleme istemcisi
|
||||
Icon[tr]=@APPLICATION_EXECUTABLE@
|
||||
Comment[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
|
||||
GenericName[uk]=Синхронізація теки
|
||||
Name[uk]=Настільний клієнт синхронізації @APPLICATION_NAME@
|
||||
Icon[uk]=@APPLICATION_EXECUTABLE@
|
||||
Comment[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
|
||||
GenericName[ro]=Sincronizare director
|
||||
Name[ro]=@APPLICATION_NAME@ client de sincronizare pe desktop
|
||||
Icon[ro]=@APPLICATION_EXECUTABLE@
|
||||
Comment[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
|
||||
GenericName[zh_CN]=文件夹同步
|
||||
Name[zh_CN]=@APPLICATION_NAME@ 桌面同步客户端
|
||||
Icon[zh_CN]=@APPLICATION_EXECUTABLE@
|
||||
GenericName[zh_TW]=資料夾同步
|
||||
Comment[lt_LT]=@APPLICATION_NAME@ darbalaukio sinchronizavimo programa
|
||||
GenericName[lt_LT]=Katalogo sinchnorizacija
|
||||
Name[lt_LT]=@APPLICATION_NAME@ darbalaukio programa
|
||||
Icon[lt_LT]=@APPLICATION_EXECUTABLE@
|
||||
Comment[th_TH]=@APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
|
||||
GenericName[th_TH]=ประสานข้อมูลโฟลเดอร์
|
||||
Name[th_TH]= @APPLICATION_NAME@ ไคลเอนต์ประสานข้อมูลเดสก์ท็อป
|
||||
Icon[th_TH]=@APPLICATION_EXECUTABLE@
|
||||
Comment[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
|
||||
GenericName[nb_NO]=Mappesynkronisering
|
||||
Name[nb_NO]=@APPLICATION_NAME@ skrivebordssynkroniseringsklient
|
||||
Icon[nb_NO]=@APPLICATION_EXECUTABLE@
|
||||
Comment[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
|
||||
GenericName[nn_NO]=Mappe synkronisering
|
||||
Name[nn_NO]=@APPLICATION_NAME@ klient for å synkronisera frå skrivebord
|
||||
Icon[nn_NO]=@APPLICATION_EXECUTABLE@
|
||||
Comment[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
|
||||
GenericName[pt_PT]=Sincronizar Pasta
|
||||
Name[pt_PT]=@APPLICATION_NAME@ - Cliente de Sincronização para PC
|
||||
Icon[pt_PT]=@APPLICATION_EXECUTABLE@
|
||||
Icon[km]=@APPLICATION_EXECUTABLE@
|
||||
Comment[lb]=@APPLICATION_NAME@ Desktop Synchronisatioun Client
|
||||
GenericName[lb]=Dossier Dync
|
||||
Name[lb]=@APPLICATION_NAME@ Desktop Sync Client
|
||||
Icon[lb]=@APPLICATION_EXECUTABLE@
|
||||
|
||||
@@ -36,8 +36,7 @@ using namespace std;
|
||||
|
||||
OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
{
|
||||
auto pipename = std::wstring(L"\\\\.\\pipe\\");
|
||||
pipename += L"ownCloud";
|
||||
auto pipename = CommunicationSocket::DefaultPipePath();
|
||||
|
||||
CommunicationSocket socket;
|
||||
if (!WaitNamedPipe(pipename.data(), PIPE_TIMEOUT)) {
|
||||
@@ -72,8 +71,7 @@ OCClientInterface::ContextMenuInfo OCClientInterface::FetchInfo()
|
||||
|
||||
void OCClientInterface::ShareObject(const std::wstring &path)
|
||||
{
|
||||
auto pipename = std::wstring(L"\\\\.\\pipe\\");
|
||||
pipename += L"ownCloud";
|
||||
auto pipename = CommunicationSocket::DefaultPipePath();
|
||||
|
||||
CommunicationSocket socket;
|
||||
if (!WaitNamedPipe(pipename.data(), PIPE_TIMEOUT)) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2015 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2015 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
@@ -12,7 +12,7 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
|
||||
@@ -59,22 +59,22 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x86</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
</PropertyGroup>
|
||||
@@ -89,10 +89,13 @@
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x86.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@@ -108,14 +111,17 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x86.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
|
||||
<AdditionalDependencies>OCUtil_x64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
@@ -127,6 +133,9 @@
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PrecompiledHeader />
|
||||
</ClCompile>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -134,12 +143,15 @@
|
||||
<PreprocessorDefinitions>NDEBUG;_USING_V110_SDK71_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x64.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCContextMenu.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="ReadMe.txt" />
|
||||
|
||||
@@ -110,17 +110,17 @@ IFACEMETHODIMP OCOverlay::GetPriority(int *pPriority)
|
||||
// we order this in terms of likelyhood
|
||||
switch (_state) {
|
||||
case State_OK:
|
||||
*pPriority = 0;
|
||||
*pPriority = 0; break;
|
||||
case State_OKShared:
|
||||
*pPriority = 1;
|
||||
*pPriority = 1; break;
|
||||
case State_Warning:
|
||||
*pPriority = 2;
|
||||
*pPriority = 2; break;
|
||||
case State_Sync:
|
||||
*pPriority = 3;
|
||||
*pPriority = 3; break;
|
||||
case State_Error:
|
||||
*pPriority = 4;
|
||||
*pPriority = 4; break;
|
||||
default:
|
||||
*pPriority = 5;
|
||||
*pPriority = 5; break;
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
|
||||
@@ -66,25 +66,25 @@
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x86</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x86</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
<TargetExt>.dll</TargetExt>
|
||||
@@ -99,11 +99,14 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
@@ -114,11 +117,14 @@
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
@@ -133,11 +139,14 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x86.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
@@ -152,11 +161,14 @@
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<AdditionalLibraryDirectories>..\$(Configuration)\$(Platform);</AdditionalLibraryDirectories>
|
||||
<AdditionalLibraryDirectories>$(OutDir)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>OCUtil_x64.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
||||
<ModuleDefinitionFile>OCOverlays.def</ModuleDefinitionFile>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>..\OCUtil</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="DllMain.cpp" />
|
||||
|
||||
@@ -24,11 +24,31 @@
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#define BUFSIZE 1024
|
||||
#define DEFAULT_BUFLEN 4096
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define DEFAULT_BUFLEN 4096
|
||||
namespace {
|
||||
|
||||
std::wstring getUserName() {
|
||||
DWORD len = DEFAULT_BUFLEN;
|
||||
TCHAR buf[DEFAULT_BUFLEN];
|
||||
if (GetUserName(buf, &len)) {
|
||||
return std::wstring(&buf[0], len);
|
||||
} else {
|
||||
return std::wstring();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
std::wstring CommunicationSocket::DefaultPipePath()
|
||||
{
|
||||
auto pipename = std::wstring(L"\\\\.\\pipe\\");
|
||||
pipename += L"ownCloud-";
|
||||
pipename += getUserName();
|
||||
return pipename;
|
||||
}
|
||||
|
||||
CommunicationSocket::CommunicationSocket()
|
||||
: _pipe(INVALID_HANDLE_VALUE)
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
class __declspec(dllexport) CommunicationSocket
|
||||
{
|
||||
public:
|
||||
static std::wstring DefaultPipePath();
|
||||
|
||||
CommunicationSocket();
|
||||
~CommunicationSocket();
|
||||
|
||||
@@ -43,4 +45,4 @@ private:
|
||||
bool _connected;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -67,26 +67,26 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x86</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<TargetName>$(ProjectName)_x64</TargetName>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<TargetExt>.dll</TargetExt>
|
||||
<TargetName>$(ProjectName)_x86</TargetName>
|
||||
<IntDir>$(Configuration)\$(Platform)\</IntDir>
|
||||
<OutDir>$(SolutionDir)$(Configuration)\$(Platform)\</OutDir>
|
||||
<OutDir>$(SolutionDir)..\..\binary\shell_integration\windows\$(Configuration)\$(Platform)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
@@ -155,6 +155,7 @@
|
||||
<ClInclude Include="CommunicationSocket.h" />
|
||||
<ClInclude Include="FileUtil.h" />
|
||||
<ClInclude Include="RegistryUtil.h" />
|
||||
<ClInclude Include="Version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="CommunicationSocket.cpp" />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
@@ -31,25 +31,10 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define BUFSIZE 512
|
||||
|
||||
std::wstring getUserName() {
|
||||
DWORD len = BUFSIZE;
|
||||
TCHAR buf[BUFSIZE];
|
||||
if (GetUserName(buf, &len)) {
|
||||
return std::wstring(&buf[0], len);
|
||||
} else {
|
||||
return std::wstring();
|
||||
}
|
||||
}
|
||||
|
||||
// This code is run in a thread
|
||||
void RemotePathChecker::workerThreadLoop()
|
||||
{
|
||||
auto pipename = std::wstring(L"\\\\.\\pipe\\");
|
||||
pipename += L"ownCloud\\";
|
||||
pipename += getUserName();
|
||||
|
||||
auto pipename = CommunicationSocket::DefaultPipePath();
|
||||
bool connected = false;
|
||||
CommunicationSocket socket;
|
||||
std::unordered_set<std::wstring> asked;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright (c) 2014 ownCloud, Inc. All rights reserved.
|
||||
* Copyright (c) 2014 ownCloud GmbH. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
// This is the number that will end up in the version window of the DLLs.
|
||||
// Increment this version before committing a new build if you are today's shell_integration build master.
|
||||
#define OCEXT_BUILD_NUM 43
|
||||
|
||||
#define STRINGIZE2(s) #s
|
||||
#define STRINGIZE(s) STRINGIZE2(s)
|
||||
|
||||
#define OCEXT_VERSION 1,0,0,OCEXT_BUILD_NUM
|
||||
#define OCEXT_VERSION_STRING STRINGIZE(OCEXT_VERSION)
|
||||
@@ -28,16 +28,12 @@
|
||||
* \return string PEM
|
||||
*/
|
||||
string x509ToString(BIO *o) {
|
||||
int len = 0;
|
||||
BUF_MEM *bptr;
|
||||
void* data;
|
||||
string ret = "";
|
||||
|
||||
BIO_get_mem_ptr(o, &bptr);
|
||||
len = bptr->length;
|
||||
data = calloc(len+10, sizeof(char));
|
||||
int len = bptr->length;
|
||||
void* data = calloc(len+10, sizeof(char));
|
||||
BIO_read(o, data, len);
|
||||
ret = strdup((char*)data);
|
||||
string ret = std::string(static_cast<char*>(data));
|
||||
free(data);
|
||||
|
||||
return ret;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <QFile>
|
||||
#include <QFileInfo>
|
||||
#include <qdebug.h>
|
||||
|
||||
#include "account.h"
|
||||
@@ -196,10 +197,12 @@ void parseOptions( const QStringList& app_args, CmdOptions *options )
|
||||
if (!options->source_dir.endsWith('/')) {
|
||||
options->source_dir.append('/');
|
||||
}
|
||||
if( !QFile::exists( options->source_dir )) {
|
||||
QFileInfo fi(options->source_dir);
|
||||
if( !fi.exists() ) {
|
||||
std::cerr << "Source dir '" << qPrintable(options->source_dir) << "' does not exist." << std::endl;
|
||||
exit(1);
|
||||
}
|
||||
options->source_dir = fi.absoluteFilePath();
|
||||
|
||||
QStringListIterator it(args);
|
||||
// skip file name;
|
||||
@@ -272,6 +275,12 @@ void selectiveSyncFixup(OCC::SyncJournalDb *journal, const QStringList &newList)
|
||||
int main(int argc, char **argv) {
|
||||
QCoreApplication app(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Ensure OpenSSL config file is only loaded from app directory
|
||||
QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
|
||||
qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
|
||||
#endif
|
||||
|
||||
qsrand(QTime::currentTime().msec() * QCoreApplication::applicationPid());
|
||||
|
||||
CmdOptions options;
|
||||
@@ -443,16 +452,27 @@ restart_sync:
|
||||
QObject::connect(&engine, SIGNAL(finished(bool)), &app, SLOT(quit()));
|
||||
QObject::connect(&engine, SIGNAL(transmissionProgress(ProgressInfo)), &cmd, SLOT(transmissionProgressSlot()));
|
||||
|
||||
|
||||
// Exclude lists
|
||||
engine.excludedFiles().addExcludeFilePath(ConfigFile::excludeFileFromSystem());
|
||||
if( QFile::exists(options.exclude) )
|
||||
|
||||
bool hasUserExcludeFile = !options.exclude.isEmpty();
|
||||
QString systemExcludeFile = ConfigFile::excludeFileFromSystem();
|
||||
|
||||
// Always try to load the user-provided exclude list if one is specified
|
||||
if ( hasUserExcludeFile ) {
|
||||
engine.excludedFiles().addExcludeFilePath(options.exclude);
|
||||
}
|
||||
// Load the system list if available, or if there's no user-provided list
|
||||
if ( !hasUserExcludeFile || QFile::exists(systemExcludeFile) ) {
|
||||
engine.excludedFiles().addExcludeFilePath(systemExcludeFile);
|
||||
}
|
||||
|
||||
if (!engine.excludedFiles().reloadExcludes()) {
|
||||
// Always make sure at least one list has been loaded
|
||||
qFatal("Cannot load system exclude list or list supplied via --exclude");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
// Have to be done async, else, an error before exec() does not terminate the event loop.
|
||||
QMetaObject::invokeMethod(&engine, "startSync", Qt::QueuedConnection);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ qt_wrap_ui(client_UI_SRCS ${client_UI})
|
||||
set(client_SRCS
|
||||
accountmanager.cpp
|
||||
accountsettings.cpp
|
||||
ocapplication.cpp
|
||||
application.cpp
|
||||
folder.cpp
|
||||
folderman.cpp
|
||||
folderstatusmodel.cpp
|
||||
@@ -68,6 +68,7 @@ set(client_SRCS
|
||||
activitylistmodel.cpp
|
||||
activitywidget.cpp
|
||||
activityitemdelegate.cpp
|
||||
activityfetcher.cpp
|
||||
selectivesyncdialog.cpp
|
||||
settingsdialog.cpp
|
||||
share.cpp
|
||||
@@ -212,10 +213,6 @@ if(QTKEYCHAIN_FOUND OR QT5KEYCHAIN_FOUND)
|
||||
list(APPEND libsync_LINK_TARGETS ${QTKEYCHAIN_LIBRARY})
|
||||
include_directories(${QTKEYCHAIN_INCLUDE_DIR})
|
||||
endif()
|
||||
if(LibsnoreQt5_FOUND)
|
||||
add_definitions(-DHAVE_LIBSNORE)
|
||||
|
||||
endif()
|
||||
|
||||
# add executable icon on windows and osx
|
||||
include( AddAppIconMacro )
|
||||
@@ -293,7 +290,6 @@ target_link_libraries( ${APPLICATION_EXECUTABLE} ${QT_LIBRARIES} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${synclib_NAME} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} updater )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} ${OS_SPECIFIC_LINK_LIBRARIES} )
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} Snore::Libsnore Snore::LibsnoreSettings )
|
||||
|
||||
if(WITH_CRASHREPORTER)
|
||||
target_link_libraries( ${APPLICATION_EXECUTABLE} crashreporter-handler)
|
||||
|
||||
@@ -213,14 +213,12 @@ AccountPtr AccountManager::loadAccountHelper(QSettings& settings)
|
||||
|
||||
QString authType = settings.value(QLatin1String(authTypeC)).toString();
|
||||
QString overrideUrl = Theme::instance()->overrideServerUrl();
|
||||
if( !overrideUrl.isEmpty() ) {
|
||||
// if there is a overrideUrl, don't even bother reading from the config as all the accounts
|
||||
// must use the overrideUrl
|
||||
QString forceAuth = Theme::instance()->forceConfigAuthType();
|
||||
if(!forceAuth.isEmpty() && !overrideUrl.isEmpty() ) {
|
||||
// If forceAuth is set, this might also mean the overrideURL has changed.
|
||||
// See enterprise issues #1126
|
||||
acc->setUrl(overrideUrl);
|
||||
auto forceAuth = Theme::instance()->forceConfigAuthType();
|
||||
if (!forceAuth.isEmpty()) {
|
||||
authType = forceAuth;
|
||||
}
|
||||
authType = forceAuth;
|
||||
} else {
|
||||
acc->setUrl(settings.value(QLatin1String(urlC)).toUrl());
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "folderstatusmodel.h"
|
||||
#include "folderstatusdelegate.h"
|
||||
#include "utility.h"
|
||||
#include "ocapplication.h"
|
||||
#include "application.h"
|
||||
#include "configfile.h"
|
||||
#include "account.h"
|
||||
#include "accountstate.h"
|
||||
@@ -159,7 +159,13 @@ void AccountSettings::createAccountToolbox()
|
||||
|
||||
void AccountSettings::slotOpenAccountWizard()
|
||||
{
|
||||
if (QSystemTrayIcon::isSystemTrayAvailable()) {
|
||||
if (
|
||||
#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
|
||||
qgetenv("QT_QPA_PLATFORMTHEME") == "appmenu-qt5" ||
|
||||
// We can't call isSystemTrayAvailable with appmenu-qt5 because it breaks the systemtray
|
||||
// (issue #4693, #4944)
|
||||
#endif
|
||||
QSystemTrayIcon::isSystemTrayAvailable()) {
|
||||
topLevelWidget()->close();
|
||||
}
|
||||
#ifdef Q_OS_MAC
|
||||
|
||||
@@ -190,7 +190,8 @@ void AccountState::checkConnectivity()
|
||||
} else {
|
||||
// Check the server and then the auth.
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Let's try this for all OS and see if it fixes the Qt issues we have on Linux #4720 #3888 #4051
|
||||
//#ifdef Q_OS_WIN
|
||||
// There seems to be a bug in Qt on Windows where QNAM sometimes stops
|
||||
// working correctly after the computer woke up from sleep. See #2895 #2899
|
||||
// and #2973.
|
||||
@@ -201,7 +202,7 @@ void AccountState::checkConnectivity()
|
||||
// If we don't reset the ssl config a second CheckServerJob can produce a
|
||||
// ssl config that does not have a sensible certificate chain.
|
||||
account()->setSslConfiguration(QSslConfiguration());
|
||||
#endif
|
||||
//#endif
|
||||
conValidator->checkServerAndAuth();
|
||||
}
|
||||
}
|
||||
@@ -209,6 +210,7 @@ void AccountState::checkConnectivity()
|
||||
void AccountState::slotConnectionValidatorResult(ConnectionValidator::Status status, const QStringList& errors)
|
||||
{
|
||||
if (isSignedOut()) {
|
||||
qDebug() << "Signed out, ignoring" << connectionStatusString(status) << _account->url().toString();
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,10 +15,45 @@
|
||||
|
||||
#include "activitydata.h"
|
||||
|
||||
|
||||
namespace OCC
|
||||
{
|
||||
|
||||
ActivityFile::ActivityFile()
|
||||
:_type(Unknown)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ActivityFile::ActivityFile( const QString& file )
|
||||
:_relFileName(file),
|
||||
_type(File)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ActivityFile::setType( FileType type )
|
||||
{
|
||||
_type = type;
|
||||
}
|
||||
|
||||
QString ActivityFile::relativePath() const
|
||||
{
|
||||
return _relFileName;
|
||||
}
|
||||
|
||||
QString ActivityFile::fullPath( const QString _accountName ) const
|
||||
{
|
||||
QString fullPath(_relFileName);
|
||||
// FIXME: get the account and prepend the base path.
|
||||
|
||||
if( _type == Directory && !fullPath.endsWith('/')) {
|
||||
fullPath.append('/');
|
||||
}
|
||||
return fullPath;
|
||||
}
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
bool operator<( const Activity& rhs, const Activity& lhs ) {
|
||||
return rhs._dateTime.toMSecsSinceEpoch() > lhs._dateTime.toMSecsSinceEpoch();
|
||||
}
|
||||
@@ -31,5 +66,39 @@ Activity::Identifier Activity::ident() const {
|
||||
return Identifier( _id, _accName );
|
||||
}
|
||||
|
||||
void Activity::addFile( const QString& file )
|
||||
{
|
||||
ActivityFile f(file);
|
||||
_files.append(f);
|
||||
}
|
||||
|
||||
void Activity::addDirectory( const QString& dir )
|
||||
{
|
||||
ActivityFile f(dir);
|
||||
f.setType(ActivityFile::Directory);
|
||||
_files.append(f);
|
||||
}
|
||||
|
||||
QVector<ActivityFile> Activity::files()
|
||||
{
|
||||
return _files;
|
||||
}
|
||||
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
ActivityList::ActivityList()
|
||||
{
|
||||
}
|
||||
|
||||
void ActivityList::setAccountState(AccountState *ast)
|
||||
{
|
||||
_ast = ast;
|
||||
}
|
||||
|
||||
AccountState* ActivityList::accountState()
|
||||
{
|
||||
return _ast;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
#include "accountstate.h"
|
||||
|
||||
namespace OCC {
|
||||
/**
|
||||
* @brief The ActivityLink class describes actions of an activity
|
||||
@@ -33,6 +35,32 @@ public:
|
||||
};
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
/**
|
||||
* @brief ActivityFile Structure
|
||||
* @ingroup gui
|
||||
*
|
||||
* contains information about a file of an activity.
|
||||
* Can handle the thumbnail and stuff later.
|
||||
*/
|
||||
class ActivityFile
|
||||
{
|
||||
public:
|
||||
enum FileType {Unknown, File, Directory};
|
||||
explicit ActivityFile();
|
||||
explicit ActivityFile( const QString& file );
|
||||
|
||||
void setType( FileType type );
|
||||
QString relativePath() const;
|
||||
QString fullPath( const QString _accountName ) const;
|
||||
|
||||
private:
|
||||
QString _relFileName;
|
||||
FileType _type;
|
||||
};
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
/**
|
||||
* @brief Activity Structure
|
||||
* @ingroup gui
|
||||
@@ -50,6 +78,11 @@ public:
|
||||
NotificationType
|
||||
};
|
||||
|
||||
void addFile( const QString& file );
|
||||
void addDirectory( const QString& dir );
|
||||
|
||||
QVector<ActivityFile> files();
|
||||
|
||||
Type _type;
|
||||
qlonglong _id;
|
||||
QString _subject;
|
||||
@@ -68,6 +101,10 @@ public:
|
||||
|
||||
|
||||
Identifier ident() const;
|
||||
|
||||
private:
|
||||
|
||||
QVector<ActivityFile> _files;
|
||||
};
|
||||
|
||||
bool operator==( const Activity& rhs, const Activity& lhs );
|
||||
@@ -81,8 +118,22 @@ bool operator<( const Activity& rhs, const Activity& lhs );
|
||||
* A QList based list of Activities
|
||||
*/
|
||||
|
||||
typedef QList<Activity> ActivityList;
|
||||
/**
|
||||
* @brief The ActivityList
|
||||
* @ingroup gui
|
||||
*
|
||||
* A QList based list of Activities
|
||||
*/
|
||||
class ActivityList:public QList<Activity>
|
||||
{
|
||||
public:
|
||||
ActivityList();
|
||||
void setAccountState(AccountState *ast);
|
||||
AccountState* accountState();
|
||||
|
||||
private:
|
||||
AccountState *_ast;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,245 @@
|
||||
/*
|
||||
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include "activityfetcher.h"
|
||||
#include "activitydata.h"
|
||||
#include "account.h"
|
||||
#include "accountstate.h"
|
||||
#include "json.h"
|
||||
#include "networkjobs.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
ActivityFetcher::ActivityFetcher(QObject *parent) : QObject(parent)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void ActivityFetcher::slotFetch(AccountState* s)
|
||||
{
|
||||
if( !(s && s->isConnected() )) {
|
||||
return;
|
||||
}
|
||||
JsonApiJob *job = new JsonApiJob(s->account(), QLatin1String("ocs/v1.php/cloud/activity"), this);
|
||||
QObject::connect(job, SIGNAL(jsonReceived(QVariantMap, int)),
|
||||
this, SLOT(slotActivitiesReceived(QVariantMap, int)));
|
||||
job->setProperty("AccountStatePtr", QVariant::fromValue<AccountState*>(s));
|
||||
|
||||
QList< QPair<QString,QString> > params;
|
||||
params.append(qMakePair(QString::fromLatin1("page"), QString::fromLatin1("0")));
|
||||
params.append(qMakePair(QString::fromLatin1("pagesize"), QString::fromLatin1("100")));
|
||||
job->addQueryParams(params);
|
||||
|
||||
qDebug() << "Start fetching activities for " << s->account()->displayName();
|
||||
job->start();
|
||||
|
||||
}
|
||||
|
||||
void ActivityFetcher::slotActivitiesReceived(const QVariantMap& json, int statusCode)
|
||||
{
|
||||
auto activities = json.value("ocs").toMap().value("data").toList();
|
||||
qDebug() << "*** activities" << activities;
|
||||
|
||||
ActivityList list;
|
||||
AccountState* ai = qvariant_cast<AccountState*>(sender()->property("AccountStatePtr"));
|
||||
list.setAccountState( ai );
|
||||
|
||||
foreach( auto activ, activities ) {
|
||||
auto json = activ.toMap();
|
||||
|
||||
Activity a;
|
||||
a._accName = ai->account()->displayName();
|
||||
a._id = json.value("id").toLongLong();
|
||||
a._subject = json.value("subject").toString();
|
||||
a._message = json.value("message").toString();
|
||||
const QString f = json.value("file").toString();
|
||||
a.addFile(f);
|
||||
a._link = json.value("link").toUrl();
|
||||
a._dateTime = json.value("date").toDateTime();
|
||||
list.append(a);
|
||||
}
|
||||
// activity app is not enabled, signalling.
|
||||
if( statusCode == 999 ) {
|
||||
emit accountWithoutActivityApp(ai);
|
||||
}
|
||||
|
||||
emit newActivityList(list);
|
||||
}
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
ActivityFetcherV2::ActivityFetcherV2()
|
||||
: ActivityFetcher()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
ActivityList ActivityFetcherV2::fetchFromDb( const QString& accountId )
|
||||
{
|
||||
// TODO fetch from database
|
||||
ActivityList dbActivities;
|
||||
|
||||
return dbActivities;
|
||||
}
|
||||
|
||||
int ActivityFetcherV2::lastSeenId()
|
||||
{
|
||||
int lastId = 0;
|
||||
|
||||
return lastId;
|
||||
}
|
||||
|
||||
void ActivityFetcherV2::slotFetch(AccountState* s)
|
||||
{
|
||||
if( !(s && s->isConnected() )) {
|
||||
return;
|
||||
}
|
||||
|
||||
JsonApiJob *job = new JsonApiJob(s->account(), QLatin1String("ocs/v2.php/apps/activity/api/v2/activity"), this);
|
||||
QObject::connect(job, SIGNAL(jsonReceived(QVariantMap, int)),
|
||||
this, SLOT(slotActivitiesReceived(QVariantMap, int)));
|
||||
job->setProperty("AccountStatePtr", QVariant::fromValue<AccountState*>(s));
|
||||
|
||||
QList< QPair<QString,QString> > params;
|
||||
|
||||
int lastId = lastSeenId();
|
||||
if( lastId > 0 ) {
|
||||
params.append(qMakePair(QString::fromLatin1("since"), QString::number(lastId)));
|
||||
job->addQueryParams(params);
|
||||
}
|
||||
qDebug() << "Start fetching V2 activities for " << s->account()->displayName();
|
||||
job->start();
|
||||
}
|
||||
|
||||
#define QL1(X) QLatin1String(X)
|
||||
|
||||
bool ActivityFetcherV2::parseActionString( Activity *activity, const QString& subject, const QVariantList& params)
|
||||
{
|
||||
// the action contains a string describing what happened
|
||||
bool re = true;
|
||||
|
||||
if( subject == QL1("shared_user_self") ) {
|
||||
|
||||
} else if( subject == QL1("reshared_user_by") ) {
|
||||
|
||||
} else if( subject == QL1("shared_group_self") ) {
|
||||
|
||||
} else if( subject == QL1("reshared_group_by") ) {
|
||||
|
||||
} else if( subject == QL1("reshared_link_by") ) {
|
||||
|
||||
} else if( subject == QL1("shared_user_self") ) {
|
||||
|
||||
} else if( subject == QL1("created_self") ) {
|
||||
|
||||
} else if( subject == QL1("created_by") ) {
|
||||
|
||||
} else if( subject == QL1("created_public") ) {
|
||||
|
||||
} else if( subject == QL1("changed_self") ) {
|
||||
|
||||
} else if( subject == QL1("changed_by") ) {
|
||||
|
||||
} else if( subject == QL1("deleted_self") ) {
|
||||
|
||||
} else if( subject == QL1("deleted_by") ) {
|
||||
|
||||
} else if( subject == QL1("restored_self") ) {
|
||||
|
||||
} else if( subject == QL1("restored_by") ) {
|
||||
|
||||
} else {
|
||||
// unknown action.
|
||||
re = false;
|
||||
}
|
||||
|
||||
// parse the params
|
||||
foreach( QVariant v, params ) {
|
||||
QVariantMap vm = v.toMap();
|
||||
|
||||
if( vm.contains("type") ) {
|
||||
const QString type = vm.value("type").toString();
|
||||
const QString val = vm.value("value").toString();
|
||||
|
||||
if( type == QL1("collection") ) {
|
||||
QVariantList items = vm.value("value").toList();
|
||||
|
||||
foreach( QVariant vFile, items ) {
|
||||
QVariantMap vMap = vFile.toMap();
|
||||
const QString fileType = vMap.value("type").toString();
|
||||
const QString relFileName = vMap.value("value").toString();
|
||||
|
||||
if( fileType != QL1("file")) {
|
||||
activity->addDirectory(relFileName);
|
||||
} else {
|
||||
activity->addFile(relFileName);
|
||||
}
|
||||
}
|
||||
} else if( type == QL1("file")) {
|
||||
const QString relFileName = val;
|
||||
activity->addFile(relFileName);
|
||||
} else if( type == QL1("dir")) {
|
||||
const QString relFileName = val;
|
||||
activity->addDirectory(relFileName);
|
||||
// needs verification!
|
||||
} else if( type == QL1("username")) {
|
||||
const QString user = val;
|
||||
} else if( type == QL1("typeicon")) {
|
||||
const QString icon = val;
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return re;
|
||||
}
|
||||
|
||||
void ActivityFetcherV2::slotActivitiesReceived(const QVariantMap& json, int statusCode)
|
||||
{
|
||||
auto activities = json.value("ocs").toMap().value("data").toList();
|
||||
qDebug() << "*** activities" << activities;
|
||||
|
||||
AccountState* ai = qvariant_cast<AccountState*>(sender()->property("AccountStatePtr"));
|
||||
ActivityList list;
|
||||
|
||||
if( ai ) {
|
||||
list = fetchFromDb(ai->account()->id());
|
||||
list.setAccountState( ai );
|
||||
|
||||
foreach( auto activ, activities ) {
|
||||
auto json = activ.toMap();
|
||||
|
||||
Activity a;
|
||||
a._accName = ai->account()->displayName();
|
||||
a._id = json.value("activity_id").toLongLong();
|
||||
QString subject = json.value("subject").toString();
|
||||
QVariantList subjectParams = json.value("subjectparams").toList();
|
||||
bool knownAction = parseActionString( &a, subject, subjectParams );
|
||||
|
||||
a._subject = json.value("subject").toString();
|
||||
|
||||
a._message = json.value("message_prepared").toString();
|
||||
// a._file = json.value("file").toString();
|
||||
// a._link = json.value("link").toUrl();
|
||||
a._dateTime = json.value("datetime").toDateTime();
|
||||
list.append(a);
|
||||
}
|
||||
// activity app is not enabled, signalling.
|
||||
if( statusCode == 999 ) {
|
||||
emit accountWithoutActivityApp(ai);
|
||||
}
|
||||
}
|
||||
emit newActivityList(list);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/*
|
||||
* Copyright (C) by Klaas Freitag <freitag@owncloud.com>
|
||||
*
|
||||
* 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
|
||||
* the Free Software Foundation; version 2 of the License.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#ifndef ACTIVITYFETCHER_H
|
||||
#define ACTIVITYFETCHER_H
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
#include "activitydata.h"
|
||||
#include "accountstate.h"
|
||||
|
||||
/**
|
||||
* @brief The ActivityFetcher class
|
||||
*
|
||||
* Used to fetch the list of server acitivities from the server. Accesses
|
||||
* the old ocs based API.
|
||||
*/
|
||||
|
||||
namespace OCC {
|
||||
|
||||
class ActivityFetcher : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ActivityFetcher(QObject *parent = 0);
|
||||
|
||||
public slots:
|
||||
virtual void slotFetch(AccountState* s);
|
||||
|
||||
private slots:
|
||||
virtual void slotActivitiesReceived(const QVariantMap& json, int statusCode);
|
||||
|
||||
signals:
|
||||
void newActivityList( ActivityList list );
|
||||
void accountWithoutActivityApp(AccountState*);
|
||||
|
||||
};
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
/**
|
||||
* @brief The ActivityFetcherV2 class
|
||||
*
|
||||
* To be used with the next version of the activity API. By now, it is
|
||||
* completely unused.
|
||||
*/
|
||||
|
||||
class ActivityFetcherV2 : public ActivityFetcher
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ActivityFetcherV2();
|
||||
|
||||
public slots:
|
||||
virtual void slotFetch(AccountState* s);
|
||||
|
||||
private slots:
|
||||
virtual void slotActivitiesReceived(const QVariantMap& json, int statusCode);
|
||||
|
||||
private:
|
||||
bool parseActionString( Activity *activity, const QString& subject, const QVariantList& params);
|
||||
ActivityList fetchFromDb(const QString &accountId );
|
||||
int lastSeenId();
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // ACTIVITYFETCHER_H
|
||||
@@ -26,10 +26,35 @@
|
||||
#include "activitydata.h"
|
||||
#include "activitylistmodel.h"
|
||||
|
||||
#define FETCH_ACTIVITIES_AMOUNT 1000
|
||||
|
||||
namespace OCC {
|
||||
|
||||
/* ==================================================================== */
|
||||
ActivitySortProxyModel::ActivitySortProxyModel(QObject *parent)
|
||||
:QSortFilterProxyModel(parent)
|
||||
{
|
||||
setFilterRole(ActivityItemDelegate::ActionTextRole);
|
||||
}
|
||||
|
||||
bool ActivitySortProxyModel::lessThan(const QModelIndex &left, const QModelIndex &right) const
|
||||
{
|
||||
QVariant leftData = sourceModel()->data(left);
|
||||
QVariant rightData = sourceModel()->data(right);
|
||||
|
||||
if (leftData.type() == QVariant::DateTime) {
|
||||
return leftData.toDateTime() < rightData.toDateTime();
|
||||
} else {
|
||||
qDebug() << "OOOOO " << endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/* ==================================================================== */
|
||||
|
||||
ActivityListModel::ActivityListModel(QWidget *parent)
|
||||
:QAbstractListModel(parent)
|
||||
:QAbstractListModel(parent),
|
||||
_fetchEntriesAmount(FETCH_ACTIVITIES_AMOUNT)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -40,7 +65,8 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
||||
if (!index.isValid())
|
||||
return QVariant();
|
||||
|
||||
a = _finalList.at(index.row());
|
||||
a = findItem(index.row());
|
||||
|
||||
AccountStatePtr ast = AccountManager::instance()->account(a._accName);
|
||||
QStringList list;
|
||||
|
||||
@@ -89,47 +115,48 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
||||
|
||||
int ActivityListModel::rowCount(const QModelIndex&) const
|
||||
{
|
||||
return _finalList.count();
|
||||
}
|
||||
int cnt = 0;
|
||||
|
||||
// current strategy: Fetch 100 items per Account
|
||||
// ATTENTION: This method is const and thus it is not possible to modify
|
||||
// the _activityLists hash or so. Doesn't make it easier...
|
||||
bool ActivityListModel::canFetchMore(const QModelIndex& ) const
|
||||
{
|
||||
if( _activityLists.count() == 0 ) return true;
|
||||
|
||||
for(auto i = _activityLists.begin() ; i != _activityLists.end(); ++i) {
|
||||
AccountState *ast = i.key();
|
||||
if( ast && ast->isConnected() ) {
|
||||
ActivityList activities = i.value();
|
||||
if( activities.count() == 0 &&
|
||||
! _currentlyFetching.contains(ast) ) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
foreach( ActivityList al, _activityLists) {
|
||||
cnt += al.count();
|
||||
}
|
||||
|
||||
return false;
|
||||
return cnt;
|
||||
}
|
||||
|
||||
void ActivityListModel::startFetchJob(AccountState* s)
|
||||
void ActivityListModel::startFetchJob(AccountState* ast)
|
||||
{
|
||||
if( !s->isConnected() ) {
|
||||
if( !ast->isConnected() || _currentlyFetching.contains(ast)) {
|
||||
return;
|
||||
}
|
||||
JsonApiJob *job = new JsonApiJob(s->account(), QLatin1String("ocs/v1.php/cloud/activity"), this);
|
||||
|
||||
int activityListIndx = activityListIndxForAccountState(ast);
|
||||
ActivityList activityList = _activityLists.at(activityListIndx);
|
||||
|
||||
// remove entries that might exist in this list.
|
||||
int startItem = 0;
|
||||
for( int i = 0; i < activityListIndx; i++ ) {
|
||||
ActivityList al = _activityLists.at(i);
|
||||
startItem += al.count();
|
||||
}
|
||||
|
||||
beginRemoveRows(QModelIndex(), startItem, activityList.count() );
|
||||
activityList.clear();
|
||||
endRemoveRows();
|
||||
|
||||
_activityLists[activityListIndx] = activityList;
|
||||
|
||||
// start a new fetch job.
|
||||
JsonApiJob *job = new JsonApiJob(ast->account(), QLatin1String("ocs/v1.php/cloud/activity"), this);
|
||||
QObject::connect(job, SIGNAL(jsonReceived(QVariantMap, int)),
|
||||
this, SLOT(slotActivitiesReceived(QVariantMap, int)));
|
||||
job->setProperty("AccountStatePtr", QVariant::fromValue<AccountState*>(s));
|
||||
|
||||
job->setProperty("AccountStatePtr", QVariant::fromValue<AccountState*>(ast));
|
||||
QList< QPair<QString,QString> > params;
|
||||
params.append(qMakePair(QString::fromLatin1("page"), QString::fromLatin1("0")));
|
||||
params.append(qMakePair(QString::fromLatin1("pagesize"), QString::fromLatin1("100")));
|
||||
params.append(qMakePair(QString::fromLatin1("start"), QLatin1String("0")));
|
||||
params.append(qMakePair(QString::fromLatin1("count"), QString::number(_fetchEntriesAmount)));
|
||||
job->addQueryParams(params);
|
||||
|
||||
_currentlyFetching.insert(s);
|
||||
qDebug() << Q_FUNC_INFO << "Start fetching activities for " << s->account()->displayName();
|
||||
_currentlyFetching.insert(ast);
|
||||
qDebug() << Q_FUNC_INFO << "Start fetching activities for " << ast->account()->displayName();
|
||||
job->start();
|
||||
}
|
||||
|
||||
@@ -137,12 +164,14 @@ void ActivityListModel::slotActivitiesReceived(const QVariantMap& json, int stat
|
||||
{
|
||||
auto activities = json.value("ocs").toMap().value("data").toList();
|
||||
|
||||
ActivityList list;
|
||||
AccountState* ast = qvariant_cast<AccountState*>(sender()->property("AccountStatePtr"));
|
||||
|
||||
_currentlyFetching.remove(ast);
|
||||
|
||||
foreach( auto activ, activities ) {
|
||||
auto json = activ.toMap();
|
||||
// Read the new entries into a temporary list
|
||||
ActivityList list;
|
||||
foreach( auto activity, activities ) {
|
||||
auto json = activity.toMap();
|
||||
|
||||
Activity a;
|
||||
a._type = Activity::ActivityType;
|
||||
@@ -156,73 +185,101 @@ void ActivityListModel::slotActivitiesReceived(const QVariantMap& json, int stat
|
||||
list.append(a);
|
||||
}
|
||||
|
||||
_activityLists[ast] = list;
|
||||
|
||||
emit activityJobStatusCode(ast, statusCode);
|
||||
|
||||
combineActivityLists();
|
||||
addNewActivities(ast, list);
|
||||
}
|
||||
|
||||
|
||||
void ActivityListModel::combineActivityLists()
|
||||
void ActivityListModel::addNewActivities(AccountState* ast, const ActivityList& newItemsList)
|
||||
{
|
||||
ActivityList resultList;
|
||||
int startItem = 0; // the start number of items to delete in the virtual overall list
|
||||
int activityListIndx = activityListIndxForAccountState(ast);
|
||||
Q_ASSERT(activityListIndx != -1);
|
||||
|
||||
foreach( ActivityList list, _activityLists.values() ) {
|
||||
resultList.append(list);
|
||||
ActivityList accountList = _activityLists.at(activityListIndx);
|
||||
|
||||
for( int i = 0; i < activityListIndx; i++ ) {
|
||||
ActivityList li = _activityLists.at(i);
|
||||
startItem += li.count();
|
||||
}
|
||||
|
||||
std::sort( resultList.begin(), resultList.end() );
|
||||
|
||||
beginResetModel();
|
||||
_finalList.clear();
|
||||
endResetModel();
|
||||
|
||||
beginInsertRows(QModelIndex(), 0, resultList.count());
|
||||
_finalList = resultList;
|
||||
// insert the new list
|
||||
beginInsertRows(QModelIndex(), startItem, newItemsList.count() );
|
||||
accountList.append(newItemsList);
|
||||
endInsertRows();
|
||||
|
||||
_activityLists[activityListIndx] = accountList;
|
||||
}
|
||||
|
||||
void ActivityListModel::fetchMore(const QModelIndex &)
|
||||
int ActivityListModel::activityListIndxForAccountState(AccountState *ast)
|
||||
{
|
||||
QList<AccountStatePtr> accounts = AccountManager::instance()->accounts();
|
||||
int i;
|
||||
|
||||
foreach (const AccountStatePtr& asp, accounts) {
|
||||
|
||||
if( !_activityLists.contains(asp.data()) && asp->isConnected() ) {
|
||||
_activityLists[asp.data()] = ActivityList();
|
||||
startFetchJob(asp.data());
|
||||
}
|
||||
for( i = 0; i < _activityLists.count(); i++ ) {
|
||||
ActivityList li = _activityLists.at(i);
|
||||
if( li.accountState() == ast )
|
||||
return i;
|
||||
}
|
||||
// if the AccountState was not found yet, add it to the list
|
||||
if( i == _activityLists.count() ) {
|
||||
ActivityList li;
|
||||
li.setAccountState(ast);
|
||||
_activityLists.append(li);
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
void ActivityListModel::slotRefreshActivity(AccountState *ast)
|
||||
{
|
||||
if(ast && _activityLists.contains(ast)) {
|
||||
_activityLists.remove(ast);
|
||||
if(ast ) {
|
||||
qDebug() << "**** Refreshing Activity list for" << ast->account()->displayName();
|
||||
startFetchJob(ast);
|
||||
}
|
||||
startFetchJob(ast);
|
||||
}
|
||||
|
||||
void ActivityListModel::slotRemoveAccount(AccountState *ast )
|
||||
{
|
||||
if( _activityLists.contains(ast) ) {
|
||||
int i = 0;
|
||||
const QString accountToRemove = ast->account()->displayName();
|
||||
int removeIndx = activityListIndxForAccountState(ast);
|
||||
|
||||
QMutableListIterator<Activity> it(_finalList);
|
||||
|
||||
while (it.hasNext()) {
|
||||
Activity activity = it.next();
|
||||
if( activity._accName == accountToRemove ) {
|
||||
beginRemoveRows(QModelIndex(), i, i+1);
|
||||
it.remove();
|
||||
endRemoveRows();
|
||||
}
|
||||
}
|
||||
_activityLists.remove(ast);
|
||||
_currentlyFetching.remove(ast);
|
||||
int startRow = 0;
|
||||
for( int i = 0; i < removeIndx; i++) {
|
||||
ActivityList al = _activityLists.at(i);
|
||||
startRow += al.count();
|
||||
}
|
||||
|
||||
beginRemoveRows(QModelIndex(), startRow, startRow+_activityLists.at(removeIndx).count());
|
||||
_activityLists.removeAt(removeIndx);
|
||||
endRemoveRows();
|
||||
_currentlyFetching.remove(ast);
|
||||
}
|
||||
|
||||
// combine all activities into one big result list
|
||||
ActivityList ActivityListModel::activityList()
|
||||
{
|
||||
ActivityList all;
|
||||
int i;
|
||||
|
||||
for( i = 0; i < _activityLists.count(); i++) {
|
||||
ActivityList al = _activityLists.at(i);
|
||||
all.append(al);
|
||||
}
|
||||
return all;
|
||||
}
|
||||
|
||||
Activity ActivityListModel::findItem(int indx) const
|
||||
{
|
||||
Activity a;
|
||||
|
||||
foreach( ActivityList al, _activityLists ) {
|
||||
if( indx < al.count() ) {
|
||||
a = al.at(indx);
|
||||
break;
|
||||
}
|
||||
indx -= al.count();
|
||||
}
|
||||
|
||||
return a;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -17,10 +17,21 @@
|
||||
#include <QtCore>
|
||||
|
||||
#include "activitydata.h"
|
||||
#include "accountstate.h"
|
||||
|
||||
namespace OCC {
|
||||
|
||||
class AccountState;
|
||||
class ActivitySortProxyModel : public QSortFilterProxyModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ActivitySortProxyModel(QObject *parent = 0);
|
||||
|
||||
protected:
|
||||
bool lessThan(const QModelIndex &left, const QModelIndex &right) const Q_DECL_OVERRIDE;
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief The ActivityListModel
|
||||
@@ -38,10 +49,8 @@ public:
|
||||
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
|
||||
int rowCount(const QModelIndex& parent = QModelIndex()) const Q_DECL_OVERRIDE;
|
||||
|
||||
bool canFetchMore(const QModelIndex& ) const Q_DECL_OVERRIDE;
|
||||
void fetchMore(const QModelIndex&) Q_DECL_OVERRIDE;
|
||||
|
||||
ActivityList activityList() { return _finalList; }
|
||||
ActivityList activityList();
|
||||
Activity findItem(int indx) const;
|
||||
|
||||
public slots:
|
||||
void slotRefreshActivity(AccountState* ast);
|
||||
@@ -54,14 +63,16 @@ signals:
|
||||
void activityJobStatusCode(AccountState* ast, int statusCode);
|
||||
|
||||
private:
|
||||
void startFetchJob(AccountState* s);
|
||||
void addNewActivities(AccountState* ast, const ActivityList& newItemsList);
|
||||
void startFetchJob(AccountState *ast);
|
||||
void combineActivityLists();
|
||||
int activityListIndxForAccountState(AccountState *ast );
|
||||
|
||||
QMap<AccountState*, ActivityList> _activityLists;
|
||||
QList<ActivityList> _activityLists;
|
||||
ActivityList _finalList;
|
||||
QSet<AccountState*> _currentlyFetching;
|
||||
int _fetchEntriesAmount;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
#endif // ACTIVITYLISTMODEL_H
|
||||
|
||||
@@ -63,15 +63,19 @@ ActivityWidget::ActivityWidget(QWidget *parent) :
|
||||
_ui->_activityList->setMinimumWidth(400);
|
||||
#endif
|
||||
|
||||
_model = new ActivityListModel(this);
|
||||
_model = new ActivitySortProxyModel(this);
|
||||
ActivityListModel *rawModel = new ActivityListModel;
|
||||
_model->setSourceModel(rawModel);
|
||||
|
||||
ActivityItemDelegate *delegate = new ActivityItemDelegate;
|
||||
delegate->setParent(this);
|
||||
_ui->_activityList->setItemDelegate(delegate);
|
||||
_ui->_activityList->setAlternatingRowColors(true);
|
||||
_ui->_activityList->setModel(_model);
|
||||
|
||||
_ui->_notifyLabel->hide();
|
||||
_ui->_notifyScroll->hide();
|
||||
_ui->_filterEdit->setClearButtonEnabled(true);
|
||||
connect(_ui->_filterEdit, SIGNAL(textChanged(QString)),
|
||||
SLOT(slotFilterTextChanged(QString)));
|
||||
|
||||
// Create a widget container for the notifications. The ui file defines
|
||||
// a scroll area that get a widget with a layout as children
|
||||
@@ -79,12 +83,10 @@ ActivityWidget::ActivityWidget(QWidget *parent) :
|
||||
_notificationsLayout = new QVBoxLayout;
|
||||
w->setLayout(_notificationsLayout);
|
||||
_notificationsLayout->setAlignment(Qt::AlignTop);
|
||||
_ui->_notifyScroll->setAlignment(Qt::AlignTop);
|
||||
_ui->_notifyScroll->setWidget(w);
|
||||
|
||||
showLabels();
|
||||
|
||||
connect(_model, SIGNAL(activityJobStatusCode(AccountState*,int)),
|
||||
connect(rawModel, SIGNAL(activityJobStatusCode(AccountState*,int)),
|
||||
this, SLOT(slotAccountActivityStatus(AccountState*,int)));
|
||||
|
||||
_copyBtn = _ui->_dialogButtonBox->addButton(tr("Copy"), QDialogButtonBox::ActionRole);
|
||||
@@ -105,11 +107,17 @@ ActivityWidget::~ActivityWidget()
|
||||
delete _ui;
|
||||
}
|
||||
|
||||
void ActivityWidget::slotFilterTextChanged(const QString& exp)
|
||||
{
|
||||
_model->setFilterRegExp(QRegExp(exp, Qt::CaseInsensitive, QRegExp::RegExp));
|
||||
}
|
||||
|
||||
void ActivityWidget::slotRefreshActivities(AccountState *ptr)
|
||||
{
|
||||
_model->slotRefreshActivity(ptr);
|
||||
qobject_cast<ActivityListModel*>(_model->sourceModel())->slotRefreshActivity(ptr);
|
||||
}
|
||||
|
||||
|
||||
void ActivityWidget::slotRefreshNotifications(AccountState *ptr)
|
||||
{
|
||||
// start a server notification handler if no notification requests
|
||||
@@ -119,7 +127,7 @@ void ActivityWidget::slotRefreshNotifications(AccountState *ptr)
|
||||
connect(snh, SIGNAL(newNotificationList(ActivityList)), this,
|
||||
SLOT(slotBuildNotificationDisplay(ActivityList)));
|
||||
|
||||
snh->slotFetchNotifications(ptr);
|
||||
snh->fetchNotifications(ptr);
|
||||
} else {
|
||||
qDebug() << Q_FUNC_INFO << "========> notification request counter not zero.";
|
||||
}
|
||||
@@ -127,24 +135,20 @@ void ActivityWidget::slotRefreshNotifications(AccountState *ptr)
|
||||
|
||||
void ActivityWidget::slotRemoveAccount( AccountState *ptr )
|
||||
{
|
||||
_model->slotRemoveAccount(ptr);
|
||||
qobject_cast<ActivityListModel*>(_model->sourceModel())->slotRemoveAccount(ptr);
|
||||
}
|
||||
|
||||
void ActivityWidget::showLabels()
|
||||
{
|
||||
QString t = tr("Server Activities");
|
||||
_ui->_headerLabel->setTextFormat(Qt::RichText);
|
||||
_ui->_headerLabel->setText(t);
|
||||
QString t;
|
||||
|
||||
_ui->_notifyLabel->setText(tr("Action Required: Notifications"));
|
||||
|
||||
t.clear();
|
||||
QSetIterator<QString> i(_accountsWithoutActivities);
|
||||
while (i.hasNext() ) {
|
||||
t.append( tr("<br/>Account %1 does not have activities enabled.").arg(i.next()));
|
||||
}
|
||||
_ui->_bottomLabel->setTextFormat(Qt::RichText);
|
||||
_ui->_bottomLabel->setText(t);
|
||||
_ui->_bottomLabel->setVisible(!t.isEmpty());
|
||||
}
|
||||
|
||||
void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode)
|
||||
@@ -174,7 +178,7 @@ QString ActivityWidget::timeString(QDateTime dt, QLocale::FormatType format) con
|
||||
|
||||
void ActivityWidget::storeActivityList( QTextStream& ts )
|
||||
{
|
||||
ActivityList activities = _model->activityList();
|
||||
ActivityList activities = qobject_cast<ActivityListModel*>(_model->sourceModel())->activityList();
|
||||
|
||||
foreach( Activity activity, activities ) {
|
||||
ts << right
|
||||
@@ -218,11 +222,9 @@ void ActivityWidget::checkActivityTabVisibility()
|
||||
_accountsWithoutActivities.count() != accountCount;
|
||||
bool hasNotifications = !_widgetForNotifId.isEmpty();
|
||||
|
||||
_ui->_headerLabel->setVisible( hasAccountsWithActivity );
|
||||
_ui->_filterLabel->setVisible( hasAccountsWithActivity );
|
||||
_ui->_activityList->setVisible( hasAccountsWithActivity );
|
||||
|
||||
_ui->_notifyLabel->setVisible( hasNotifications );
|
||||
_ui->_notifyScroll->setVisible( hasNotifications );
|
||||
_ui->_filterEdit->setVisible(hasAccountsWithActivity);
|
||||
|
||||
emit hideActivityTab(!hasAccountsWithActivity && !hasNotifications);
|
||||
}
|
||||
@@ -248,6 +250,9 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
|
||||
QHash<QString, int> accNotified;
|
||||
QString listAccountName;
|
||||
|
||||
// Whether a new notification widget was added to the notificationLayout.
|
||||
bool newNotificationShown = false;
|
||||
|
||||
foreach( auto activity, list ) {
|
||||
if( _blacklistedNotifications.contains(activity)) {
|
||||
qDebug() << Q_FUNC_INFO << "Activity in blacklist, skip";
|
||||
@@ -266,11 +271,8 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
|
||||
this, SLOT(slotRequestCleanupAndBlacklist(Activity)));
|
||||
|
||||
_notificationsLayout->addWidget(widget);
|
||||
// _ui->_notifyScroll->setMinimumHeight( widget->height());
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 2, 0)
|
||||
_ui->_notifyScroll->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContentsOnFirstShow);
|
||||
#endif
|
||||
_widgetForNotifId[activity.ident()] = widget;
|
||||
newNotificationShown = true;
|
||||
}
|
||||
|
||||
widget->setActivity( activity );
|
||||
@@ -365,6 +367,10 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
|
||||
const QString log = tr("%1 Notifications - Action Required").arg(Theme::instance()->appNameGUI());
|
||||
emit guiLog( log, msg);
|
||||
}
|
||||
|
||||
if (newNotificationShown) {
|
||||
emit newNotification();
|
||||
}
|
||||
}
|
||||
|
||||
void ActivityWidget::slotSendNotificationRequest(const QString& accountName, const QString& link, const QByteArray& verb)
|
||||
@@ -492,12 +498,6 @@ void ActivityWidget::slotCheckToCleanWidgets()
|
||||
if( _widgetsToRemove.isEmpty() ) {
|
||||
_removeTimer.stop();
|
||||
}
|
||||
|
||||
// check to see if the whole notification pane should be hidden
|
||||
if( _widgetForNotifId.isEmpty() ) {
|
||||
_ui->_notifyLabel->setHidden(true);
|
||||
_ui->_notifyScroll->setHidden(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -517,6 +517,7 @@ ActivitySettings::ActivitySettings(QWidget *parent)
|
||||
connect(_activityWidget, SIGNAL(copyToClipboard()), this, SLOT(slotCopyToClipboard()));
|
||||
connect(_activityWidget, SIGNAL(hideActivityTab(bool)), this, SLOT(setActivityTabHidden(bool)));
|
||||
connect(_activityWidget, SIGNAL(guiLog(QString,QString)), this, SIGNAL(guiLog(QString,QString)));
|
||||
connect(_activityWidget, SIGNAL(newNotification()), SLOT(slotShowActivityTab()));
|
||||
|
||||
_protocolWidget = new ProtocolWidget(this);
|
||||
_tab->insertTab(1, _protocolWidget, Theme::instance()->syncStateIcon(SyncResult::Success), tr("Sync Protocol"));
|
||||
@@ -582,6 +583,13 @@ void ActivitySettings::slotShowIssueItemCount(int cnt)
|
||||
_tab->setTabText(_syncIssueTabId, cntText);
|
||||
}
|
||||
|
||||
void ActivitySettings::slotShowActivityTab()
|
||||
{
|
||||
if (_activityTabId != -1) {
|
||||
_tab->setCurrentIndex(_activityTabId);
|
||||
}
|
||||
}
|
||||
|
||||
void ActivitySettings::slotCopyToClipboard()
|
||||
{
|
||||
QString text;
|
||||
|
||||
@@ -41,7 +41,8 @@ class ActivityListModel;
|
||||
namespace Ui {
|
||||
class ActivityWidget;
|
||||
}
|
||||
class oCApplication;
|
||||
class Application;
|
||||
class ActivitySortProxyModel;
|
||||
|
||||
/**
|
||||
* @brief The ActivityWidget class
|
||||
@@ -81,9 +82,10 @@ signals:
|
||||
void copyToClipboard();
|
||||
void rowsInserted();
|
||||
void hideActivityTab(bool);
|
||||
void newNotificationList(const ActivityList& list);
|
||||
void newNotification();
|
||||
|
||||
private slots:
|
||||
void slotFilterTextChanged(const QString& exp);
|
||||
void slotBuildNotificationDisplay(const ActivityList& list);
|
||||
void slotSendNotificationRequest(const QString &accountName, const QString& link, const QByteArray &verb);
|
||||
void slotNotifyNetworkError( QNetworkReply* );
|
||||
@@ -111,7 +113,7 @@ private:
|
||||
// no query for notifications is started.
|
||||
int _notificationRequestsRunning;
|
||||
|
||||
ActivityListModel *_model;
|
||||
ActivitySortProxyModel *_model;
|
||||
QVBoxLayout *_notificationsLayout;
|
||||
|
||||
};
|
||||
@@ -143,6 +145,7 @@ private slots:
|
||||
void setActivityTabHidden(bool hidden);
|
||||
void slotRegularNotificationCheck();
|
||||
void slotShowIssueItemCount(int cnt);
|
||||
void slotShowActivityTab();
|
||||
|
||||
signals:
|
||||
void guiLog(const QString&, const QString&);
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>693</width>
|
||||
<height>556</height>
|
||||
<width>690</width>
|
||||
<height>513</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -15,81 +15,53 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="_notifyLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="_filterLabel">
|
||||
<property name="text">
|
||||
<string>&Filter</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>_filterEdit</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="_filterEdit">
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>180</width>
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QScrollArea" name="_notifyScroll">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="widgetResizable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
<widget class="QWidget" name="_scrollAreaWidgetContents">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>677</width>
|
||||
<height>70</height>
|
||||
</rect>
|
||||
</property>
|
||||
</widget>
|
||||
</widget>
|
||||
<widget class="QListView" name="_activityList"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="_headerLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<widget class="QLabel" name="_bottomLabel">
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QListView" name="_activityList">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="_bottomLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>TextLabel</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QDialogButtonBox" name="_dialogButtonBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
* for more details.
|
||||
*/
|
||||
|
||||
#include "ocapplication.h"
|
||||
#include "application.h"
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -91,7 +91,7 @@ QString applicationTrPath()
|
||||
|
||||
// ----------------------------------------------------------------------------------
|
||||
|
||||
oCApplication::oCApplication(int &argc, char **argv) :
|
||||
Application::Application(int &argc, char **argv) :
|
||||
SharedTools::QtSingleApplication(Theme::instance()->appName() ,argc, argv),
|
||||
_gui(0),
|
||||
_theme(Theme::instance()),
|
||||
@@ -105,6 +105,12 @@ oCApplication::oCApplication(int &argc, char **argv) :
|
||||
{
|
||||
_startedAt.start();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// Ensure OpenSSL config file is only loaded from app directory
|
||||
QString opensslConf = QCoreApplication::applicationDirPath()+QString("/openssl.cnf");
|
||||
qputenv("OPENSSL_CONF", opensslConf.toLocal8Bit());
|
||||
#endif
|
||||
|
||||
// TODO: Can't set this without breaking current config paths
|
||||
// setOrganizationName(QLatin1String(APPLICATION_VENDOR));
|
||||
setOrganizationDomain(QLatin1String(APPLICATION_REV_DOMAIN));
|
||||
@@ -139,6 +145,7 @@ oCApplication::oCApplication(int &argc, char **argv) :
|
||||
setupTranslations();
|
||||
|
||||
// Setup global excludes
|
||||
qDebug() << "Loading global exclude list";
|
||||
ConfigFile cfg;
|
||||
ExcludedFiles& excludes = ExcludedFiles::instance();
|
||||
excludes.addExcludeFilePath( cfg.excludeFile(ConfigFile::SystemScope) );
|
||||
@@ -202,7 +209,7 @@ oCApplication::oCApplication(int &argc, char **argv) :
|
||||
connect (this, SIGNAL(aboutToQuit()), SLOT(slotCleanup()));
|
||||
}
|
||||
|
||||
oCApplication::~oCApplication()
|
||||
Application::~Application()
|
||||
{
|
||||
// Make sure all folders are gone, otherwise removing the
|
||||
// accounts will remove the associated folders from the settings.
|
||||
@@ -214,7 +221,7 @@ oCApplication::~oCApplication()
|
||||
AccountManager::instance()->shutdown();
|
||||
}
|
||||
|
||||
void oCApplication::slotAccountStateRemoved(AccountState *accountState)
|
||||
void Application::slotAccountStateRemoved(AccountState *accountState)
|
||||
{
|
||||
if (_gui) {
|
||||
disconnect(accountState, SIGNAL(stateChanged(int)),
|
||||
@@ -237,7 +244,7 @@ void oCApplication::slotAccountStateRemoved(AccountState *accountState)
|
||||
}
|
||||
}
|
||||
|
||||
void oCApplication::slotAccountStateAdded(AccountState *accountState)
|
||||
void Application::slotAccountStateAdded(AccountState *accountState)
|
||||
{
|
||||
connect(accountState, SIGNAL(stateChanged(int)),
|
||||
_gui, SLOT(slotAccountStateChanged()));
|
||||
@@ -251,7 +258,7 @@ void oCApplication::slotAccountStateAdded(AccountState *accountState)
|
||||
_gui->slotTrayMessageIfServerUnsupported(accountState->account().data());
|
||||
}
|
||||
|
||||
void oCApplication::slotCleanup()
|
||||
void Application::slotCleanup()
|
||||
{
|
||||
AccountManager::instance()->save();
|
||||
FolderMan::instance()->unloadAndDeleteAllFolders();
|
||||
@@ -263,7 +270,7 @@ void oCApplication::slotCleanup()
|
||||
// FIXME: This is not ideal yet since a ConnectionValidator might already be running and is in
|
||||
// progress of timing out in some seconds.
|
||||
// Maybe we need 2 validators, one triggered by timer, one by network configuration changes?
|
||||
void oCApplication::slotSystemOnlineConfigurationChanged(QNetworkConfiguration cnf)
|
||||
void Application::slotSystemOnlineConfigurationChanged(QNetworkConfiguration cnf)
|
||||
{
|
||||
if (cnf.state() & QNetworkConfiguration::Active) {
|
||||
//qDebug() << "Trying fast reconnect";
|
||||
@@ -271,7 +278,7 @@ void oCApplication::slotSystemOnlineConfigurationChanged(QNetworkConfiguration c
|
||||
}
|
||||
}
|
||||
|
||||
void oCApplication::slotCheckConnection()
|
||||
void Application::slotCheckConnection()
|
||||
{
|
||||
auto list = AccountManager::instance()->accounts();
|
||||
foreach (const auto &accountState , list) {
|
||||
@@ -293,12 +300,12 @@ void oCApplication::slotCheckConnection()
|
||||
}
|
||||
}
|
||||
|
||||
void oCApplication::slotCrash()
|
||||
void Application::slotCrash()
|
||||
{
|
||||
Utility::crash();
|
||||
}
|
||||
|
||||
void oCApplication::slotownCloudWizardDone( int res )
|
||||
void Application::slotownCloudWizardDone( int res )
|
||||
{
|
||||
AccountManager *accountMan = AccountManager::instance();
|
||||
FolderMan *folderMan = FolderMan::instance();
|
||||
@@ -335,7 +342,15 @@ void oCApplication::slotownCloudWizardDone( int res )
|
||||
}
|
||||
}
|
||||
|
||||
void oCApplication::setupLogging()
|
||||
static void csyncLogCatcher(int /*verbosity*/,
|
||||
const char */*function*/,
|
||||
const char *buffer,
|
||||
void */*userdata*/)
|
||||
{
|
||||
Logger::instance()->csyncLog( QString::fromUtf8(buffer) );
|
||||
}
|
||||
|
||||
void Application::setupLogging()
|
||||
{
|
||||
// might be called from second instance
|
||||
Logger::instance()->setLogFile(_logFile);
|
||||
@@ -345,19 +360,23 @@ void oCApplication::setupLogging()
|
||||
|
||||
Logger::instance()->enterNextLogFile();
|
||||
|
||||
qDebug() << QString::fromLatin1( "################## %1 %2 (%3) %4").arg(_theme->appName())
|
||||
qDebug() << QString::fromLatin1( "################## %1 %2 (%3) %4 on %5").arg(_theme->appName())
|
||||
.arg( QLocale::system().name() )
|
||||
.arg(property("ui_lang").toString())
|
||||
.arg(_theme->version());
|
||||
.arg(_theme->version())
|
||||
.arg(Utility::platformName());
|
||||
|
||||
// Setup CSYNC logging to forward to our own logger
|
||||
csync_set_log_callback( csyncLogCatcher );
|
||||
csync_set_log_level( Logger::instance()->isNoop() ? 0 : 11 );
|
||||
}
|
||||
|
||||
void oCApplication::slotUseMonoIconsChanged(bool)
|
||||
void Application::slotUseMonoIconsChanged(bool)
|
||||
{
|
||||
_gui->slotComputeOverallSyncStatus();
|
||||
}
|
||||
|
||||
void oCApplication::slotParseMessage(const QString &msg, QObject*)
|
||||
void Application::slotParseMessage(const QString &msg, QObject*)
|
||||
{
|
||||
if (msg.startsWith(QLatin1String("MSG_PARSEOPTIONS:"))) {
|
||||
const int lengthOfMsgPrefix = 17;
|
||||
@@ -375,7 +394,7 @@ void oCApplication::slotParseMessage(const QString &msg, QObject*)
|
||||
}
|
||||
}
|
||||
|
||||
void oCApplication::parseOptions(const QStringList &options)
|
||||
void Application::parseOptions(const QStringList &options)
|
||||
{
|
||||
QStringListIterator it(options);
|
||||
// skip file name;
|
||||
@@ -455,7 +474,7 @@ static void displayHelpText(const QString &t)
|
||||
}
|
||||
#endif
|
||||
|
||||
void oCApplication::showHelp()
|
||||
void Application::showHelp()
|
||||
{
|
||||
setHelp();
|
||||
QString helpText;
|
||||
@@ -473,7 +492,7 @@ void oCApplication::showHelp()
|
||||
displayHelpText(helpText);
|
||||
}
|
||||
|
||||
void oCApplication::showVersion()
|
||||
void Application::showVersion()
|
||||
{
|
||||
QString helpText;
|
||||
QTextStream stream(&helpText);
|
||||
@@ -485,7 +504,7 @@ void oCApplication::showVersion()
|
||||
displayHelpText(helpText);
|
||||
}
|
||||
|
||||
void oCApplication::showHint(std::string errorHint)
|
||||
void Application::showHint(std::string errorHint)
|
||||
{
|
||||
static QString binName = QFileInfo(QCoreApplication::applicationFilePath()).fileName();
|
||||
std::cerr << errorHint << std::endl;
|
||||
@@ -493,12 +512,12 @@ void oCApplication::showHint(std::string errorHint)
|
||||
std::exit(1);
|
||||
}
|
||||
|
||||
bool oCApplication::debugMode()
|
||||
bool Application::debugMode()
|
||||
{
|
||||
return _debugMode;
|
||||
}
|
||||
|
||||
void oCApplication::setHelp()
|
||||
void Application::setHelp()
|
||||
{
|
||||
_helpOnly = true;
|
||||
}
|
||||
@@ -518,7 +537,7 @@ QString substLang(const QString &lang)
|
||||
return lang;
|
||||
}
|
||||
|
||||
void oCApplication::setupTranslations()
|
||||
void Application::setupTranslations()
|
||||
{
|
||||
QStringList uiLanguages;
|
||||
// uiLanguages crashes on Windows with 4.8.0 release builds
|
||||
@@ -582,20 +601,21 @@ void oCApplication::setupTranslations()
|
||||
#endif
|
||||
}
|
||||
|
||||
bool oCApplication::giveHelp()
|
||||
bool Application::giveHelp()
|
||||
{
|
||||
return _helpOnly;
|
||||
}
|
||||
|
||||
bool oCApplication::versionOnly()
|
||||
bool Application::versionOnly()
|
||||
{
|
||||
return _versionOnly;
|
||||
}
|
||||
|
||||
void oCApplication::showSettingsDialog()
|
||||
void Application::showSettingsDialog()
|
||||
{
|
||||
_gui->slotShowSettings();
|
||||
}
|
||||
|
||||
|
||||
} // namespace OCC
|
||||
|
||||