Added avatar full name to the window header - base and Windows platform (still needs Mac and Linux)
parent
e8b829058b
commit
f4e30cccd8
|
|
@ -162,6 +162,10 @@ public:
|
|||
// Provide native key event data
|
||||
virtual LLSD getNativeKeyData() { return LLSD::emptyMap(); }
|
||||
|
||||
//-TT Window Title Access
|
||||
//this needs to be overridden for all platforms
|
||||
virtual void setTitle(const std::string& win_title) {};
|
||||
//-TT
|
||||
protected:
|
||||
LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags);
|
||||
virtual ~LLWindow();
|
||||
|
|
|
|||
|
|
@ -2853,6 +2853,23 @@ void LLWindowWin32::swapBuffers()
|
|||
SwapBuffers(mhDC);
|
||||
}
|
||||
|
||||
//-TT Window Title Access
|
||||
void LLWindowWin32::setTitle(const std::string& win_title)
|
||||
{
|
||||
// Set the window title
|
||||
if (win_title.empty())
|
||||
{
|
||||
wsprintf(mWindowTitle, L"OpenGL Window");
|
||||
}
|
||||
else
|
||||
{
|
||||
mbstowcs(mWindowTitle, win_title.c_str(), 255);
|
||||
mWindowTitle[255] = 0;
|
||||
}
|
||||
|
||||
SetWindowText(mWindowHandle, mWindowTitle);
|
||||
}
|
||||
//-TT
|
||||
|
||||
//
|
||||
// LLSplashScreenImp
|
||||
|
|
|
|||
|
|
@ -111,6 +111,9 @@ public:
|
|||
/*virtual*/ void spawnWebBrowser(const std::string& escaped_url, bool async);
|
||||
void openFile(const std::string& file_name);
|
||||
|
||||
//-TT Window Title Access
|
||||
/*virtual*/ void setTitle(const std::string& win_title);
|
||||
//-TT
|
||||
LLWindowCallbacks::DragNDropResult completeDragNDropRequest( const LLCoordGL gl_coord, const MASK mask, LLWindowCallbacks::DragNDropAction action, const std::string url );
|
||||
|
||||
static std::vector<std::string> getDynamicFallbackFontList();
|
||||
|
|
|
|||
|
|
@ -2351,7 +2351,8 @@ bool LLAppViewer::initConfiguration()
|
|||
//
|
||||
// Set the name of the window
|
||||
//
|
||||
gWindowTitle = llformat("Phoenix %s v%d.%d.%d.%d",LL_CHANNEL, LL_VERSION_MAJOR, LL_VERSION_MINOR, LL_VERSION_PATCH, LL_VERSION_BUILD) ;
|
||||
gWindowTitle = llformat("Phoenix %s v%d.%d.%d.%d",LL_CHANNEL, LL_VERSION_MAJOR, LL_VERSION_MINOR,
|
||||
LL_VERSION_PATCH, LL_VERSION_BUILD) ;
|
||||
#if LL_DEBUG
|
||||
gWindowTitle += std::string(" [DEBUG] ") + gArgs;
|
||||
#else
|
||||
|
|
@ -4590,6 +4591,11 @@ void LLAppViewer::handleLoginComplete()
|
|||
|
||||
mOnLoginCompleted();
|
||||
|
||||
//-TT Window Title Access
|
||||
gWindowTitle += std::string(" - ") + gAgentAvatarp->getFullname();
|
||||
gViewerWindow->setTitle(gWindowTitle);
|
||||
//-TT
|
||||
|
||||
writeDebugInfo();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2184,6 +2184,14 @@ void LLViewerWindow::draw()
|
|||
//#endif
|
||||
}
|
||||
|
||||
|
||||
//-TT Window Title Access
|
||||
void LLViewerWindow::setTitle(const std::string& win_title)
|
||||
{
|
||||
mWindow->setTitle(win_title);
|
||||
}
|
||||
//-TT
|
||||
|
||||
// Takes a single keydown event, usually when UI is visible
|
||||
BOOL LLViewerWindow::handleKey(KEY key, MASK mask)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -379,6 +379,9 @@ public:
|
|||
const LLVector2& getDisplayScale() const { return mDisplayScale; }
|
||||
void calcDisplayScale();
|
||||
static LLRect calcScaledRect(const LLRect & rect, const LLVector2& display_scale);
|
||||
//-TT Window Title Access
|
||||
void setTitle(const std::string& win_title);
|
||||
//-TT
|
||||
|
||||
private:
|
||||
bool shouldShowToolTipFor(LLMouseHandler *mh);
|
||||
|
|
|
|||
Loading…
Reference in New Issue