1
0
mirror of https://github.com/valinet/ExplorerPatcher.git synced 2024-12-18 10:26:02 +01:00
Commit Graph

58 Commits

Author SHA1 Message Date
Amrsatrio
3a882c7745 Build: Upgrade PlatformToolset to Visual Studio 2022 (v143) 2024-02-14 06:11:23 +07:00
Amrsatrio
d4f36622c5 All: Update copyright year 2024-02-14 05:53:46 +07:00
Amrsatrio
026f81695f Build: Add trailing backslashes to OutDir to fix warnings 2024-01-23 01:36:58 +07:00
Valentin Radu
968d969df6 Weather: Fixed widget failing to load when using the Microsoft icon pack
Unfortunately, besides updating the code to work with Google's latest
changes, commit 2a1aad2 introduced a bug when using the Microsoft
icon pack that prevented the widget from loading. Thus, this commit:

* Fixes that (there was no need for `getElementById('wob_tci').children[0]`
apparently)
* Besides checking for blobs in `src`, it also checks for image names,
since `wob_tci` (main icon) still contains a URL, not a blob
* Fixes `wob_tci` to update with proper icon when interacting with the
widget, for example when selecting a day with a different forecast than
the current conditions
* Simplifies some logic, seems the widget works fine without it

Hopefully this fixes the widget properly.
2023-04-21 21:49:01 -07:00
Valentin Radu
0de81fdc68 Resources: Updated copyright info 2023-03-19 05:27:08 +02:00
Valentin Radu
a5e5287954 Weather: Fixed a bug that prevented the widget from displaying correctly 2023-03-18 22:31:17 +02:00
Valentin Radu
2a1aad2d03 Weather: Fixed widget icons when using Microsoft icon pack
This basically undoes commit a8c7fba and properly fixes the issue:
it seems Google moved the images in a separate child `img` tag, under
what I was previously looking for. Furthermore, the src is not a URL
anymore, but directly the image encoded in base64. Fortunately, we
can match the last characters against images obtained from their 48px
and 64px endpoints. More details here:
https://github.com/valinet/ExplorerPatcher/discussions/755#discussioncomment-5353030

It seems Google has introduced a bug, where they do not change the
main image when changing to another day in the widget. Hopefully they
will fix it in the future.
2023-03-18 16:00:39 +02:00
Valentin Radu
cc0af464c3 Weather: Fixed a bug that displayed the widget area using a different background color
It seems Google changed the widget and explicitly set a background
color, so this patch takes that into account and removes it.
Previously, the widget did not have a background, rather inheriting it
from the `body` element.
2023-03-01 20:41:09 +02:00
Valentin Radu
c083327e2f Weather: Fixed a bug that might throw a script error when certain elements are not ready 2023-03-01 20:39:05 +02:00
Valentin Radu
a8c7fbadaa Weather: Fixed a bug that could prevent the widget from properly loading
It seems that either the web page, either something in Microsoft's
WebView2 implementation changed so that when
`ICoreWebView2::NavigationCompleted` is fired, the elements of interest
on the page are not ready, which causes all this mess, as you can tell.

The solution for now was to delay the execution of my scripts, which
seemed to have gotten rid of the problem for now. I don't particularly
like the solution, I'd of course want something more robust, but I
guess these are the pitfalls when you do not control the entire
ecosystem...
2023-03-01 20:38:35 +02:00
Valentin Radu
50f3a709c0 Weather: Fixed wrong left padding of the widget
Google seems to have updated the web page and the widget is now 14px
more to the right, so the code had to account for this.
2022-09-28 14:36:27 +03:00
Valentin Radu
8fd7c46db0 All: Substitute RegDeleteKeyW with RegDeleteTreeW
This is because the keys should be deleted regardless of whether they
contain subkeys or not.
2022-08-07 20:40:36 +03:00
Valentin Radu
9ec44832dd Weather: Fixed a bug that could hang the host process and explorer
A nasty bug was sometime occurring where both explorer and the widget
host process could hang; this often happened when explorer was
restarted. The reason this happened was because the widget host
process could hang waiting for the "Lock_EPWeather_Instance" lock. This
was a global lock that made sure only one instance of the widget could
be created.

The idea of the global "Lock_EPWeather_Instance" lock was, of course,
pretty bad, but I chose it because I couldn't figure out/didn't want to
deal with passing an EPWeather "this" instance to WebView2 or
NetworkListManagerEvents functions. Bad decision.

This patch addresses this bug, by providing a generic object
which holds a reference to EPWeather "this" on which I build event
handlers for WebView2 and so on. Since these now contain this
reference, they cannot be static anymore, thus I switched to dynamically
allocating them and managing them throughout their lifetime using,
of course, reference counting. This is the proper solution.

Thus, this bug and any similar ones should now be fixed.
2022-08-05 15:31:36 +03:00
Valentin Radu
7c1cb3d560 Weather: Do not display error page when network connectivity is lost; instead, keep showing cached data from last refresh 2022-08-04 23:58:28 +03:00
Valentin Radu
da3fece8cd Weather: Wait a bit before refreshing when network connectivity is restored
This is so that we avoid a situation where the browser was looping on
trying to display the error page. Each navigation request was
erroring out, and the error said something along the lines of
"Your computer went to sleep". Indeed, this bug could be reproduced by
hibernating the computer and then waking it up - it seemed to occur
pretty frequently, especially on battery, when the power budget is more
constrained, and thus the speed of the PC as well. Hopefully, this
commit and the previous one addresses this issue.
2022-08-04 23:57:33 +03:00
Valentin Radu
aeb8e54b58 Weather: Detect and break infinite loops on navigating to the error page 2022-08-04 23:56:55 +03:00
Valentin Radu
961cc11dda Weather: Fixed a bug that prevented the widget from working when WebView2 Runtime >= 102.0.1245.33 2022-06-07 19:35:41 +03:00
Valentin Radu
dbdc1b80f8 Weather: Show "Reload" link when data fails to load 2022-05-28 13:43:54 +03:00
Valentin Radu
5093e7de37 Weather: Fix and free event registration tokens 2022-05-28 13:41:05 +03:00
Valentin Radu
13e1cc7a1b Symbols: Built-in support for OS build 22000.708 2022-05-26 11:09:37 +03:00
Valentin Radu
5e17f5a817 Weather: Fixed a bug that had "COM Surrogate" display as a running
app in Task Manager after the widget flyout was opened the first time
2022-04-30 03:35:13 +03:00
Valentin Radu
ff72f31b9b Weather: Display last time of update in Properties 2022-03-14 04:53:48 +02:00
Valentin Radu
25ef1b23e1 Weather: Implemented zoom levels (#1033) 2022-03-09 20:08:03 +02:00
Valentin Radu
aa8524487b Weather: Hide mysterious line that appears at the top of the widget for some places 2022-03-09 19:56:37 +02:00
Valentin Radu
6a26e76d1f Weather: Fixed widget displaying, at startup, a day/night icon relating to time at last hour change, instead of the actual current time 2022-03-09 19:54:57 +02:00
Valentin Radu
d8d3221fd3 Weather: Icon pack applies to widget icons as well (#1015) 2022-03-07 03:43:38 +02:00
Valentin Radu
fea56b71cc Weather: Implemented icon pack with day/night support 2022-03-06 08:00:59 +02:00
Valentin Radu
67a6fc00aa All: Use global OS version query functions 2022-03-06 00:04:30 +02:00
Valentin Radu
38650ccab8 Weather: Fixed display issues in RTL layouts (#954) 2022-03-01 15:01:30 +02:00
Valentin Radu
44396b9db4 All: Fix windows in ancient 22000-based OS builds 2022-02-28 03:06:42 +02:00
Valentin Radu
43ef8c2e9f Weather: Dismiss info banner in German version (#934) (thanks @frederic2de) 2022-02-27 02:16:12 +02:00
Valentin Radu
d8269f1bbe Weather: Allow widget resize and move when using dev mode 2022-02-27 00:04:37 +02:00
Valentin Radu
7ab3ac2be9 Weather: Registry setting to toggle dev tools in the browser 2022-02-26 13:26:12 +02:00
Valentin Radu
aa2aa9d3b6 Weather: Fix width of graphs displayed by the widget 2022-02-21 12:44:08 +02:00
Valentin Radu
9cfe6b1a61 Weather: Hide search suggestions banner (#734) 2022-02-21 02:43:23 +02:00
Valentin Radu
2cc9b0ed7f All: Fixes for Windows 10 2022-02-21 02:42:35 +02:00
Valentin Radu
b7a1ced429 Weather: Rearchitected component lifetime 2022-02-17 23:42:13 +02:00
Valentin Radu
668c234207 Weather: Support for high contrast themes 2022-02-17 23:06:24 +02:00
Valentin Radu
f52a74304a Weather: Enable support for memory leaks dumping in Debug builds 2022-02-17 23:04:00 +02:00
Valentin Radu
dfc2057ec0 Weather: Widget properly respects text size accessibility setting 2022-02-17 02:48:17 +02:00
Valentin Radu
26ec0df728 Weather: Fixed ep_Weather_Initialize prototype 2022-02-17 02:36:58 +02:00
Valentin Radu
97e522cf34 Weather: Maintain handle to uxtheme for the lifetime of the instance 2022-02-17 02:36:20 +02:00
Valentin Radu
71656419f7 Weather: Fixed erroneous message check 2022-02-17 02:33:17 +02:00
Valentin Radu
09f5390a23 Weather: Increased refresh delay at first startup (given more time for dark mode cookie to set itself up) 2022-02-14 07:47:26 +02:00
Valentin Radu
6be380826a Weather: Increased refresh delay at first startup (given more time for dark mode cookie to set itself up) 2022-02-14 02:47:37 +02:00
Valentin Radu
7bc56f4191 Weather: Widget displays with rounded corner after logon; implemented option to change corner preference 2022-02-08 19:58:02 +02:00
Valentin Radu
8cec8a9892 Weather: Terminate host process when widget is disabled 2022-02-07 00:50:43 +02:00
Valentin Radu
905d5cdf12 Weather: Disable context menus and F12 dev tools 2022-02-06 23:26:00 +02:00
Valentin Radu
05fbca7bc1 Weather: Disable scrolling in the widget 2022-02-06 23:25:39 +02:00
Valentin Radu
8f94546f1e Weather: Fixed bug that made the flyout open with a noticeable delay under certain circumstances 2022-02-06 20:12:30 +02:00