aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--linden/indra/llwindow/llwindow.h1
-rw-r--r--linden/indra/llwindow/llwindowheadless.h1
-rw-r--r--linden/indra/llwindow/llwindowmacosx.cpp6
-rw-r--r--linden/indra/llwindow/llwindowmacosx.h1
-rw-r--r--linden/indra/llwindow/llwindowmesaheadless.h1
-rw-r--r--linden/indra/llwindow/llwindowsdl.cpp5
-rw-r--r--linden/indra/llwindow/llwindowsdl.h1
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp11
-rw-r--r--linden/indra/llwindow/llwindowwin32.h1
-rw-r--r--linden/indra/newview/llappviewer.cpp6
-rw-r--r--linden/indra/newview/llstartup.cpp10
11 files changed, 41 insertions, 3 deletions
diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h
index a649766..14759cc 100644
--- a/linden/indra/llwindow/llwindow.h
+++ b/linden/indra/llwindow/llwindow.h
@@ -107,6 +107,7 @@ public:
107 // currently unused 107 // currently unused
108 }; 108 };
109public: 109public:
110 virtual void setWindowTitle(std::string &title) {} ;
110 virtual void show() = 0; 111 virtual void show() = 0;
111 virtual void hide() = 0; 112 virtual void hide() = 0;
112 virtual void close() = 0; 113 virtual void close() = 0;
diff --git a/linden/indra/llwindow/llwindowheadless.h b/linden/indra/llwindow/llwindowheadless.h
index 4353d15..e33637d 100644
--- a/linden/indra/llwindow/llwindowheadless.h
+++ b/linden/indra/llwindow/llwindowheadless.h
@@ -38,6 +38,7 @@
38class LLWindowHeadless : public LLWindow 38class LLWindowHeadless : public LLWindow
39{ 39{
40public: 40public:
41 /*virtual*/ void setWindowTitle(std::string &title) {};
41 /*virtual*/ void show() {}; 42 /*virtual*/ void show() {};
42 /*virtual*/ void hide() {}; 43 /*virtual*/ void hide() {};
43 /*virtual*/ void close() {}; 44 /*virtual*/ void close() {};
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp
index 4f6df0f..ad99813 100644
--- a/linden/indra/llwindow/llwindowmacosx.cpp
+++ b/linden/indra/llwindow/llwindowmacosx.cpp
@@ -318,6 +318,12 @@ LLWindowMacOSX::LLWindowMacOSX(const std::string& title, const std::string& name
318 stop_glerror(); 318 stop_glerror();
319} 319}
320 320
321void LLWindowSDL::setWindowTitle(std::string &title)
322{
323 CFStringRef string = CFStringCreateWithCString(NULL, title.c_str(), kCFStringEncodingUTF8);
324 SetWindowTitleWithCFString(mWindow, string);
325}
326
321BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) 327BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync)
322{ 328{
323 OSStatus err; 329 OSStatus err;
diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h
index 3886782..bf5bfc0 100644
--- a/linden/indra/llwindow/llwindowmacosx.h
+++ b/linden/indra/llwindow/llwindowmacosx.h
@@ -47,6 +47,7 @@
47class LLWindowMacOSX : public LLWindow 47class LLWindowMacOSX : public LLWindow
48{ 48{
49public: 49public:
50 /*virtual*/ void setWindowTitle(std::string &title);
50 /*virtual*/ void show(); 51 /*virtual*/ void show();
51 /*virtual*/ void hide(); 52 /*virtual*/ void hide();
52 /*virtual*/ void close(); 53 /*virtual*/ void close();
diff --git a/linden/indra/llwindow/llwindowmesaheadless.h b/linden/indra/llwindow/llwindowmesaheadless.h
index ab562d9..d3c2b1d 100644
--- a/linden/indra/llwindow/llwindowmesaheadless.h
+++ b/linden/indra/llwindow/llwindowmesaheadless.h
@@ -42,6 +42,7 @@
42class LLWindowMesaHeadless : public LLWindow 42class LLWindowMesaHeadless : public LLWindow
43{ 43{
44public: 44public:
45 /*virtual*/ void setWindowTitle(std::string &title) {};
45 /*virtual*/ void show() {}; 46 /*virtual*/ void show() {};
46 /*virtual*/ void hide() {}; 47 /*virtual*/ void hide() {};
47 /*virtual*/ void close() {}; 48 /*virtual*/ void close() {};
diff --git a/linden/indra/llwindow/llwindowsdl.cpp b/linden/indra/llwindow/llwindowsdl.cpp
index 61ef01d..bf339f2 100644
--- a/linden/indra/llwindow/llwindowsdl.cpp
+++ b/linden/indra/llwindow/llwindowsdl.cpp
@@ -414,6 +414,11 @@ static int x11_detect_VRAM_kb()
414} 414}
415#endif // LL_X11 415#endif // LL_X11
416 416
417void LLWindowSDL::setWindowTitle(std::string &title)
418{
419 SDL_WM_SetCaption(title.c_str(), title.c_str());
420}
421
417BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) 422BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync)
418{ 423{
419 //bool glneedsinit = false; 424 //bool glneedsinit = false;
diff --git a/linden/indra/llwindow/llwindowsdl.h b/linden/indra/llwindow/llwindowsdl.h
index 632d8fc..39a6007 100644
--- a/linden/indra/llwindow/llwindowsdl.h
+++ b/linden/indra/llwindow/llwindowsdl.h
@@ -54,6 +54,7 @@
54class LLWindowSDL : public LLWindow 54class LLWindowSDL : public LLWindow
55{ 55{
56public: 56public:
57 /*virtual*/ void setWindowTitle(std::string &title);
57 /*virtual*/ void show(); 58 /*virtual*/ void show();
58 /*virtual*/ void hide(); 59 /*virtual*/ void hide();
59 /*virtual*/ void close(); 60 /*virtual*/ void close();
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index b2826c8..e47cab4 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -622,6 +622,17 @@ LLWindowWin32::~LLWindowWin32()
622 mWindowClassName = NULL; 622 mWindowClassName = NULL;
623} 623}
624 624
625void LLWindowWin32::setWindowTitle(std::string &title)
626{
627 int len = title.size() + 1;
628 wchar_t *wText = new wchar_t[len];
629 if (wText == 0) return;
630 memset(wText, 0, len);
631 MultiByteToWideChar(CP_ACP, NULL, title.c_str(), -1, wText, len);
632 SetWindowText(mWindowHandle, wText);
633 delete [] wText;
634}
635
625void LLWindowWin32::show() 636void LLWindowWin32::show()
626{ 637{
627 ShowWindow(mWindowHandle, SW_SHOW); 638 ShowWindow(mWindowHandle, SW_SHOW);
diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h
index d3ae325..cc95993 100644
--- a/linden/indra/llwindow/llwindowwin32.h
+++ b/linden/indra/llwindow/llwindowwin32.h
@@ -47,6 +47,7 @@ typedef void (*LLW32MsgCallback)(const MSG &msg);
47class LLWindowWin32 : public LLWindow 47class LLWindowWin32 : public LLWindow
48{ 48{
49public: 49public:
50 /*virtual*/ void setWindowTitle(std::string &title);
50 /*virtual*/ void show(); 51 /*virtual*/ void show();
51 /*virtual*/ void hide(); 52 /*virtual*/ void hide();
52 /*virtual*/ void close(); 53 /*virtual*/ void close();
diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp
index b8d0d14..35e7a46 100644
--- a/linden/indra/newview/llappviewer.cpp
+++ b/linden/indra/newview/llappviewer.cpp
@@ -235,6 +235,9 @@ BOOL gUseQuickTime = TRUE;
235BOOL gAcceptTOS = FALSE; 235BOOL gAcceptTOS = FALSE;
236BOOL gAcceptCriticalMessage = FALSE; 236BOOL gAcceptCriticalMessage = FALSE;
237 237
238std::string gSecondLife;
239std::string gWindowTitle;
240
238eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; 241eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL;
239 242
240LLSD gDebugInfo; 243LLSD gDebugInfo;
@@ -314,9 +317,6 @@ const char* const VIEWER_WINDOW_CLASSNAME = "Imprudence";
314const char *VFS_DATA_FILE_BASE = "data.db2.x."; 317const char *VFS_DATA_FILE_BASE = "data.db2.x.";
315const char *VFS_INDEX_FILE_BASE = "index.db2.x."; 318const char *VFS_INDEX_FILE_BASE = "index.db2.x.";
316 319
317static std::string gSecondLife;
318static std::string gWindowTitle;
319
320std::string gLoginPage; 320std::string gLoginPage;
321std::vector<std::string> gLoginURIs; 321std::vector<std::string> gLoginURIs;
322static std::string gHelperURI; 322static std::string gHelperURI;
diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp
index 4cb7061..82b950e 100644
--- a/linden/indra/newview/llstartup.cpp
+++ b/linden/indra/newview/llstartup.cpp
@@ -214,6 +214,8 @@ std::string SCREEN_LAST_FILENAME = "screen_last.bmp";
214// 214//
215extern S32 gStartImageWidth; 215extern S32 gStartImageWidth;
216extern S32 gStartImageHeight; 216extern S32 gStartImageHeight;
217extern std::string gSecondLife;
218extern std::string gWindowTitle;
217 219
218// 220//
219// local globals 221// local globals
@@ -2144,6 +2146,14 @@ bool idle_startup()
2144 { 2146 {
2145 LL_DEBUGS("AppInitStartupState") << "STATE_INVENTORY_SEND" << LL_ENDL; 2147 LL_DEBUGS("AppInitStartupState") << "STATE_INVENTORY_SEND" << LL_ENDL;
2146 2148
2149 // Change the window title to include the avatar name if we're using multiple viewers -- MC
2150 if (gSavedSettings.getBOOL("AllowMultipleViewers"))
2151 {
2152 gWindowTitle = gSecondLife + " - " + firstname + " " + lastname;
2153 LLStringUtil::truncate(gWindowTitle, 255);
2154 gViewerWindow->getWindow()->setWindowTitle(gWindowTitle);
2155 }
2156
2147 // unpack thin inventory 2157 // unpack thin inventory
2148 LLUserAuth::options_t options; 2158 LLUserAuth::options_t options;
2149 options.clear(); 2159 options.clear();