Commit graph

7 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
1b99ff2e91 shell/Windows: Remove the UPDATE_VIEW message handling
The client now tries to only push STATUS messages to connections
unless they previously requested it with a RETRIEVE_FILE_STATUS,
but this means that we now have to make sure that a new connection
will rerequest every icon that the user will see on files from that
point on.

To that end, we now send a SHChangeNotify for every file in the cache
when we lose the connection (or on UNREGISTER_PATH) to make sure that
what's on the screen matches what's in the cache. We also remove the
_oldCache logic that made this more difficult to enforce.

The client has been able to reliably push status updates on macOS
for a few versions now, and we don't need it on Windows either. The
_oldCache mechanism was to avoid sending to many update requests
when receiving an UPDATE_VIEW.

Also fixes #4766
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
Daniel Molkentin
b575ded464 More GmbH -> Inc Copyright header fixes 2016-07-26 16:53:11 +02: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
0d5d2c578d shell_integration on Windows: Avoid too many RETRIEVE_FILE_STATUS following UPDATE_VIEW #3122
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.
2015-05-06 16:48:34 +02:00
Daniel Molkentin
5619947685 Relocate Windows shell extensions
The directory was redundant
2015-01-12 14:40:42 +01:00
Renamed from shell_integration/windows/OCShellExtensions/OCUtil/RemotePathChecker.h (Browse further)