1
0
mirror of https://github.com/chylex/Nextcloud-Desktop.git synced 2024-10-25 03:42:48 +02:00
Commit Graph

320 Commits

Author SHA1 Message Date
Michael Schuster
ad524e8a61
Simplify nullptr comparisons where appropriate
Make the codebase consistent, we already have a lot of implicit pointer comparisons.

Exception: Stay explicit on return's, example:
  return _db != nullptr;

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 456c1eadbe)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-11 02:19:57 +02:00
Michael Schuster
74dda92f88
Fix nullptr regression in RegistryUtil::ReadRegistry
Merging PR #2057 caused the Windows build to fail:

shell_integration\windows\OCUtil\RegistryUtil.cpp(43): error C2664: 'LSTATUS RegOpenKeyExW(HKEY,LPCWSTR,DWORD,REGSAM,PHKEY)': cannot convert argument 3 from 'nullptr' to 'DWORD'

The previous implementation prior the PR supplied NULL as the argument 3 to RegOpenKeyEx,
so it was silently accepted and translated to zero, satisfying the DWORD's type requirement.

Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit bbe1d2e84c0201ce5aba0fedfedf94b23a546111)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-10 04:14:28 +02:00
Stephan Beyer
e6236d4ef5 Replace NULL by nullptr in all C++ files
We keep NULL in the pure C files in src/csync/std and test/csync.

We also replace Doxygen documentation referring to "NULL" to
"\c nullptr" (formatted as code).

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
(cherry picked from commit 39198e4116380d577241658920d6ae213c0f5d38)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-06-10 04:09:44 +02:00
Kevin Ottens
1c66b08c2b Fix leak in FileUtil::IsChildFile
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
2020-05-12 15:35:50 +00:00
Daniel Vedder
8a23380fe1 Fixed symlink resolution for menu items.
Signed-off-by: Daniel Vedder <d.vedder@web.de>
2020-05-04 18:18:48 +00:00
Daniel Vedder
f366fe75b0 Resolve symlinks when checking for registered paths.
Fixes issue #1948: https://github.com/nextcloud/desktop/issues/1948
The client already resolves symlinks when adding new paths to the
sync-list, but the Nautilus plugin did not do this yet, causing it
to not recognise synced folders if they were accessed via a symlink.

Signed-off-by: Daniel Vedder <d.vedder@web.de>
2020-05-04 18:18:47 +00:00
Nicolas Fella
acc59e466c Fix build of Dolphin integration
config.h needs to be included in the header already since we use APPLICATION_ICON_NAME there. This got introduced in 6fc877577c

Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-04-17 18:04:54 +00:00
Michael Schuster
b4a0d6a97d
[dolphin] Use CMake env vars for App Name and Icon strings
Signed-off-by: Michael Schuster <michael@schuster.ms>
(cherry picked from commit 6fc877577c)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-04-16 04:09:26 +02:00
Nicolas Fella
fb9f0aa84d [dolphin] Add icon to context menu
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
2020-04-16 00:53:32 +00:00
cclauss
9058602373
Use print() function in both Python 2 and Python 3
Signed-off-by: cclauss <cclauss@me.com>
(cherry picked from commit b34ed01109)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-03-06 03:00:30 +01:00
Christian Kamm
7fdbc72991 Windows: Fix context menu handling only own verbs #7004
Previously it'd handle all verbs as if they were our own.

Signed-off-by: Michael Schuster <michael@schuster.ms>
2020-03-03 19:13:31 +00:00
Corentin Noël
a105e3f758 Start the client in background if activated by D-Bus
The nextcloud client can be started by any other application consuming libcloudproviers.
Make sure that the client won't pop-up if we open the file manager.

Signed-off-by: Corentin Noël <corentin.noel@collabora.com>
2020-02-16 17:46:20 +00:00
Joas Schilling
b6ef8edb12
Use … instead of 3 dots
Signed-off-by: Joas Schilling <coding@schilljs.com>
(cherry picked from commit a4fa8b05e5065da62bb7f6d3cc8c371a2a68ed06)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-12-06 21:26:23 +01:00
Michael Schuster
f2bc25c9ca macOS build: Avoid the Get-Task-Allow Entitlement (Notarization)
Setting CODE_SIGN_INJECT_BASE_ENTITLEMENTS to NO is required for macOS
Notarization.

See: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/resolving_common_notarization_issues

And upstream: 97f4af32ae

Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-11-27 15:19:41 +01:00
Dominique Fuchs
dc6d2e6a6d
usage of UINT as iterator here because comparing with UINT retval from DragQueryFile
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 9a256fcbfe)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-10-17 19:34:15 +02:00
Dominique Fuchs
5127f50d1e
Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 112d2bfe11)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-10-17 19:34:15 +02:00
Dominique Fuchs
a26f2a7359
Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 69a11a7ec1)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-10-17 19:34:15 +02:00
Dominique Fuchs
42f1f445a9
Removed redundant (and wrong in terms of it's value) definitions for WINVER/_WIN32_WINNT
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
(cherry picked from commit 3960ffea3f)
Signed-off-by: Michael Schuster <michael@schuster.ms>
2019-10-17 19:34:15 +02:00
Corentin Noël
19079c65c1 libcloudproviders: Add missing check for Qt5DBus 2019-04-04 17:50:30 +02:00
Chih-Hsuan Yen
1361c3053a
Fix KDEInstallDirs deprecation warnings
Get rid of a bunch of such warnings from configuring the Dolphin plugin:

CMake Deprecation Warning at /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:345 (message):
  BIN_INSTALL_DIR is deprecated, use KDE_INSTALL_BINDIR instead.
Call Stack (most recent call first):
  /usr/share/ECM/kde-modules/KDEInstallDirs.cmake:433 (_define_relative)
  shell_integration/dolphin/CMakeLists.txt:23 (include)

Modified from https://github.com/owncloud/client/pull/6922

Original author: Dominik Schmidt <dev@dominik-schmidt.de>
2018-12-28 21:55:45 +08:00
Jan-Christoph Borchardt
7d8bba6786
Fix appname for Nautilus integration script
Signed-off-by: Jan-Christoph Borchardt <hey@jancborchardt.net>
2018-11-28 11:54:08 +01:00
Christian Kamm
f4dfdf5889
nautilus: Fix GET_MENU_ITEMS with utf8 filenames #6643 2018-09-10 21:06:57 +02:00
István Váradi
56ea525499 Use encode()/decode() with Python 3 only 2018-09-10 15:05:46 +02:00
Olivier Goffart
0d0bff4bf5
Windows Shell extention: Fix clicking on the menu entries
Issue #6553
2018-06-21 19:21:07 +02:00
Markus Goetz
d3cbe63801
macOS: Implement new dynamic Finder menu items #6328 2018-06-05 20:40:40 +02:00
Julius Härtl
4be565c56f
Merge pull request #369 from nextcloud/upstream/issue/6406
Nautilus shell integration: Print python version on startup #6406
2018-06-01 15:40:23 +02:00
Olivier Goffart
5f969580ac
Nautilus: Fix Python3 and remove many debug
Use b'\n' in the call to rfind, as the _remainder is bytes, not a string.

Remove most of the debug message which happens during normal operation.
They are mostly spamming the nautilus console, and can also cause bug
as they may throw exception in case of wrong encoding.

Relates to issue: #6406
2018-06-01 13:35:19 +02:00
Christian Kamm
70f0792d4a
Nautilus shell integration: Print python version on startup #6406 2018-06-01 13:02:13 +02:00
Roeland Jago Douma
1b756ac80f
Merge pull request #318 from nextcloud/upstream/pr/6402
Dolphin plugin: fall back if $XDG_RUNTIME_DIR is empty
2018-05-26 21:33:45 +02:00
Christian Kamm
629b14266b
Nautilus integration: Not a ColumnProvider
The nautilus plugin doesn't actually define get_columns(), so pretending
to be a ColumnProvider lead to a critical warning on startup.
2018-05-17 20:52:40 +02:00
whitequark
6dd5876b8a
Dolphin plugin: fall back if $XDG_RUNTIME_DIR is empty
As per XDG Base Directories specification:
> If $XDG_RUNTIME_DIR is not set applications should fall back
> to a replacement directory [...]

In practice, the ownCloud client has the fallback, but the plugin
helper does not, and if $XDG_RUNTIME_DIR is not set, the plugin
mysteriously does not work.
2018-05-16 20:05:46 +02:00
István Váradi
22153cf912 KDE_INSTALL_USE_QT_SYS_PATHS turned on so that the plugin is installed to the correct directory on Xenial too 2018-02-08 17:18:18 +01:00
Julius Härtl
bcb9553925
Use Qt5DBus_FOUND instead of the old WITH_DBUS
WITH_DBUS was removed in 257d8142b1

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-01-25 14:18:03 +01:00
Roeland Jago Douma
48bce4c6b0
Merge remote-tracking branch 'oc/master' into oc_up 2018-01-25 11:17:04 +01:00
Olivier Goffart
72b9beb79c Merge remote-tracking branch 'origin/2.4'
Conflicts:
	shell_integration/nautilus/syncstate.py
2018-01-23 14:08:15 +01:00
Olivier Goffart
883080b557 Windows shell extension: port to the new protocol 2018-01-23 14:02:56 +01:00
Christian Kamm
ebfac84c69 Shell integration: Make nautilus work with multiselections
Previously no menu would ever be shown if more than one file is
selected. Now the GET_MENU_ITEMS command is sent with all selected files
as an argument - similar to what is done for the dolphin integration.
2018-01-23 14:02:56 +01:00
Christian Kamm
3c2622d2de Shell integration: Update nautilus for GET_MENU_ITEMS 2018-01-23 14:02:56 +01:00
Olivier Goffart
982c591ec9 SocketApi: add a way to disable menu entries 2018-01-23 14:02:56 +01:00
Olivier Goffart
1782ae3c08 SocketAPI: Make it easier to add or remove item in the action menu
By making it dynamic.
So far only the dolphin shell extension have been ported
2018-01-23 14:02:56 +01:00
Christian Kamm
72363155d8 Nautilus integration: Work with python2 and python3 2018-01-23 12:30:58 +01:00
Olivier Goffart
f254ee3211 Nautilus shell integration: Port to Python 3 2018-01-23 12:30:58 +01:00
Olivier Goffart
926609bd74 Partially revert "shell_integration/dolphin: Silence some warnings"
This partially reverts commit 1c721e9422.

This caused the overlay plugin to be installed at the wrong place
because the kcoreaddons_add_plugin macto still use deprecated
${PLUGIN_INSTALL_DIR}.

I guess we'll have to live with the warnings.
2018-01-17 17:34:27 +01:00
Dominik Schmidt
fc62e9e9d9 Fix .def and .rc files not being compiled into windows shell extensions 2018-01-13 21:01:09 +01:00
Dominik Schmidt
15967b1219 Install all dlls to BINDIR so craft does not ignore them 2018-01-13 13:58:17 +01:00
Dominik Schmidt
81c20352e1 Use new ECMAddAppIcon macro for application icons.
cmake/modules/ECMAddAppIcon.cmake is heavily patched to support sidebar icons, OUTFILE_BASE parameter and to not include 64 and 64@2x icons on macOS which are not supported. All changes are made in a way that we can upstream this.
2018-01-13 13:58:17 +01:00
Dominik Schmidt
4e52ee9ebd Build Explorer extension if building with MSVC 2018-01-13 13:58:17 +01:00
Olivier Goffart
1c721e9422 shell_integration/dolphin: Silence some warnings 2018-01-13 13:58:17 +01:00
Julius Härtl
1cedb1919f
Integrate libcloudproviders support
This commit integrates support for libcloudproviders
desktop integration API. If build with the library it
will check on startup if the DBus interface is available
and then use it instead of the legacy status icon.

Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-12-14 11:19:25 +01:00
Martin
cd2057fc04 Update Overlay Icon naming 2017-12-12 10:18:00 +01:00