1
0
Fork 0
Commit Graph

9 Commits

Author SHA1 Message Date
Jocelyn Turcotte 47fbfbc006 shell/Windows: Avoid memory allocations and copies when querying icons
IsMemberOf is called for every file (in the ownCloud directory or not) and
with every instance of OCOverlay (we have 5) when displaying a list of
files in Explorer.

Refactor the code to avoid copying the list of watched directories, as
well as creating a wstring from a PWWSTR for files outside watched
directories.

Also change some calls of begin_with to use isDescendantOf since it
properly handles parent paths not ending with a backslash, which could
lead to SocketAPI queries for sibling folders with a name that starts with
a watched folder name.
2017-01-18 12:15:52 +01:00
Jocelyn Turcotte 3e85d47a57 shell/Windows: Convert tabs to space
It was a mix of both and the rest of the code uses spaces.
2017-01-18 12:15:52 +01:00
arthurchiao 7a2a439426 fix #5015 overlay icon not show: compare folder paths with no case-sensitivity 2016-07-01 13:03:42 +08:00
Jocelyn Turcotte bb5c370575 Windows: Update the overlay icon graphics #3105
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.
2016-01-12 11:46:05 +01:00
Jocelyn Turcotte c6442f67c1 shell_integration: Fix a crash on explorer startup
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.
2015-02-18 17:33:46 +01:00
Jocelyn Turcotte dc85ee3f0a shell_integration: Fix hangs on Windows Vista
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.
2015-02-11 16:45:11 +01:00
Jocelyn Turcotte 2debd5a198 [shell_integration] Setup precompiled headers properly with MSVC
This also fixes a minor compile error when using VS Express.
2015-02-05 15:14:42 +01:00
Daniel Molkentin 316c476bbd Revert "Revert "Windows Shell Integration: Show status icon for root folder""
This reverts commit 176413d312.
2015-01-22 19:13:12 +01:00
Daniel Molkentin 5619947685 Relocate Windows shell extensions
The directory was redundant
2015-01-12 14:40:42 +01:00