The bug seems to be in Windows when it upscales an smaller icon for
HiDPI displays. It works fine if we provide a 256x256 size in the
ico files.
Use the new square icons also used on OS X that removes the share badge
and instead has a share icon only for the OK state. This means that we
can also remove 3 icons and release 3 slots in the registry for
overlay icons (only the first few are actually loaded by explorer).
This also adds a script that uses ImageMagick to convert our SVG icons
to Windows ico files. Since ImageMagick seems to have issue doing
proper antialiasing with pixels on the edge of icons, this also
slightly scale the icons to leave 2px on each edge, out of its
logical 128px width.
... by replacing CONFIG by NO_MODULE option in find package
From the manual: "The CONFIG option may be used to skip Module mode
explicitly and switch to Config mode. It is synonymous to using
NO_MODULE."
OwnCloudFinderRequestManager::_shareMenuTitle was not retained anymore
after the FinderSync refactoring which would cause it to contain any
kind of garbage value for some reason.
Fix the issue by also enabling ARC for RequestManager.m.
We can't enable ARC for the whole project since Finder.h is included
by many .m files and it's not trivial to port to ARC.
Now that the client is pushing all changes of state, we don't need
to track the requested URLs anymore and risk that the way that we
reseted that list could leave a few entries in Finder's cache outdated.
We can remove the same code from other platforms in a later release,
a bit earlier than a week before beta1.
This allows developers to build and run the extension by default.
Official packages bundles will be re-signed after the build, we
The SocketApi prefix can be set at configure time through cmake and
should match the key that will be used to sign the whole .app bundle
(including the embedded FindexSync .appex bundle).
Since we use that class to lookup the NSBundle using bundleForClass
use a more specific name to avoid any clash with any othe liferay
extension. I couldn't figure out from the documentation if that is
only resolved using the class name, but found some warnings on
stackoverflow and better be safe than sorry for what it costs.
It was only used on OS X and couldn't be used by the FinderSync
extension since that one runs in a sandbox. So use the same system
to load images in the legacy extension by shipping them in the
extension bundle instead of the owncloud.app bundle.
This is also given that the legacy extension needs padded icons
while the FinderSync one needs unpadded icons.
The archive buildaction causes this. Use the default build while
forcing the Release configuration instead.
In both cases the result will end up in SYMROOT.
This uses the new official API to show overlay icons and add our
custom context menu entry instead of hooking directly into the
Finder process and intercept drawind routines.
A dummy desktopclient target is also in the project to allow debugging
directly in Xcode while the official client can be started from the
command line. Otherwise Xcode won't allow attaching to the debugee.
Dummy icon files have been added while we get proper icon produced.
We can't use the old icons since what we use for the legacy shell
integration is already padded according to where the badge should
appear on the full icon.
This prepares the switch to the official FinderSync API on Yosemite
which requires the extension to run in a sandbox. This complicates
the usage of a local socket to communicate with a non-sandboxed GUI
client. An NSConnection is easier to use in this case, which we can
use as long as the server name (i.e. Mach port registered name) is
prefixed with the code signing Team Identifier.
A placeholder server implementation is also added to the client's
SocketApi which basically reproduces the interface of a QLocalSocket.
Most of the references to individual sockets we're only using
QIODevice methods so the type was simply reduced. A typedef to
replace the QLocalServer was the only other part needed.
Do not request the status of all entries in the cache. Instead force Finder
to request the ones that it deems necessary by keeping the old statuses
in a separate dictionary which are only used while the new status arrives.
removeIcons isn't called and clearFileNameCacheForPath was always
called with a "nil" path.
Remove the return value of askForIcon which was always 0, and use
that value explicitly at the only call site.
Remove the "-1" code path in iconByPath since setIcons prevents
-1 from getting into _fileNamesCache in all cases.
Do not request the status of all entries in the cache. Instead force
explorer to request the ones that it deems necessary by keeping the old
statuses in a separate dictionary which are only used while the new status
arrives.
Make sure that we define NDEBUG in all configurations.
Also remove inconsistent defines:
WIN32: We don't use
_DEBUG;_WINDOWS;_USRDLL: Should be defined by the compiler if necessary
OCCONTEXTMENU_EXPORTS: We currently don't use dllimport anyway
This also update the binary submodule with an updated build.
There is a race condition that can initialize the RemotePathChecker
instance concurrently on the same address and cause a crash when locking
the mutex. The reason is that local static initialization is not
thread-safe with MSVC2013.
Fix the issue by using call_once to initialize a static unique_ptr
instead.
This could be related to some reports of issue #2836.
50ms is sometimes not enough when the client is busy synchronizing.
Wait up to 500ms for the client to answer before we give up and show an
empty menu title.
Ideally we should request the title before the watched directory list, but
the list is currently sent implicitly on connect.
The context menu will now show "Share with ownCloud" instead of "Share" as
it does on other platforms.
This also updates the submodule to point to matching binaries.
It seems like verclsid.exe hangs on our class IDs when invoked
through explorer.exe for 5-10 seconds. It doesn't hang if I
invoke the same command line from cmd.exe, so there could be some
process parameters that don't play well with our extra thread
or to the pipe connection that we do in it.
Delay creating the RemotePathChecker thread until the first
IsMemberOf call. verclsid.exe only seems to instantiate a object
of each registered class, without actually using them, so we
can use this as a workaround.
This should be fixing issue #2680.
* Fix various spaces vs tabs issues
* Rewrite
- to use instance variables consistently
- to not make shared state explicit instead of relying on
class variables of a common base
* Fix reconnecting to an oC client.
Squashed commit of the following:
commit 4d9b072f560fa171a1390b7c74425614aa20e955
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Tue Oct 14 16:04:02 2014 +0200
Remove useless variable
commit 8e85de0307ec5f31bf3f92a7de793fed7d41c2ea
Author: Daniel Molkentin <danimo@owncloud.com>
Date: Tue Oct 14 16:01:52 2014 +0200
Make Windows Explorer Extension build
commit 8e2942cd9fd32e3af72d60cba0d06bd9d6222a45
Author: Daniel Molkentin <danimo@owncloud.com>
Date: Tue Oct 14 11:39:37 2014 +0200
Fix compilation
commit 0fc0c0e0e0c7e58ad97f62700256c7d1f8c0670b
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Tue Oct 14 11:48:32 2014 +0200
Windows Shell Integration: Try to let the thread notify about changes when there are changes
commit 4a1712b7c03269ca3007f167b8f313ea47655967
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Tue Oct 14 11:35:20 2014 +0200
Windows Shell Integration: Share the RemotePathChecker amongst all the OCOverlay instances
commit 2d87408e9af5a4d7ab71c460ce606ba1f367c09f
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Mon Oct 13 18:55:15 2014 +0200
Windows Shell Integration: Attempts to wait on multiple objects (WIP)
commit e448e427b6d1561ad7a40d08fc6632f4d2b4ef44
Author: Daniel Molkentin <danimo@owncloud.com>
Date: Mon Oct 13 17:58:02 2014 +0200
Introduce a worker thread
commit 2344407ec0bc1ce173ebbacadcf3992d62d94078
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Mon Oct 13 17:03:47 2014 +0200
Windows Shell Integration: try to keep the socket open using a thread (WIP)
commit ea6d5273ed60d8bc3f1c5d5c6936364d783a1c0f
Author: Daniel Molkentin <danimo@owncloud.com>
Date: Mon Oct 13 15:27:46 2014 +0200
Make Explorer plugin work again with named pipes
This is a temporary hack, which needs more refactoring.
commit 44a3437a44082379efa0078c9afd7b8bbde930de
Author: Daniel Molkentin <danimo@owncloud.com>
Date: Sat Oct 11 07:31:24 2014 +0200
Fix code
commit 123390a0f3516c0078309d7048c6d2acb9293676
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Fri Oct 10 16:29:35 2014 +0200
Windows shell integration: Use named pipe (WIP)
commit 9eea7e2321abeac6b8db0bd85bfce612dbf6bb20
Author: Olivier Goffart <ogoffart@woboq.com>
Date: Wed Oct 1 12:04:13 2014 +0200
Windows Shell Integration: Simplify StringUtil
This fixes a memory leak in CommunicationSocket::ReadLine
By enabling ARC for GCDAsyncSocket (as we should have done before
https://github.com/robbiehanson/CocoaAsyncSocket/wiki/ARC) there
is no chance anymore for a situation where the to-be-written NSData*
is deleted before the socket has had a chance to write it.
Interestingly, this only happened after switching to local sockets,
probably because of how immediatly the NSData* would be sent.
This commit also keeps the debug symbols for the Finder plugin.
The SocketAPI sends status updates for files without being asked for.
And in order to not draw the emblem again if it had not changed, the
state is compared before calling add_emblem
The client (in this case mirall) tells the Finder plugin where to get the icons.
This enables installation in different locations and in branded clients.
Re-retrieve all icons for a path in case we receive UPDATE_VIEW.
(But in contrast to previous code, don't delete the icons which then
would have caused screen flickering)
The installation fails because of these:
TabError: inconsistent use of tabs and spaces in indentation
SyntaxError: Missing parentheses in call to 'print'