From: Alex Henrie alexhenrie24@gmail.com
At the same time, rename the variable from desktop_nameW to desktop_titleW to avoid confusion with the configurable name of the desktop. --- programs/explorer/desktop.c | 16 +++++++++------- programs/explorer/explorer.rc | 1 + programs/explorer/resource.h | 1 + 3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 8bed403ac4e..9f3170a844e 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -32,6 +32,7 @@
#include "wine/debug.h" #include "explorer_private.h" +#include "resource.h"
WINE_DEFAULT_DEBUG_CHANNEL(explorer);
@@ -1097,30 +1098,31 @@ static void initialize_display_settings( unsigned int width, unsigned int height
static void set_desktop_window_title( HWND hwnd, const WCHAR *name ) { - static const WCHAR desktop_nameW[] = L"Wine desktop"; static const WCHAR desktop_name_separatorW[] = L" - "; + WCHAR desktop_titleW[64]; WCHAR *window_titleW = NULL; int window_title_len;
+ LoadStringW( NULL, IDS_DESKTOP_TITLE, desktop_titleW, ARRAY_SIZE(desktop_titleW) ); + if (!name[0]) { - SetWindowTextW( hwnd, desktop_nameW ); + SetWindowTextW( hwnd, desktop_titleW ); return; }
- window_title_len = lstrlenW(name) * sizeof(WCHAR) - + sizeof(desktop_name_separatorW) - + sizeof(desktop_nameW); + window_title_len = (wcslen(name) + wcslen(desktop_titleW)) * sizeof(WCHAR) + + sizeof(desktop_name_separatorW); window_titleW = malloc( window_title_len ); if (!window_titleW) { - SetWindowTextW( hwnd, desktop_nameW ); + SetWindowTextW( hwnd, desktop_titleW ); return; }
lstrcpyW( window_titleW, name ); lstrcatW( window_titleW, desktop_name_separatorW ); - lstrcatW( window_titleW, desktop_nameW ); + lstrcatW( window_titleW, desktop_titleW );
SetWindowTextW( hwnd, window_titleW ); free( window_titleW ); diff --git a/programs/explorer/explorer.rc b/programs/explorer/explorer.rc index 1f496f7248c..e932a6080bd 100644 --- a/programs/explorer/explorer.rc +++ b/programs/explorer/explorer.rc @@ -34,6 +34,7 @@ STRINGTABLE IDS_RUN "&Run..." IDS_EXIT_LABEL "E&xit desktop" IDS_EXIT_PROMPT "Are you sure you want to close all programs and exit the virtual desktop?" + IDS_DESKTOP_TITLE "Wine Desktop" }
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL diff --git a/programs/explorer/resource.h b/programs/explorer/resource.h index 8ce62cbe962..e3bf993915b 100644 --- a/programs/explorer/resource.h +++ b/programs/explorer/resource.h @@ -27,5 +27,6 @@ #define IDS_RUN 4 #define IDS_EXIT_LABEL 5 #define IDS_EXIT_PROMPT 6 +#define IDS_DESKTOP_TITLE 7
#endif
From: Alex Henrie alexhenrie24@gmail.com
When you click "Emulate a virtual desktop" in winecfg, it creates a desktop named "Default". The name "Default" should not be displayed to the user for two reasons: First, it clutters the user interface with useless information, and second, it is always in English and is not translatable. --- programs/explorer/desktop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/programs/explorer/desktop.c b/programs/explorer/desktop.c index 9f3170a844e..8ff3d412b2b 100644 --- a/programs/explorer/desktop.c +++ b/programs/explorer/desktop.c @@ -1105,7 +1105,7 @@ static void set_desktop_window_title( HWND hwnd, const WCHAR *name )
LoadStringW( NULL, IDS_DESKTOP_TITLE, desktop_titleW, ARRAY_SIZE(desktop_titleW) );
- if (!name[0]) + if (!name[0] || !wcscmp( name, L"Default" )) { SetWindowTextW( hwnd, desktop_titleW ); return;
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=148045
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0005 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got winevent_hook 0x0003 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x030f instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x001c instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0086 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got msg 0x0006 instead msg.c:6935: Test failed: SetFocus(hwnd) on a button: 3: the winevent_hook 0x8005 was expected, but got hook 0x0009 instead