[vbox-dev] Patch - VBoxSDL Window title
Udi Schneider
udisch at gmail.com
Tue Feb 9 14:21:34 PST 2010
Hello,
Included is a patch I wrote for the following bug:
http://www.virtualbox.org/ticket/3331
This is my first time submitting a patch, so I focused on
a trivial problem. Any feedback will be welcome, and I
understand it might take time to get reviewed.
The VBoxSDL console currently displays the working VM name after
the string "Sun VirtualBox", which makes it hard to view when the window
is minimized. I replaced the order, and also modified
the SDL call under Linux, where the minimized window text
omitted the VM name completely.
I Tested the patch on Ubuntu 9.10.
Submitted under the MIT license.
Thanks,
Udi
Index: src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp
===================================================================
--- src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp (revision 26385)
+++ src/VBox/Frontends/VBoxSDL/VBoxSDL.cpp (working copy)
@@ -4238,9 +4238,9 @@
char szPrevTitle[1024];
strcpy(szPrevTitle, szTitle);
+ /* clear current title */
+ strcpy(szTitle, "");
- strcpy(szTitle, VBOX_PRODUCT " - ");
-
Bstr name;
gMachine->COMGETTER(Name)(name.asOutParam());
if (name)
@@ -4359,6 +4359,8 @@
return;
}
+ RTStrPrintf(szTitle + strlen(szTitle), sizeof(szTitle) -
strlen(szTitle), " - " VBOX_PRODUCT);
+
/*
* Don't update if it didn't change.
*/
@@ -4371,7 +4373,7 @@
#ifdef VBOX_WIN32_UI
setUITitle(szTitle);
#else
- SDL_WM_SetCaption(szTitle, VBOX_PRODUCT);
+ SDL_WM_SetCaption(szTitle, szTitle);
#endif
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100210/49269fdb/attachment-0001.html
More information about the vbox-dev
mailing list