diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llwindow/llwindow.h | 1 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowheadless.h | 1 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.cpp | 6 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowmacosx.h | 1 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowmesaheadless.h | 1 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.cpp | 5 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowsdl.h | 1 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.cpp | 11 | ||||
-rw-r--r-- | linden/indra/llwindow/llwindowwin32.h | 1 | ||||
-rw-r--r-- | linden/indra/newview/llappviewer.cpp | 6 | ||||
-rw-r--r-- | linden/indra/newview/llstartup.cpp | 10 |
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 | }; |
109 | public: | 109 | public: |
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 @@ | |||
38 | class LLWindowHeadless : public LLWindow | 38 | class LLWindowHeadless : public LLWindow |
39 | { | 39 | { |
40 | public: | 40 | public: |
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 | ||
321 | void LLWindowSDL::setWindowTitle(std::string &title) | ||
322 | { | ||
323 | CFStringRef string = CFStringCreateWithCString(NULL, title.c_str(), kCFStringEncodingUTF8); | ||
324 | SetWindowTitleWithCFString(mWindow, string); | ||
325 | } | ||
326 | |||
321 | BOOL LLWindowMacOSX::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) | 327 | BOOL 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 @@ | |||
47 | class LLWindowMacOSX : public LLWindow | 47 | class LLWindowMacOSX : public LLWindow |
48 | { | 48 | { |
49 | public: | 49 | public: |
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 @@ | |||
42 | class LLWindowMesaHeadless : public LLWindow | 42 | class LLWindowMesaHeadless : public LLWindow |
43 | { | 43 | { |
44 | public: | 44 | public: |
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 | ||
417 | void LLWindowSDL::setWindowTitle(std::string &title) | ||
418 | { | ||
419 | SDL_WM_SetCaption(title.c_str(), title.c_str()); | ||
420 | } | ||
421 | |||
417 | BOOL LLWindowSDL::createContext(int x, int y, int width, int height, int bits, BOOL fullscreen, BOOL disable_vsync) | 422 | BOOL 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 @@ | |||
54 | class LLWindowSDL : public LLWindow | 54 | class LLWindowSDL : public LLWindow |
55 | { | 55 | { |
56 | public: | 56 | public: |
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 | ||
625 | void 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 | |||
625 | void LLWindowWin32::show() | 636 | void 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); | |||
47 | class LLWindowWin32 : public LLWindow | 47 | class LLWindowWin32 : public LLWindow |
48 | { | 48 | { |
49 | public: | 49 | public: |
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; | |||
235 | BOOL gAcceptTOS = FALSE; | 235 | BOOL gAcceptTOS = FALSE; |
236 | BOOL gAcceptCriticalMessage = FALSE; | 236 | BOOL gAcceptCriticalMessage = FALSE; |
237 | 237 | ||
238 | std::string gSecondLife; | ||
239 | std::string gWindowTitle; | ||
240 | |||
238 | eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; | 241 | eLastExecEvent gLastExecEvent = LAST_EXEC_NORMAL; |
239 | 242 | ||
240 | LLSD gDebugInfo; | 243 | LLSD gDebugInfo; |
@@ -314,9 +317,6 @@ const char* const VIEWER_WINDOW_CLASSNAME = "Imprudence"; | |||
314 | const char *VFS_DATA_FILE_BASE = "data.db2.x."; | 317 | const char *VFS_DATA_FILE_BASE = "data.db2.x."; |
315 | const char *VFS_INDEX_FILE_BASE = "index.db2.x."; | 318 | const char *VFS_INDEX_FILE_BASE = "index.db2.x."; |
316 | 319 | ||
317 | static std::string gSecondLife; | ||
318 | static std::string gWindowTitle; | ||
319 | |||
320 | std::string gLoginPage; | 320 | std::string gLoginPage; |
321 | std::vector<std::string> gLoginURIs; | 321 | std::vector<std::string> gLoginURIs; |
322 | static std::string gHelperURI; | 322 | static 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 | // |
215 | extern S32 gStartImageWidth; | 215 | extern S32 gStartImageWidth; |
216 | extern S32 gStartImageHeight; | 216 | extern S32 gStartImageHeight; |
217 | extern std::string gSecondLife; | ||
218 | extern 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(); |