-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NETSHELL] LanStatusUI: Fix the Network Connection Systray icon opening several dialog windows when cable isn't connected #6905
base: master
Are you sure you want to change the base?
Conversation
WCHAR buffer[100]; | ||
|
||
LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, buffer, _countof(buffer)); | ||
HWND prophwnd = FindWindow(NULL, buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes assumptions about how Explorer formats its window titles? IShellWindows
is a lot more work so I guess we can let it slide for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello,
Thanks for your interest in ReactOS!
We ask our contributors to use their full real name when committing.
Please amend your commit with your full name, and update this PR.
To change this for future PR's, you can update it for globally (for the system):
git config --global user.name "Your Name"
git config --global user.email you@example.com
Or just for the current repository:
git config user.name "Your Name"
git config user.email you@example.com
Also please update your name in GitHub profile settings.
Regards.
GeoB99
I should've sent this when I actually did the commits yesterday, but everything should be okay now. |
You may continue now. |
LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, buffer, _countof(buffer)); | ||
HWND hWndProp = FindWindow(NULL, buffer); | ||
|
||
/* If the window is already opened, prevent it from opening again */ | ||
if (hWndProp != NULL) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, buffer, _countof(buffer)); | |
HWND hWndProp = FindWindow(NULL, buffer); | |
/* If the window is already opened, prevent it from opening again */ | |
if (hWndProp != NULL) | |
/* If the window is already opened, prevent it from opening again */ | |
LoadStringW(netshell_hInstance, IDS_NETWORKCONNECTION, buffer, _countof(buffer)); | |
HWND hWndProp = FindWindow(NULL, buffer); | |
if (hWndProp) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the window is already opened, prevent it from opening again
Granted, the way it is currently done is sensitive to the current UI language being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think shell32 is supposed to check IShellWindows to see if the PIDL is already open somewhere when the reuse windows option is on. I don't think shdocvw implements the window list yet so the hack this PR is using is good enough for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code lgtm, but it needs to be sqashed into one commit and meet our standards for commit mesages.
For @Connierollstheball: You can do that yourself or ask for a merger to do so.
For anyone who wants to merge this: make sure to squash and fix the commit message, then you can ignore this request for change.
I'll just let a merger (I don't know who exactly I could ask in particular for this) do whatever needs to be done so this PR can be merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…og windows when cable is not connected Made to replicate the Expected Result from Server '03
acae487
to
ca1b2fb
Compare
Sorry, I realised I missed a few steps when I was changing my git name to my full name and ammending it to the PR 😅 |
Purpose
Prevents the Icon from opening up more than one window + Changes the window that's opened from the Connection Properties dialog to the Network Connections Folder (like in Server '03, which is the expected result as per the JIRA issue).
JIRA issue: CORE-19562
Proposed changes