diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llappearance/llwearabledata.h | 2 | ||||
-rw-r--r-- | indra/llmessage/tests/test_llsdmessage_peer.py | 346 | ||||
-rw-r--r-- | indra/llui/lltabcontainer.cpp | 13 | ||||
-rw-r--r-- | indra/newview/llchathistory.cpp | 11 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.cpp | 62 | ||||
-rw-r--r-- | indra/newview/llfloaterimcontainer.h | 1 | ||||
-rw-r--r-- | indra/newview/llfloaterimnearbychat.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llfloaterimsession.cpp | 30 | ||||
-rw-r--r-- | indra/newview/llfloaterimsession.h | 2 | ||||
-rw-r--r-- | indra/newview/llimview.cpp | 17 | ||||
-rw-r--r-- | indra/newview/llviewermenu.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewertexture.cpp | 4 | ||||
-rwxr-xr-x | indra/newview/llvoavatar.cpp | 4 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_im_session.xml | 62 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_login.xml | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 11 |
16 files changed, 335 insertions, 251 deletions
diff --git a/indra/llappearance/llwearabledata.h b/indra/llappearance/llwearabledata.h index 3e92f2ead8..03bd179f25 100644 --- a/indra/llappearance/llwearabledata.h +++ b/indra/llappearance/llwearabledata.h @@ -2,7 +2,7 @@ * @file llwearabledata.h * @brief LLWearableData class header file * - * $LicenseInfo:firstyear=20012license=viewerlgpl$ + * $LicenseInfo:firstyear=2012&license=viewerlgpl$ * Second Life Viewer Source Code * Copyright (C) 2010, Linden Research, Inc. * diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index b59c5a06cd..e45249b1cb 100644 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -1,173 +1,173 @@ -#!/usr/bin/env python
-"""\
-@file test_llsdmessage_peer.py
-@author Nat Goodspeed
-@date 2008-10-09
-@brief This script asynchronously runs the executable (with args) specified on
- the command line, returning its result code. While that executable is
- running, we provide dummy local services for use by C++ tests.
-
-$LicenseInfo:firstyear=2008&license=viewerlgpl$
-Second Life Viewer Source Code
-Copyright (C) 2010, Linden Research, Inc.
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation;
-version 2.1 of the License only.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-
-Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
-$/LicenseInfo$
-"""
-
-import os
-import sys
-from threading import Thread
-from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
-
-mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tests/
-sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
-from indra.util.fastest_elementtree import parse as xml_parse
-from indra.base import llsd
-from testrunner import freeport, run, debug, VERBOSE
-import time
-
-_storage=None
-
-class TestHTTPRequestHandler(BaseHTTPRequestHandler):
- """This subclass of BaseHTTPRequestHandler is to receive and echo
- LLSD-flavored messages sent by the C++ LLHTTPClient.
- """
- def read(self):
- # The following logic is adapted from the library module
- # SimpleXMLRPCServer.py.
- # Get arguments by reading body of request.
- # We read this in chunks to avoid straining
- # socket.read(); around the 10 or 15Mb mark, some platforms
- # begin to have problems (bug #792570).
- try:
- size_remaining = int(self.headers["content-length"])
- except (KeyError, ValueError):
- return ""
- max_chunk_size = 10*1024*1024
- L = []
- while size_remaining:
- chunk_size = min(size_remaining, max_chunk_size)
- chunk = self.rfile.read(chunk_size)
- L.append(chunk)
- size_remaining -= len(chunk)
- return ''.join(L)
- # end of swiped read() logic
-
- def read_xml(self):
- # This approach reads the entire POST data into memory first
- return llsd.parse(self.read())
-## # This approach attempts to stream in the LLSD XML from self.rfile,
-## # assuming that the underlying XML parser reads its input file
-## # incrementally. Unfortunately I haven't been able to make it work.
-## tree = xml_parse(self.rfile)
-## debug("Finished raw parse")
-## debug("parsed XML tree %s", tree)
-## debug("parsed root node %s", tree.getroot())
-## debug("root node tag %s", tree.getroot().tag)
-## return llsd.to_python(tree.getroot())
-
- def do_HEAD(self):
- self.do_GET(withdata=False)
-
- def do_GET(self, withdata=True):
- # Of course, don't attempt to read data.
- data = dict(reply="success", body="avatar", random=17)
- self.answer(data, withdata=withdata)
-
- def do_POST(self):
- # Read the provided POST data.
- self.answer(self.read_xml())
-
- def do_PUT(self):
- # Read the provided PUT data.
- self.answer(self.read_xml())
-
- def answer(self, data, withdata=True):
- global _storage
- debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path)
- if "fail" in self.path or "test/error" in self.path: # fail requested
- status = data.get("status", 500)
- # self.responses maps an int status to a (short, long) pair of
- # strings. We want the longer string. That's why we pass a string
- # pair to get(): the [1] will select the second string, whether it
- # came from self.responses or from our default pair.
- reason = data.get("reason",
- self.responses.get(status,
- ("fail requested",
- "Your request specified failure status %s "
- "without providing a reason" % status))[1])
- debug("fail requested: %s: %r", status, reason)
- self.send_error(status, reason)
- else:
- if "web/echo" in self.path:
- pass
- elif "test/timeout" in self.path:
- time.sleep(5.0)
- return
- elif "test/storage" in self.path:
- if "GET" == self.command:
- data = _storage
- else:
- _storage = data
- data = "ok"
- else:
- data = data.copy() # we're going to modify
- # Ensure there's a "reply" key in data, even if there wasn't before
- data["reply"] = data.get("reply", llsd.LLSD("success"))
- response = llsd.format_xml(data)
- debug("success: %s", response)
- self.send_response(200)
- self.send_header("Content-type", "application/llsd+xml")
- self.send_header("Content-Length", str(len(response)))
- self.end_headers()
- if withdata:
- self.wfile.write(response)
-
- if not VERBOSE:
- # When VERBOSE is set, skip both these overrides because they exist to
- # suppress output.
-
- def log_request(self, code, size=None):
- # For present purposes, we don't want the request splattered onto
- # stderr, as it would upset devs watching the test run
- pass
-
- def log_error(self, format, *args):
- # Suppress error output as well
- pass
-
-class Server(HTTPServer):
- # This pernicious flag is on by default in HTTPServer. But proper
- # operation of freeport() absolutely depends on it being off.
- allow_reuse_address = False
-
-if __name__ == "__main__":
- # Instantiate a Server(TestHTTPRequestHandler) on the first free port
- # in the specified port range. Doing this inline is better than in a
- # daemon thread: if it blows up here, we'll get a traceback. If it blew up
- # in some other thread, the traceback would get eaten and we'd run the
- # subject test program anyway.
- httpd, port = freeport(xrange(8000, 8020),
- lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler))
- # Pass the selected port number to the subject test program via the
- # environment. We don't want to impose requirements on the test program's
- # command-line parsing -- and anyway, for C++ integration tests, that's
- # performed in TUT code rather than our own.
- os.environ["PORT"] = str(port)
- debug("$PORT = %s", port)
- sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:]))
+#!/usr/bin/env python +"""\ +@file test_llsdmessage_peer.py +@author Nat Goodspeed +@date 2008-10-09 +@brief This script asynchronously runs the executable (with args) specified on + the command line, returning its result code. While that executable is + running, we provide dummy local services for use by C++ tests. + +$LicenseInfo:firstyear=2008&license=viewerlgpl$ +Second Life Viewer Source Code +Copyright (C) 2010, Linden Research, Inc. + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License only. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA +$/LicenseInfo$ +""" + +import os +import sys +from threading import Thread +from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler + +mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tests/ +sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python")) +from indra.util.fastest_elementtree import parse as xml_parse +from indra.base import llsd +from testrunner import freeport, run, debug, VERBOSE +import time + +_storage=None + +class TestHTTPRequestHandler(BaseHTTPRequestHandler): + """This subclass of BaseHTTPRequestHandler is to receive and echo + LLSD-flavored messages sent by the C++ LLHTTPClient. + """ + def read(self): + # The following logic is adapted from the library module + # SimpleXMLRPCServer.py. + # Get arguments by reading body of request. + # We read this in chunks to avoid straining + # socket.read(); around the 10 or 15Mb mark, some platforms + # begin to have problems (bug #792570). + try: + size_remaining = int(self.headers["content-length"]) + except (KeyError, ValueError): + return "" + max_chunk_size = 10*1024*1024 + L = [] + while size_remaining: + chunk_size = min(size_remaining, max_chunk_size) + chunk = self.rfile.read(chunk_size) + L.append(chunk) + size_remaining -= len(chunk) + return ''.join(L) + # end of swiped read() logic + + def read_xml(self): + # This approach reads the entire POST data into memory first + return llsd.parse(self.read()) +## # This approach attempts to stream in the LLSD XML from self.rfile, +## # assuming that the underlying XML parser reads its input file +## # incrementally. Unfortunately I haven't been able to make it work. +## tree = xml_parse(self.rfile) +## debug("Finished raw parse") +## debug("parsed XML tree %s", tree) +## debug("parsed root node %s", tree.getroot()) +## debug("root node tag %s", tree.getroot().tag) +## return llsd.to_python(tree.getroot()) + + def do_HEAD(self): + self.do_GET(withdata=False) + + def do_GET(self, withdata=True): + # Of course, don't attempt to read data. + data = dict(reply="success", body="avatar", random=17) + self.answer(data, withdata=withdata) + + def do_POST(self): + # Read the provided POST data. + self.answer(self.read_xml()) + + def do_PUT(self): + # Read the provided PUT data. + self.answer(self.read_xml()) + + def answer(self, data, withdata=True): + global _storage + debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path) + if "fail" in self.path or "test/error" in self.path: # fail requested + status = data.get("status", 500) + # self.responses maps an int status to a (short, long) pair of + # strings. We want the longer string. That's why we pass a string + # pair to get(): the [1] will select the second string, whether it + # came from self.responses or from our default pair. + reason = data.get("reason", + self.responses.get(status, + ("fail requested", + "Your request specified failure status %s " + "without providing a reason" % status))[1]) + debug("fail requested: %s: %r", status, reason) + self.send_error(status, reason) + else: + if "web/echo" in self.path: + pass + elif "test/timeout" in self.path: + time.sleep(5.0) + return + elif "test/storage" in self.path: + if "GET" == self.command: + data = _storage + else: + _storage = data + data = "ok" + else: + data = data.copy() # we're going to modify + # Ensure there's a "reply" key in data, even if there wasn't before + data["reply"] = data.get("reply", llsd.LLSD("success")) + response = llsd.format_xml(data) + debug("success: %s", response) + self.send_response(200) + self.send_header("Content-type", "application/llsd+xml") + self.send_header("Content-Length", str(len(response))) + self.end_headers() + if withdata: + self.wfile.write(response) + + if not VERBOSE: + # When VERBOSE is set, skip both these overrides because they exist to + # suppress output. + + def log_request(self, code, size=None): + # For present purposes, we don't want the request splattered onto + # stderr, as it would upset devs watching the test run + pass + + def log_error(self, format, *args): + # Suppress error output as well + pass + +class Server(HTTPServer): + # This pernicious flag is on by default in HTTPServer. But proper + # operation of freeport() absolutely depends on it being off. + allow_reuse_address = False + +if __name__ == "__main__": + # Instantiate a Server(TestHTTPRequestHandler) on the first free port + # in the specified port range. Doing this inline is better than in a + # daemon thread: if it blows up here, we'll get a traceback. If it blew up + # in some other thread, the traceback would get eaten and we'd run the + # subject test program anyway. + httpd, port = freeport(xrange(8000, 8020), + lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler)) + # Pass the selected port number to the subject test program via the + # environment. We don't want to impose requirements on the test program's + # command-line parsing -- and anyway, for C++ integration tests, that's + # performed in TUT code rather than our own. + os.environ["PORT"] = str(port) + debug("$PORT = %s", port) + sys.exit(run(server=Thread(name="httpd", target=httpd.serve_forever), *sys.argv[1:])) diff --git a/indra/llui/lltabcontainer.cpp b/indra/llui/lltabcontainer.cpp index 6f895ed939..fd98155704 100644 --- a/indra/llui/lltabcontainer.cpp +++ b/indra/llui/lltabcontainer.cpp @@ -1215,9 +1215,11 @@ void LLTabContainer::removeTabPanel(LLPanel* child) removeChild( tuple->mButton ); } delete tuple->mButton; + tuple->mButton = NULL; removeChild( tuple->mTabPanel ); // delete tuple->mTabPanel; + tuple->mTabPanel = NULL; mTabList.erase( iter ); delete tuple; @@ -1279,9 +1281,11 @@ void LLTabContainer::deleteAllTabs() removeChild( tuple->mButton ); delete tuple->mButton; + tuple->mButton = NULL; removeChild( tuple->mTabPanel ); // delete tuple->mTabPanel; + tuple->mTabPanel = NULL; } // Actually delete the tuples themselves @@ -1484,9 +1488,8 @@ BOOL LLTabContainer::setTab(S32 which) { LLTabTuple* tuple = *iter; BOOL is_selected = ( tuple == selected_tuple ); - // Although the selected tab must be complete, we may have hollow LLTabTuple tucked in the list - if (tuple->mButton) + if (tuple && tuple->mButton) { tuple->mButton->setUseEllipses(mUseTabEllipses); tuple->mButton->setHAlign(mFontHalign); @@ -1494,7 +1497,7 @@ BOOL LLTabContainer::setTab(S32 which) // RN: this limits tab-stops to active button only, which would require arrow keys to switch tabs tuple->mButton->setTabStop( is_selected ); } - if (tuple->mTabPanel) + if (tuple && tuple->mTabPanel) { tuple->mTabPanel->setVisible( is_selected ); //tuple->mTabPanel->setFocus(is_selected); // not clear that we want to do this here. @@ -1525,7 +1528,7 @@ BOOL LLTabContainer::setTab(S32 which) else { S32 available_width_with_arrows = getRect().getWidth() - mRightTabBtnOffset - 2 * (LLPANEL_BORDER_WIDTH + tabcntr_arrow_btn_size + tabcntr_arrow_btn_size + 1); - S32 running_tab_width = tuple->mButton->getRect().getWidth(); + S32 running_tab_width = (tuple && tuple->mButton ? tuple->mButton->getRect().getWidth() : 0); S32 j = i - 1; S32 min_scroll_pos = i; if (running_tab_width < available_width_with_arrows) @@ -1533,7 +1536,7 @@ BOOL LLTabContainer::setTab(S32 which) while (j >= 0) { LLTabTuple* other_tuple = getTab(j); - running_tab_width += other_tuple->mButton->getRect().getWidth(); + running_tab_width += (other_tuple && other_tuple->mButton ? other_tuple->mButton->getRect().getWidth() : 0); if (running_tab_width > available_width_with_arrows) { break; diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 53926c1fef..0f138873ac 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -408,16 +408,7 @@ public: S32 user_name_width = user_name_rect.getWidth(); S32 time_box_width = time_box->getRect().getWidth(); - if (time_box->getVisible() && user_name_width <= mMinUserNameWidth) - { - time_box->setVisible(FALSE); - - user_name_rect.mRight += time_box_width; - user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); - user_name->setRect(user_name_rect); - } - - if (!time_box->getVisible() && user_name_width > mMinUserNameWidth + time_box_width) + if (!time_box->getVisible() && user_name_width > mMinUserNameWidth) { user_name_rect.mRight -= time_box_width; user_name->reshape(user_name_rect.getWidth(), user_name_rect.getHeight()); diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index 7296ec3ced..58817485fb 100644 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -585,6 +585,28 @@ void LLFloaterIMContainer::returnFloaterToHost() floater->onTearOffClicked(); } +void LLFloaterIMContainer::setMinimized(BOOL b) +{ + bool was_minimized = isMinimized(); + LLMultiFloater::setMinimized(b); + + //Switching from minimized to un-minimized + if(was_minimized && !b) + { + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); + + if(session_floater && !session_floater->isTornOff()) + { + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(gAgent.isDoNotDisturb() && mSelectedSession.notNull()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSelectedSession); + } + } + } +} + void LLFloaterIMContainer::setVisible(BOOL visible) { LLFloaterIMNearbyChat* nearby_chat; if (visible) @@ -597,10 +619,21 @@ void LLFloaterIMContainer::setVisible(BOOL visible) // *TODO: find a way to move this to XML as a default panel or something like that LLSD name("nearby_chat"); LLFloaterReg::toggleInstanceOrBringToFront(name); - setSelectedSession(LLUUID(NULL)); + selectConversationPair(LLUUID(NULL), false, false); } openNearbyChat(); - selectConversationPair(getSelectedSession(), false, false); + flashConversationItemWidget(mSelectedSession,false); + + LLFloaterIMSessionTab* session_floater = LLFloaterIMSessionTab::findConversation(mSelectedSession); + if(session_floater && !session_floater->isMinimized()) + { + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(gAgent.isDoNotDisturb() && mSelectedSession.notNull()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSelectedSession); + } + } } nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat"); @@ -1389,13 +1422,6 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool widget->getParentFolder()->setSelection(widget, FALSE, FALSE); mConversationsRoot->scrollToShowSelection(); } - - //When in DND mode, remove stored IM notifications - //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal - if(gAgent.isDoNotDisturb() && session_id.notNull()) - { - LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, session_id); - } } /* floater processing */ @@ -1420,14 +1446,19 @@ BOOL LLFloaterIMContainer::selectConversationPair(const LLUUID& session_id, bool { showStub(true); } + + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(gAgent.isDoNotDisturb() && session_id.notNull()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, session_id); + } } // Set the focus on the selected floater - if (!session_floater->hasFocus()) + if (!session_floater->hasFocus() && !session_floater->isMinimized()) { - BOOL is_minimized = session_floater->isMinimized(); session_floater->setFocus(focus_floater); - session_floater->setMinimized(is_minimized); } } flashConversationItemWidget(session_id,false); @@ -1986,8 +2017,11 @@ void LLFloaterIMContainer::closeFloater(bool app_quitting/* = false*/) { // Always unminimize before trying to close. // Most of the time the user will never see this state. - setMinimized(FALSE); - + if(isMinimized()) + { + LLMultiFloater::setMinimized(FALSE); + } + LLFloater::closeFloater(app_quitting); } diff --git a/indra/newview/llfloaterimcontainer.h b/indra/newview/llfloaterimcontainer.h index 52b672241f..e39d20ec35 100644 --- a/indra/newview/llfloaterimcontainer.h +++ b/indra/newview/llfloaterimcontainer.h @@ -59,6 +59,7 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); /*virtual*/ void draw(); + /*virtual*/ void setMinimized(BOOL b); /*virtual*/ void setVisible(BOOL visible); /*virtual*/ void setVisibleAndFrontmost(BOOL take_focus=TRUE, const LLSD& key = LLSD()); /*virtual*/ void updateResizeLimits(); diff --git a/indra/newview/llfloaterimnearbychat.cpp b/indra/newview/llfloaterimnearbychat.cpp index d86e1b3fd7..49f36a2f32 100644 --- a/indra/newview/llfloaterimnearbychat.cpp +++ b/indra/newview/llfloaterimnearbychat.cpp @@ -264,7 +264,7 @@ void LLFloaterIMNearbyChat::setVisibleAndFrontmost(BOOL take_focus, const LLSD& if(!isTornOff() && matchesKey(key)) { - LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, false); + LLFloaterIMContainer::getInstance()->selectConversationPair(mSessionID, true, take_focus); } } @@ -328,7 +328,7 @@ void LLFloaterIMNearbyChat::onChatFontChange(LLFontGL* fontp) void LLFloaterIMNearbyChat::show() { openFloater(getKey()); - } +} bool LLFloaterIMNearbyChat::isChatVisible() const { diff --git a/indra/newview/llfloaterimsession.cpp b/indra/newview/llfloaterimsession.cpp index c536c50ae2..7b72c1e930 100644 --- a/indra/newview/llfloaterimsession.cpp +++ b/indra/newview/llfloaterimsession.cpp @@ -39,6 +39,7 @@ #include "llchannelmanager.h" #include "llchiclet.h" #include "llchicletbar.h" +#include "lldonotdisturbnotificationstorage.h" #include "llfloaterreg.h" #include "llfloateravatarpicker.h" #include "llfloaterimcontainer.h" // to replace separate IM Floaters with multifloater container @@ -645,6 +646,23 @@ void LLFloaterIMSession::setDocked(bool docked, bool pop_on_undock) } } +void LLFloaterIMSession::setMinimized(BOOL b) +{ + bool wasMinimized = isMinimized(); + LLFloaterIMSessionTab::setMinimized(b); + + //Switching from minimized state to un-minimized state + if(wasMinimized && !b) + { + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(gAgent.isDoNotDisturb()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID); + } + } +} + void LLFloaterIMSession::setVisible(BOOL visible) { LLNotificationsUI::LLScreenChannel* channel = static_cast<LLNotificationsUI::LLScreenChannel*> @@ -713,6 +731,18 @@ BOOL LLFloaterIMSession::getVisible() return visible; } +void LLFloaterIMSession::setFocus(BOOL focus) +{ + LLFloaterIMSessionTab::setFocus(focus); + + //When in DND mode, remove stored IM notifications + //Nearby chat (Null) IMs are not stored while in DND mode, so can ignore removal + if(focus && gAgent.isDoNotDisturb()) + { + LLDoNotDisturbNotificationStorage::getInstance()->removeNotification(LLDoNotDisturbNotificationStorage::toastName, mSessionID); + } +} + //static bool LLFloaterIMSession::toggle(const LLUUID& session_id) { diff --git a/indra/newview/llfloaterimsession.h b/indra/newview/llfloaterimsession.h index cb330bca0f..a0e0171b34 100644 --- a/indra/newview/llfloaterimsession.h +++ b/indra/newview/llfloaterimsession.h @@ -65,8 +65,10 @@ public: // LLView overrides /*virtual*/ BOOL postBuild(); + /*virtual*/ void setMinimized(BOOL b); /*virtual*/ void setVisible(BOOL visible); /*virtual*/ BOOL getVisible(); + /*virtual*/ void setFocus(BOOL focus); // Check typing timeout timer. /*virtual*/ void draw(); diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 51f5bbd775..9c0af79923 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -183,18 +183,19 @@ void on_new_message(const LLSD& msg) { conversations_floater_status = CLOSED; } - else if (!session_floater || !LLFloater::isVisible(session_floater) - || session_floater->isMinimized() || !session_floater->hasFocus()) + else if (!im_box->hasFocus() && + !(session_floater && LLFloater::isVisible(session_floater) + && !session_floater->isMinimized() && session_floater->hasFocus())) { conversations_floater_status = NOT_ON_TOP; } - else if ((session_floater->hasFocus()) && (im_box->getSelectedSession() == session_id)) + else if (im_box->getSelectedSession() != session_id) { - conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED; + conversations_floater_status = ON_TOP; } else { - conversations_floater_status = ON_TOP; + conversations_floater_status = ON_TOP_AND_ITEM_IS_SELECTED; } // determine user prefs for this session @@ -227,7 +228,7 @@ void on_new_message(const LLSD& msg) // 0. nothing - exit if (("none" == user_preferences || ON_TOP_AND_ITEM_IS_SELECTED == conversations_floater_status) - && session_floater->isMessagePaneExpanded()) + && session_floater->isMessagePaneExpanded()) { return; } @@ -2858,6 +2859,8 @@ LLUUID LLIMMgr::addSession( //we don't need to show notes about online/offline, mute/unmute users' statuses for existing sessions if (!new_session) return session_id; + llinfos << "LLIMMgr::addSession, new session added, name = " << name << ", session id = " << session_id << llendl; + //Per Plan's suggestion commented "explicit offline status warning" out to make Dessie happier (see EXT-3609) //*TODO After February 2010 remove this commented out line if no one will be missing that warning //noteOfflineUsers(session_id, floater, ids); @@ -2893,6 +2896,8 @@ void LLIMMgr::removeSession(const LLUUID& session_id) LLIMModel::getInstance()->clearSession(session_id); + llinfos << "LLIMMgr::removeSession, session removed, session id = " << session_id << llendl; + notifyObserverSessionRemoved(session_id); } diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 731b2e9427..beca08203f 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -8291,8 +8291,6 @@ void initialize_menus() view_listener_t::addEnable(new LLUploadCostCalculator(), "Upload.CalculateCosts"); - - commit.add("Inventory.NewWindow", boost::bind(&LLFloaterInventory::showAgentInventory)); enable.add("Conversation.IsConversationLoggingAllowed", boost::bind(&LLFloaterIMContainer::isConversationLoggingAllowed)); // Agent diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp index 236b95253c..eb6c453e76 100644 --- a/indra/newview/llviewertexture.cpp +++ b/indra/newview/llviewertexture.cpp @@ -911,6 +911,10 @@ LLViewerFetchedTexture::LLViewerFetchedTexture(const LLUUID& id, FTType f_type, { init(TRUE) ; mFTType = f_type; + if (mFTType == FTT_HOST_BAKE) + { + mCanUseHTTP = false; + } generateGLTexture() ; } diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 725939dd3e..5695fc04b9 100755 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -4475,10 +4475,6 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel //the texture pipeline will stop fetching this texture. imagep->resetTextureStats(); - // TODO: currently default to HTTP texture and fall back to UDP if cannot be found there. - // Once server messaging is in place, we should call setCanUseHTTP(false) for old style - // appearance requests - imagep->setCanUseHTTP(true); imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL); imagep->resetMaxVirtualSizeResetCounter() ; diff --git a/indra/newview/skins/default/xui/en/floater_im_session.xml b/indra/newview/skins/default/xui/en/floater_im_session.xml index 3b56e974d2..2152a9f6e9 100644 --- a/indra/newview/skins/default/xui/en/floater_im_session.xml +++ b/indra/newview/skins/default/xui/en/floater_im_session.xml @@ -70,23 +70,26 @@ top="0" left="0" right="-1" - bottom="-1"> + bottom="-3"> <layout_stack animate="false" default_tab_group="2" follows="all" right="-5" bottom="-1" + top="0" + left="5" + border_size="0" layout="topleft" orientation="vertical" name="main_stack" - tab_group="1" - top="0" - left="5"> + tab_group="1"> <layout_panel auto_resize="false" name="toolbar_panel" - height="35"> + height="35" + right="-1" + left="1"> <menu_button menu_filename="menu_im_session_showmodes.xml" follows="top|left" @@ -164,7 +167,7 @@ image_unselected="Toolbar_Middle_Off" layout="topleft" top="5" - right="-70" + right="-67" name="close_btn" tool_tip="End this conversation" width="31" /> @@ -196,7 +199,8 @@ </layout_panel> <layout_panel name="body_panel" - height="235"> + top="1" + bottom="-1"> <layout_stack default_tab_group="2" follows="all" @@ -213,12 +217,14 @@ min_dim="0" width="150" user_resize="true" - auto_resize="false" /> + auto_resize="false" + bottom="-1" /> <layout_panel default_tab_group="3" tab_group="2" name="right_part_holder" - min_width="221"> + min_width="221" + bottom="-1"> <layout_stack animate="true" default_tab_group="2" @@ -262,21 +268,28 @@ </layout_stack> </layout_panel> <layout_panel - height="35" + top_delta="0" + top="0" + height="26" + bottom="-1" auto_resize="false" name="chat_layout_panel"> <layout_stack animate="false" default_tab_group="2" follows="all" - right="-1" orientation="horizontal" name="input_panels" top="0" - bottom="-1" - left="0"> + bottom="-2" + left="0" + right="-1"> <layout_panel - name="input_editor_layout_panel"> + name="input_editor_layout_panel" + auto_resize="true" + user_resize="false" + top="0" + bottom="-1"> <chat_editor layout="topleft" expand_lines_count="5" @@ -289,27 +302,32 @@ max_length="1023" spellcheck="true" tab_group="3" - bottom="-8" - left="5" - right="-5" + top="1" + bottom="-2" + left="4" + right="-4" wrap="true" /> </layout_panel> <layout_panel auto_resize="false" + user_resize="false" name="input_button_layout_panel" - width="32"> + width="30" + top="0" + bottom="-1"> <button + layout="topleft" left="1" - top="4" + right="-1" + top="1" + height="22" follows="left|right|top" - height="25" image_hover_unselected="Toolbar_Middle_Over" image_overlay="Conv_expand_one_line" image_selected="Toolbar_Middle_Selected" image_unselected="Toolbar_Middle_Off" name="minz_btn" - tool_tip="Shows/hides message panel" - width="28" /> + tool_tip="Shows/hides message panel" /> </layout_panel> </layout_stack> </layout_panel> diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml index 101e104eab..52c4fb1613 100644 --- a/indra/newview/skins/default/xui/en/menu_login.xml +++ b/indra/newview/skins/default/xui/en/menu_login.xml @@ -180,7 +180,8 @@ name="Set Logging Level" tear_off="true"> <menu_item_check - label="Debug"> + name="Debug" + label="Debug"> <menu_item_check.on_check function="Develop.CheckLoggingLevel" parameter="0" /> @@ -189,7 +190,8 @@ parameter="0" /> </menu_item_check> <menu_item_check - label="Info"> + name="Info" + label="Info"> <menu_item_check.on_check function="Develop.CheckLoggingLevel" parameter="1" /> @@ -198,7 +200,8 @@ parameter="1" /> </menu_item_check> <menu_item_check - label="Warning"> + name="Warning" + label="Warning"> <menu_item_check.on_check function="Develop.CheckLoggingLevel" parameter="2" /> @@ -207,7 +210,8 @@ parameter="2" /> </menu_item_check> <menu_item_check - label="Error"> + name="Error" + label="Error"> <menu_item_check.on_check function="Develop.CheckLoggingLevel" parameter="3" /> @@ -216,7 +220,8 @@ parameter="3" /> </menu_item_check> <menu_item_check - label="None"> + name="None" + label="None"> <menu_item_check.on_check function="Develop.CheckLoggingLevel" parameter="4" /> diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 544f06ac0c..a11cd13fdb 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -131,6 +131,7 @@ name="Status" tear_off="true"> <menu_item_check + name="Away" label="Away"> <menu_item_check.on_check function="View.Status.CheckAway" /> @@ -138,6 +139,7 @@ function="World.SetAway" /> </menu_item_check> <menu_item_check + name="Do Not Disturb" label="Do Not Disturb"> <menu_item_check.on_check function="View.Status.CheckDoNotDisturb" /> @@ -257,6 +259,7 @@ parameter="speak" /> </menu_item_check> <menu_item_check + name="Conversation Log..." label="Conversation Log..."> <menu_item_check.on_check function="Floater.Visible" @@ -352,6 +355,7 @@ </menu_item_call> <menu_item_separator/> <menu_item_check + name="Do Not Disturb" label="Do Not Disturb"> <menu_item_check.on_check function="View.Status.CheckDoNotDisturb" /> @@ -3051,13 +3055,6 @@ <menu_item_call.on_click function="Advanced.PrintAgentInfo" /> </menu_item_call> - <menu_item_call - label="Memory Stats" - name="Memory Stats" - shortcut="control|alt|shift|M"> - <menu_item_call.on_click - function="Advanced.PrintTextureMemoryStats" /> - </menu_item_call> <menu_item_check label="Region Debug Console" name="Region Debug Console" |