summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorEugene Mutavchi <emutavchi@productengine.com>2009-11-24 12:59:02 +0200
committerEugene Mutavchi <emutavchi@productengine.com>2009-11-24 12:59:02 +0200
commitc004ddeab2b373f92f66f599ac91b0c17ac0202a (patch)
treed75e358e794a40e38ec26fd5bb6e0bae0474f5e7 /indra/newview
parent06f638abdfdbd0a55087fe5ce0d90e261138758e (diff)
Additional commit for low sub-task EXT-1153 (FlatListView should support keyboard) - implemented "default ENTER" action for teleport history list.
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llpanelteleporthistory.cpp7
-rw-r--r--indra/newview/llpanelteleporthistory.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 057cdde6f0..67d0e13786 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -262,6 +262,7 @@ BOOL LLTeleportHistoryPanel::postBuild()
fl->setCommitOnSelectionChange(true);
fl->setDoubleClickCallback(boost::bind(&LLTeleportHistoryPanel::onDoubleClickItem, this));
fl->setCommitCallback(boost::bind(&LLTeleportHistoryPanel::handleItemSelect, this, fl));
+ fl->setReturnCallback(boost::bind(&LLTeleportHistoryPanel::onReturnKeyPressed, this));
}
}
}
@@ -636,6 +637,12 @@ void LLTeleportHistoryPanel::handleItemSelect(LLFlatListView* selected)
updateVerbs();
}
+void LLTeleportHistoryPanel::onReturnKeyPressed()
+{
+ // Teleport to selected region as default action on return key pressed
+ onTeleport();
+}
+
void LLTeleportHistoryPanel::onDoubleClickItem()
{
// If item got doubleclick, then that item is already selected
diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h
index b34d9e876c..a31ff34cb6 100644
--- a/indra/newview/llpanelteleporthistory.h
+++ b/indra/newview/llpanelteleporthistory.h
@@ -80,6 +80,7 @@ public:
private:
void onDoubleClickItem();
+ void onReturnKeyPressed();
void onAccordionTabRightClick(LLView *view, S32 x, S32 y, MASK mask);
void onAccordionTabOpen(LLAccordionCtrlTab *tab);
void onAccordionTabClose(LLAccordionCtrlTab *tab);