diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/newview/llfloaternewim.cpp | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaternewim.cpp | 45 |
1 files changed, 13 insertions, 32 deletions
diff --git a/linden/indra/newview/llfloaternewim.cpp b/linden/indra/newview/llfloaternewim.cpp index 6363b4e..dc9fabf 100644 --- a/linden/indra/newview/llfloaternewim.cpp +++ b/linden/indra/newview/llfloaternewim.cpp | |||
@@ -30,29 +30,13 @@ | |||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include "llviewerprecompiledheaders.h" | 32 | #include "llviewerprecompiledheaders.h" |
33 | |||
34 | #include "llfloaternewim.h" | 33 | #include "llfloaternewim.h" |
35 | 34 | #include "lluictrlfactory.h" | |
36 | #include "llvieweruictrlfactory.h" | ||
37 | #include "llinstantmessage.h" | ||
38 | #include "sound_ids.h" | ||
39 | #include "audioengine.h" | ||
40 | #include "llfontgl.h" | ||
41 | #include "llnamevalue.h" | ||
42 | |||
43 | #include "llagent.h" | ||
44 | #include "llbutton.h" | ||
45 | #include "llfloater.h" | ||
46 | #include "llfontgl.h" | ||
47 | #include "llimpanel.h" | ||
48 | #include "llkeyboard.h" | ||
49 | #include "llnamelistctrl.h" | 35 | #include "llnamelistctrl.h" |
50 | #include "llresmgr.h" | 36 | #include "llresmgr.h" |
51 | #include "lltabcontainer.h" | 37 | #include "lltabcontainer.h" |
52 | #include "llimview.h" | 38 | #include "llimview.h" |
53 | #include "lltextbox.h" | ||
54 | 39 | ||
55 | extern LLAudioEngine* gAudiop; | ||
56 | S32 COL_1_WIDTH = 200; | 40 | S32 COL_1_WIDTH = 200; |
57 | 41 | ||
58 | static LLString sOnlineDescriptor = "*"; | 42 | static LLString sOnlineDescriptor = "*"; |
@@ -60,20 +44,20 @@ static LLString sNameFormat = "[FIRST] [LAST]"; | |||
60 | 44 | ||
61 | LLFloaterNewIM::LLFloaterNewIM() | 45 | LLFloaterNewIM::LLFloaterNewIM() |
62 | { | 46 | { |
63 | gUICtrlFactory->buildFloater(this, "floater_new_im.xml"); | 47 | LLUICtrlFactory::getInstance()->buildFloater(this, "floater_new_im.xml"); |
64 | } | 48 | } |
65 | 49 | ||
66 | BOOL LLFloaterNewIM::postBuild() | 50 | BOOL LLFloaterNewIM::postBuild() |
67 | { | 51 | { |
68 | requires("start_btn", WIDGET_TYPE_BUTTON); | 52 | requires<LLButton>("start_btn"); |
69 | requires("close_btn", WIDGET_TYPE_BUTTON); | 53 | requires<LLButton>("close_btn"); |
70 | requires("user_list", WIDGET_TYPE_NAME_LIST); | 54 | requires<LLNameListCtrl>("user_list"); |
71 | 55 | ||
72 | if (checkRequirements()) | 56 | if (checkRequirements()) |
73 | { | 57 | { |
74 | childSetAction("start_btn", &LLFloaterNewIM::onStart, this); | 58 | childSetAction("start_btn", &LLFloaterNewIM::onStart, this); |
75 | childSetAction("close_btn", &LLFloaterNewIM::onClickClose, this); | 59 | childSetAction("close_btn", &LLFloaterNewIM::onClickClose, this); |
76 | mSelectionList = LLViewerUICtrlFactory::getNameListByName(this, "user_list"); | 60 | mSelectionList = getChild<LLNameListCtrl>("user_list"); |
77 | if (mSelectionList) | 61 | if (mSelectionList) |
78 | { | 62 | { |
79 | mSelectionList->setDoubleClickCallback(&LLFloaterNewIM::onStart); | 63 | mSelectionList->setDoubleClickCallback(&LLFloaterNewIM::onStart); |
@@ -81,7 +65,7 @@ BOOL LLFloaterNewIM::postBuild() | |||
81 | } | 65 | } |
82 | else | 66 | else |
83 | { | 67 | { |
84 | llwarns << "LLViewerUICtrlFactory::getNameListByName() returned NULL for 'user_list'" << llendl; | 68 | llwarns << "LLUICtrlFactory::getNameListByName() returned NULL for 'user_list'" << llendl; |
85 | } | 69 | } |
86 | sOnlineDescriptor = getString("online_descriptor"); | 70 | sOnlineDescriptor = getString("online_descriptor"); |
87 | sNameFormat = getString("name_format"); | 71 | sNameFormat = getString("name_format"); |
@@ -224,17 +208,14 @@ void LLFloaterNewIM::onClickClose(void *userdata) | |||
224 | } | 208 | } |
225 | 209 | ||
226 | 210 | ||
227 | BOOL LLFloaterNewIM::handleKeyHere(KEY key, MASK mask, BOOL called_from_parent) | 211 | BOOL LLFloaterNewIM::handleKeyHere(KEY key, MASK mask) |
228 | { | 212 | { |
229 | BOOL handled = LLFloater::handleKeyHere(key, mask, called_from_parent); | 213 | BOOL handled = LLFloater::handleKeyHere(key, mask); |
230 | if (getVisible() && getEnabled() && !called_from_parent) | 214 | if ( KEY_ESCAPE == key ) |
231 | { | 215 | { |
232 | if ( KEY_ESCAPE == key ) | 216 | handled = TRUE; |
233 | { | 217 | // Close talk panel on escape |
234 | handled = TRUE; | 218 | gIMMgr->toggle(NULL); |
235 | // Close talk panel on escape | ||
236 | gIMMgr->toggle(NULL); | ||
237 | } | ||
238 | } | 219 | } |
239 | 220 | ||
240 | // Might need to call base class here if not handled | 221 | // Might need to call base class here if not handled |