Make unread IM counter in application window title optional

meow-7.2.2
Ansariel 2015-10-20 09:52:16 +02:00
parent 214414fe28
commit 524e7cc347
5 changed files with 40 additions and 16 deletions

View File

@ -23682,6 +23682,17 @@ Change of this parameter will affect the layout of buttons in notification toast
<key>Value</key>
<integer>0</integer>
</map>
<key>FSShowMessageCountInWindowTitle</key>
<map>
<key>Comment</key>
<string>Displays the number of unread IMs in the application window title.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
</map>
</llsd>

View File

@ -199,6 +199,8 @@ LLIMWellChiclet::LLIMWellChiclet(const Params& p)
LLIMMgr::getInstance()->addSessionObserver(this);
LLIMWellWindow::getInstance()->setSysWellChiclet(this);
gSavedSettings.getControl("FSShowMessageCountInWindowTitle")->getSignal()->connect(boost::bind(&LLIMWellChiclet::updateApplicationWindowTitle, this));
}
LLIMWellChiclet::~LLIMWellChiclet()
@ -281,25 +283,22 @@ void LLIMWellChiclet::messageCountChanged(const LLSD& session_data)
mFlashToLitTimer->stopFlashing();
}
// <FS:PP> Unread IMs counter in window title
std::string window_title;
if (counter > 99)
setCounter(counter);
updateApplicationWindowTitle();
}
void LLIMWellChiclet::updateApplicationWindowTitle()
{
std::string window_title = gWindowTitle;
if (gSavedSettings.getBOOL("FSShowMessageCountInWindowTitle") && mCounter > 0)
{
window_title = "(99+) " + gWindowTitle;
}
else if (counter > 0)
{
window_title = "(" + llformat("%d", counter) + ") " + gWindowTitle;
}
else
{
window_title = gWindowTitle;
window_title = "(" + mButton->getLabelUnselected() + ") " + gWindowTitle;
}
LLStringUtil::truncate(window_title, 255);
gViewerWindow->getWindow()->setTitle(window_title);
// </FS:PP>
setCounter(counter);
}
// </FS:Ansariel> [FS communication UI]

View File

@ -986,6 +986,8 @@ protected:
* @see LLIMMgr::getNumberOfUnreadParticipantMessages()
*/
void messageCountChanged(const LLSD& session_data);
void updateApplicationWindowTitle();
};
// </FS:Ansariel> [FS communication UI]

View File

@ -180,6 +180,7 @@
IM-Text vor dem Hintergrund des Chatverlaufs ausblenden
</text>
<spinner tool_tip="0.25-1.0, 0.25 für maximales Ausblenden für 1 für kein Ausblenden" name="FSIMChatHistoryFade"/>
<check_box name="FSShowMessageCountInWindowTitle" label="Anzahl ungelesener Instant Messages im Fenstertitel von Firestorm anzeigen"/>
<check_box name="FSAnnounceIncomingIM" label="Eingehende Instant Messages ankünden sobald Sender zu schreiben beginnt"/>
<check_box name="FSIMChatFlashOnFriendStatusChange" label="Blinkende IM-Reiter, wenn Freunde sich an- oder abmelden"/>
<check_box name="FSNotifyNearbyChatFlash" label="Blinkender Chat-Toolbar-Button, wenn neuer Chat in der Nähe eintrifft" tool_tip="Der Chat-Button in der Toolbar blinkt, wenn ein neuer Chat in der Nähe eintrifft. Das Fenster vom Chat in der Nähe muss im Gespräche-Fenster eingedockt sein und das Gespräche-Fenster darf nicht sichtbar sein, damit der Button blinkt."/>

View File

@ -1133,9 +1133,20 @@
left="20"
width="400"
height="18"
name="FSShowMessageCountInWindowTitle"
control_name="FSShowMessageCountInWindowTitle"
label="Show number of unread IMs in Firestorm's window title"/>
<check_box
layout="topleft"
follows="left|top"
top_pad="-1"
left="20"
width="400"
height="18"
name="FSAnnounceIncomingIM"
control_name="FSAnnounceIncomingIM"
label="Announces incoming IMs as soon as the sender starts typing"/>
label="Announce incoming IMs as soon as the sender starts typing"/>
<check_box
layout="topleft"