diff options
author | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:27 -0500 |
commit | a8a62201ba762e98dff92cf49033e577fc34d8d4 (patch) | |
tree | 11f8513c5cdc222f2fac0c93eb724c089803c200 /linden/indra/newview/llfolderview.cpp | |
parent | Second Life viewer sources 1.18.6.4-RC (diff) | |
download | meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.zip meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.gz meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.bz2 meta-impy-a8a62201ba762e98dff92cf49033e577fc34d8d4.tar.xz |
Second Life viewer sources 1.19.0.0
Diffstat (limited to 'linden/indra/newview/llfolderview.cpp')
-rw-r--r-- | linden/indra/newview/llfolderview.cpp | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/linden/indra/newview/llfolderview.cpp b/linden/indra/newview/llfolderview.cpp index 7768105..ca3c9c1 100644 --- a/linden/indra/newview/llfolderview.cpp +++ b/linden/indra/newview/llfolderview.cpp | |||
@@ -12,12 +12,12 @@ | |||
12 | * ("GPL"), unless you have obtained a separate licensing agreement | 12 | * ("GPL"), unless you have obtained a separate licensing agreement |
13 | * ("Other License"), formally executed by you and Linden Lab. Terms of | 13 | * ("Other License"), formally executed by you and Linden Lab. Terms of |
14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or | 14 | * the GPL can be found in doc/GPL-license.txt in this distribution, or |
15 | * online at http://secondlife.com/developers/opensource/gplv2 | 15 | * online at http://secondlifegrid.net/programs/open_source/licensing/gplv2 |
16 | * | 16 | * |
17 | * There are special exceptions to the terms and conditions of the GPL as | 17 | * There are special exceptions to the terms and conditions of the GPL as |
18 | * it is applied to this Source Code. View the full text of the exception | 18 | * it is applied to this Source Code. View the full text of the exception |
19 | * in the file doc/FLOSS-exception.txt in this software distribution, or | 19 | * in the file doc/FLOSS-exception.txt in this software distribution, or |
20 | * online at http://secondlife.com/developers/opensource/flossexception | 20 | * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception |
21 | * | 21 | * |
22 | * By copying, modifying or distributing this software, you acknowledge | 22 | * By copying, modifying or distributing this software, you acknowledge |
23 | * that you have read and understood your obligations described above, | 23 | * that you have read and understood your obligations described above, |
@@ -94,7 +94,7 @@ void copy_selected_item(void* user_data); | |||
94 | void open_selected_items(void* user_data); | 94 | void open_selected_items(void* user_data); |
95 | void properties_selected_items(void* user_data); | 95 | void properties_selected_items(void* user_data); |
96 | void paste_items(void* user_data); | 96 | void paste_items(void* user_data); |
97 | void renamer_focus_lost( LLUICtrl* handler, void* user_data ); | 97 | void renamer_focus_lost( LLFocusableElement* handler, void* user_data ); |
98 | 98 | ||
99 | ///---------------------------------------------------------------------------- | 99 | ///---------------------------------------------------------------------------- |
100 | /// Class LLFolderViewItem | 100 | /// Class LLFolderViewItem |
@@ -696,7 +696,7 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask ) | |||
696 | // Release keyboard focus, so that if stuff is dropped into the | 696 | // Release keyboard focus, so that if stuff is dropped into the |
697 | // world, pressing the delete key won't blow away the inventory | 697 | // world, pressing the delete key won't blow away the inventory |
698 | // item. | 698 | // item. |
699 | gViewerWindow->setKeyboardFocus(NULL, NULL); | 699 | gViewerWindow->setKeyboardFocus(NULL); |
700 | 700 | ||
701 | return gToolDragAndDrop->handleHover( x, y, mask ); | 701 | return gToolDragAndDrop->handleHover( x, y, mask ); |
702 | } | 702 | } |
@@ -3193,7 +3193,7 @@ void LLFolderView::draw() | |||
3193 | } | 3193 | } |
3194 | if(gViewerWindow->hasKeyboardFocus(this) && !getVisible()) | 3194 | if(gViewerWindow->hasKeyboardFocus(this) && !getVisible()) |
3195 | { | 3195 | { |
3196 | gViewerWindow->setKeyboardFocus( NULL, NULL ); | 3196 | gViewerWindow->setKeyboardFocus( NULL ); |
3197 | } | 3197 | } |
3198 | 3198 | ||
3199 | // while dragging, update selection rendering to reflect single/multi drag status | 3199 | // while dragging, update selection rendering to reflect single/multi drag status |
@@ -3685,7 +3685,7 @@ void LLFolderView::startRenamingSelectedItem( void ) | |||
3685 | mRenamer->setVisible( TRUE ); | 3685 | mRenamer->setVisible( TRUE ); |
3686 | // set focus will fail unless item is visible | 3686 | // set focus will fail unless item is visible |
3687 | mRenamer->setFocus( TRUE ); | 3687 | mRenamer->setFocus( TRUE ); |
3688 | mRenamer->setFocusLostCallback(renamer_focus_lost); | 3688 | mRenamer->setLostTopCallback(onRenamerLost); |
3689 | gViewerWindow->setTopCtrl( mRenamer ); | 3689 | gViewerWindow->setTopCtrl( mRenamer ); |
3690 | } | 3690 | } |
3691 | } | 3691 | } |
@@ -3710,7 +3710,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) | |||
3710 | // SL-51858: Key presses are not being passed to the Popup menu. | 3710 | // SL-51858: Key presses are not being passed to the Popup menu. |
3711 | // A proper fix is non-trivial so instead just close the menu. | 3711 | // A proper fix is non-trivial so instead just close the menu. |
3712 | LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); | 3712 | LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); |
3713 | if (menu->isOpen()) | 3713 | if (menu && menu->isOpen()) |
3714 | { | 3714 | { |
3715 | LLMenuGL::sMenuContainer->hideMenus(); | 3715 | LLMenuGL::sMenuContainer->hideMenus(); |
3716 | } | 3716 | } |
@@ -3759,7 +3759,7 @@ BOOL LLFolderView::handleKeyHere( KEY key, MASK mask, BOOL called_from_parent ) | |||
3759 | { | 3759 | { |
3760 | if( gViewerWindow->childHasKeyboardFocus( this ) ) | 3760 | if( gViewerWindow->childHasKeyboardFocus( this ) ) |
3761 | { | 3761 | { |
3762 | gViewerWindow->setKeyboardFocus( NULL, NULL ); | 3762 | gViewerWindow->setKeyboardFocus( NULL ); |
3763 | } | 3763 | } |
3764 | } | 3764 | } |
3765 | mSearchString.clear(); | 3765 | mSearchString.clear(); |
@@ -3950,6 +3950,14 @@ BOOL LLFolderView::handleUnicodeCharHere(llwchar uni_char, BOOL called_from_pare | |||
3950 | BOOL handled = FALSE; | 3950 | BOOL handled = FALSE; |
3951 | if (gFocusMgr.childHasKeyboardFocus(getRoot())) | 3951 | if (gFocusMgr.childHasKeyboardFocus(getRoot())) |
3952 | { | 3952 | { |
3953 | // SL-51858: Key presses are not being passed to the Popup menu. | ||
3954 | // A proper fix is non-trivial so instead just close the menu. | ||
3955 | LLMenuGL* menu = (LLMenuGL*)LLView::getViewByHandle(mPopupMenuHandle); | ||
3956 | if (menu && menu->isOpen()) | ||
3957 | { | ||
3958 | LLMenuGL::sMenuContainer->hideMenus(); | ||
3959 | } | ||
3960 | |||
3953 | //do text search | 3961 | //do text search |
3954 | if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) | 3962 | if (mSearchTimer.getElapsedTimeF32() > gSavedSettings.getF32("TypeAheadTimeout")) |
3955 | { | 3963 | { |
@@ -4459,12 +4467,10 @@ bool LLInventorySort::operator()(LLFolderViewItem* a, LLFolderViewItem* b) | |||
4459 | } | 4467 | } |
4460 | } | 4468 | } |
4461 | 4469 | ||
4462 | void renamer_focus_lost( LLUICtrl* ctrl, void* userdata) | 4470 | //static |
4471 | void LLFolderView::onRenamerLost( LLUICtrl* renamer, void* user_data) | ||
4463 | { | 4472 | { |
4464 | if( ctrl ) | 4473 | renamer->setVisible(FALSE); |
4465 | { | ||
4466 | ctrl->setVisible( FALSE ); | ||
4467 | } | ||
4468 | } | 4474 | } |
4469 | 4475 | ||
4470 | void delete_selected_item(void* user_data) | 4476 | void delete_selected_item(void* user_data) |