summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llfloater.cpp40
-rwxr-xr-xindra/llui/llfolderviewitem.cpp4
-rwxr-xr-xindra/llui/llfolderviewitem.h1
-rw-r--r--indra/llui/llnotifications.cpp24
-rw-r--r--indra/llui/llnotifications.h22
5 files changed, 59 insertions, 32 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index 58b17f74a8..8f7d4afb1b 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -725,7 +725,27 @@ void LLFloater::closeFloater(bool app_quitting)
make_ui_sound("UISndWindowClose");
}
- //If floater is a dependent, remove it from parent (dependee)
+ gFocusMgr.clearLastFocusForGroup(this);
+
+ if (hasFocus())
+ {
+ // Do this early, so UI controls will commit before the
+ // window is taken down.
+ releaseFocus();
+
+ // give focus to dependee floater if it exists, and we had focus first
+ if (isDependent())
+ {
+ LLFloater* dependee = mDependeeHandle.get();
+ if (dependee && !dependee->isDead())
+ {
+ dependee->setFocus(TRUE);
+ }
+ }
+ }
+
+
+ //If floater is a dependent, remove it from parent (dependee)
LLFloater* dependee = mDependeeHandle.get();
if (dependee)
{
@@ -750,24 +770,6 @@ void LLFloater::closeFloater(bool app_quitting)
}
cleanupHandles();
- gFocusMgr.clearLastFocusForGroup(this);
-
- if (hasFocus())
- {
- // Do this early, so UI controls will commit before the
- // window is taken down.
- releaseFocus();
-
- // give focus to dependee floater if it exists, and we had focus first
- if (isDependent())
- {
- LLFloater* dependee = mDependeeHandle.get();
- if (dependee && !dependee->isDead())
- {
- dependee->setFocus(TRUE);
- }
- }
- }
dirtyRect();
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index b289581dc2..c5231c4f08 100755
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -1838,7 +1838,7 @@ BOOL LLFolderViewFolder::handleMouseDown( S32 x, S32 y, MASK mask )
}
if( !handled )
{
- if(mIndentation < x && x < mIndentation + mArrowSize + mTextPad)
+ if(mIndentation < x && x < mIndentation + (isMinimized() ? 0 : mArrowSize) + mTextPad)
{
toggleOpen();
handled = TRUE;
@@ -1862,7 +1862,7 @@ BOOL LLFolderViewFolder::handleDoubleClick( S32 x, S32 y, MASK mask )
}
if( !handled )
{
- if(mIndentation < x && x < mIndentation + mArrowSize + mTextPad)
+ if(mIndentation < x && x < mIndentation + (isMinimized() ? 0 : mArrowSize) + mTextPad)
{
// don't select when user double-clicks plus sign
// so as not to contradict single-click behavior
diff --git a/indra/llui/llfolderviewitem.h b/indra/llui/llfolderviewitem.h
index 19a6b0a44a..7e37e06064 100755
--- a/indra/llui/llfolderviewitem.h
+++ b/indra/llui/llfolderviewitem.h
@@ -289,6 +289,7 @@ protected:
friend class LLUICtrlFactory;
void updateLabelRotation();
+ virtual bool isMinimized() { return FALSE; }
public:
typedef std::list<LLFolderViewItem*> items_t;
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index fdd45bd76f..929b7da081 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1787,22 +1787,18 @@ std::ostream& operator<<(std::ostream& s, const LLNotification& notification)
return s;
}
-//static
-void LLPostponedNotification::lookupName(LLPostponedNotification* thiz,
- const LLUUID& id,
+void LLPostponedNotification::lookupName(const LLUUID& id,
bool is_group)
{
if (is_group)
{
gCacheName->getGroup(id,
boost::bind(&LLPostponedNotification::onGroupNameCache,
- thiz, _1, _2, _3));
+ this, _1, _2, _3));
}
else
{
- LLAvatarNameCache::get(id,
- boost::bind(&LLPostponedNotification::onAvatarNameCache,
- thiz, _1, _2));
+ fetchAvatarName(id);
}
}
@@ -1813,6 +1809,20 @@ void LLPostponedNotification::onGroupNameCache(const LLUUID& id,
finalizeName(full_name);
}
+void LLPostponedNotification::fetchAvatarName(const LLUUID& id)
+{
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+
+ if (id.notNull())
+ {
+ mAvatarNameCacheConnection = LLAvatarNameCache::get(id,
+ boost::bind(&LLPostponedNotification::onAvatarNameCache, this, _1, _2));
+ }
+}
+
void LLPostponedNotification::onAvatarNameCache(const LLUUID& agent_id,
const LLAvatarName& av_name)
{
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h
index 19b30b8973..c677dfe298 100644
--- a/indra/llui/llnotifications.h
+++ b/indra/llui/llnotifications.h
@@ -87,6 +87,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/enable_shared_from_this.hpp>
#include <boost/type_traits.hpp>
+#include <boost/signals2.hpp>
#include "llevents.h"
#include "llfunctorregistry.h"
@@ -972,14 +973,15 @@ public:
thiz->mParams = params;
// Avoid header file dependency on llcachename.h
- lookupName(thiz, id, is_group);
+ thiz->lookupName(id, is_group);
}
private:
- static void lookupName(LLPostponedNotification* thiz, const LLUUID& id, bool is_group);
+ void lookupName(const LLUUID& id, bool is_group);
// only used for groups
void onGroupNameCache(const LLUUID& id, const std::string& full_name, bool is_group);
// only used for avatars
+ void fetchAvatarName(const LLUUID& id);
void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
// used for both group and avatar names
void finalizeName(const std::string& name);
@@ -990,8 +992,19 @@ private:
}
protected:
- LLPostponedNotification() {}
- virtual ~LLPostponedNotification() {}
+ LLPostponedNotification()
+ : mParams(),
+ mName(),
+ mAvatarNameCacheConnection()
+ {}
+
+ virtual ~LLPostponedNotification()
+ {
+ if (mAvatarNameCacheConnection.connected())
+ {
+ mAvatarNameCacheConnection.disconnect();
+ }
+ }
/**
* Abstract method provides possibility to modify notification parameters and
@@ -1002,6 +1015,7 @@ protected:
LLNotification::Params mParams;
std::string mName;
+ boost::signals2::connection mAvatarNameCacheConnection;
};
// Stores only persistent notifications.