Append username to window title upon connecting to grid.
This commit is contained in:
@@ -171,6 +171,8 @@ public:
|
||||
// Provide native key event data
|
||||
virtual LLSD getNativeKeyData() { return LLSD::emptyMap(); }
|
||||
|
||||
virtual void setTitle(const std::string &title){};
|
||||
|
||||
protected:
|
||||
LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags);
|
||||
virtual ~LLWindow();
|
||||
|
||||
@@ -3272,6 +3272,15 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
}
|
||||
}
|
||||
|
||||
void LLWindowMacOSX::setTitle(const std::string &title)
|
||||
{
|
||||
/*strncpy((char*)mWindowTitle + 1, title.c_str(), 253);
|
||||
mWindowTitle[0] = title.length();*/
|
||||
|
||||
CFStringRef title_str = CFStringCreateWithCString(NULL, title.c_str(), kCFStringEncodingUTF8);
|
||||
SetWindowTitleWithCFString(mWindow, title_str);
|
||||
}
|
||||
|
||||
LLSD LLWindowMacOSX::getNativeKeyData()
|
||||
{
|
||||
LLSD result = LLSD::emptyMap();
|
||||
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
/*virtual*/ void interruptLanguageTextInput();
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
/*virtual*/ void setTitle(const std::string &title);
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
// Provide native key event data
|
||||
|
||||
@@ -2514,6 +2514,11 @@ void LLWindowSDL::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
llinfos << "spawn_web_browser returning." << llendl;
|
||||
}
|
||||
|
||||
void LLWindowSDL::setTitle(const std::string &title)
|
||||
{
|
||||
mWindowTitle = title;
|
||||
SDL_WM_SetCaption(mWindowTitle.c_str(),mWindowTitle.c_str());
|
||||
}
|
||||
|
||||
void *LLWindowSDL::getPlatformWindow()
|
||||
{
|
||||
|
||||
@@ -127,6 +127,8 @@ public:
|
||||
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
/*virtual*/ void setTitle(const std::string &title);
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
// Not great that these are public, but they have to be accessible
|
||||
|
||||
@@ -3140,6 +3140,14 @@ void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url, bool async)
|
||||
ShellExecuteEx( &sei );
|
||||
}
|
||||
|
||||
void LLWindowWin32::setTitle(const std::string &title)
|
||||
{
|
||||
mbstowcs(mWindowTitle, title.c_str(), 255);
|
||||
mWindowTitle[255] = 0;
|
||||
|
||||
SetWindowText(mWindowHandle, mWindowTitle);
|
||||
}
|
||||
|
||||
/*
|
||||
Make the raw keyboard data available - used to poke through to LLQtWebKit so
|
||||
that Qt/Webkit has access to the virtual keycodes etc. that it needs
|
||||
|
||||
@@ -117,6 +117,8 @@ public:
|
||||
void ShellEx(const std::string& command);
|
||||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
|
||||
/*virtual*/ void setTitle(const std::string &title);
|
||||
|
||||
LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url );
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
||||
@@ -1886,6 +1886,12 @@ bool idle_startup()
|
||||
// OGPX : Inventory root might be null in OGP.
|
||||
// && gAgent.mInventoryRootID.notNull())
|
||||
{
|
||||
std::string name = firstname;
|
||||
std::string last_name = lastname;
|
||||
LLStringUtil::toLower(last_name);
|
||||
if(last_name != "resident")
|
||||
name += " " + lastname;
|
||||
gViewerWindow->getWindow()->setTitle(LLAppViewer::instance()->getWindowTitle() + "- " + name);
|
||||
LLStartUp::setStartupState( STATE_WORLD_INIT );
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user