diff options
author | Jacek Antonelli | 2009-09-09 11:38:26 -0500 |
---|---|---|
committer | Jacek Antonelli | 2009-09-09 11:59:42 -0500 |
commit | ced5a5f6a0e7d294f9e477409387674fcecc532c (patch) | |
tree | e7500de0806009c2955bef6af7103ac60ae1e8e0 /linden/indra/newview/llviewertexteditor.cpp | |
parent | Merge branch 'objectbackup' into next (diff) | |
parent | Commented out permissions button (todo: backport this if there's time) (diff) | |
download | meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.zip meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.gz meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.bz2 meta-impy-ced5a5f6a0e7d294f9e477409387674fcecc532c.tar.xz |
Merge remote branch 'mccabe/1.2.0-next' into next
Moved "Backup" pie menu item to fit "Go Here" in top-left slot.
Conflicts:
linden/indra/newview/llviewermenu.cpp
linden/indra/newview/skins/default/xui/en-us/menu_pie_object.xml
Diffstat (limited to 'linden/indra/newview/llviewertexteditor.cpp')
-rw-r--r-- | linden/indra/newview/llviewertexteditor.cpp | 79 |
1 files changed, 32 insertions, 47 deletions
diff --git a/linden/indra/newview/llviewertexteditor.cpp b/linden/indra/newview/llviewertexteditor.cpp index cef6926..76b752c 100644 --- a/linden/indra/newview/llviewertexteditor.cpp +++ b/linden/indra/newview/llviewertexteditor.cpp | |||
@@ -900,51 +900,9 @@ BOOL LLViewerTextEditor::handleHover(S32 x, S32 y, MASK mask) | |||
900 | 900 | ||
901 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | 901 | BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) |
902 | { | 902 | { |
903 | BOOL handled = FALSE; | 903 | BOOL handled = FALSE; |
904 | |||
905 | // let scrollbar have first dibs | ||
906 | handled = LLView::childrenHandleMouseUp(x, y, mask) != NULL; | ||
907 | |||
908 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
909 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
910 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
911 | { | ||
912 | mOnScrollEndCallback(mOnScrollEndData); | ||
913 | } | ||
914 | |||
915 | if( !handled && mTakesNonScrollClicks) | ||
916 | { | ||
917 | if( mIsSelecting ) | ||
918 | { | ||
919 | // Finish selection | ||
920 | if( y > getTextRect().mTop ) | ||
921 | { | ||
922 | mScrollbar->setDocPos( mScrollbar->getDocPos() - 1 ); | ||
923 | } | ||
924 | else | ||
925 | if( y < getTextRect().mBottom ) | ||
926 | { | ||
927 | mScrollbar->setDocPos( mScrollbar->getDocPos() + 1 ); | ||
928 | } | ||
929 | |||
930 | setCursorAtLocalPos( x, y, TRUE ); | ||
931 | endSelection(); | ||
932 | |||
933 | updateScrollFromCursor(); | ||
934 | } | ||
935 | |||
936 | if( !hasSelection() ) | ||
937 | { | ||
938 | handleMouseUpOverSegment( x, y, mask ); | ||
939 | } | ||
940 | |||
941 | handled = TRUE; | ||
942 | } | ||
943 | |||
944 | // Delay cursor flashing | ||
945 | resetKeystrokeTimer(); | ||
946 | 904 | ||
947 | if( hasMouseCapture() ) | 905 | if( hasMouseCapture() ) |
948 | { | 906 | { |
949 | if (mDragItem) | 907 | if (mDragItem) |
950 | { | 908 | { |
@@ -963,8 +921,15 @@ BOOL LLViewerTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | |||
963 | } | 921 | } |
964 | } | 922 | } |
965 | mDragItem = NULL; | 923 | mDragItem = NULL; |
966 | gFocusMgr.setMouseCapture( NULL ); | 924 | } |
967 | handled = TRUE; | 925 | |
926 | handled = LLTextEditor::handleMouseUp(x,y,mask); | ||
927 | |||
928 | // Used to enable I Agree checkbox if the user scrolled through entire text | ||
929 | BOOL was_scrolled_to_bottom = (mScrollbar->getDocPos() == mScrollbar->getDocPosMax()); | ||
930 | if (mOnScrollEndCallback && was_scrolled_to_bottom) | ||
931 | { | ||
932 | mOnScrollEndCallback(mOnScrollEndData); | ||
968 | } | 933 | } |
969 | 934 | ||
970 | return handled; | 935 | return handled; |
@@ -1006,6 +971,24 @@ BOOL LLViewerTextEditor::handleRightMouseDown(S32 x, S32 y, MASK mask) | |||
1006 | return handled; | 971 | return handled; |
1007 | } | 972 | } |
1008 | 973 | ||
974 | BOOL LLViewerTextEditor::handleMiddleMouseDown(S32 x, S32 y, MASK mask) | ||
975 | { | ||
976 | BOOL handled = FALSE; | ||
977 | handled = childrenHandleMiddleMouseDown(x, y, mask) != NULL; | ||
978 | if (!handled) | ||
979 | { | ||
980 | handled = LLTextEditor::handleMiddleMouseDown(x, y, mask); | ||
981 | } | ||
982 | return handled; | ||
983 | } | ||
984 | |||
985 | BOOL LLViewerTextEditor::handleMiddleMouseUp(S32 x, S32 y, MASK mask) | ||
986 | { | ||
987 | BOOL handled = childrenHandleMiddleMouseUp(x, y, mask) != NULL; | ||
988 | |||
989 | return handled; | ||
990 | } | ||
991 | |||
1009 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | 992 | BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) |
1010 | { | 993 | { |
1011 | BOOL handled = FALSE; | 994 | BOOL handled = FALSE; |
@@ -1028,7 +1011,6 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1028 | } | 1011 | } |
1029 | } | 1012 | } |
1030 | } | 1013 | } |
1031 | |||
1032 | 1014 | ||
1033 | setCursorAtLocalPos( x, y, FALSE ); | 1015 | setCursorAtLocalPos( x, y, FALSE ); |
1034 | deselect(); | 1016 | deselect(); |
@@ -1066,6 +1048,9 @@ BOOL LLViewerTextEditor::handleDoubleClick(S32 x, S32 y, MASK mask) | |||
1066 | // delay cursor flashing | 1048 | // delay cursor flashing |
1067 | resetKeystrokeTimer(); | 1049 | resetKeystrokeTimer(); |
1068 | 1050 | ||
1051 | // take selection to 'primary' clipboard | ||
1052 | updatePrimary(); | ||
1053 | |||
1069 | handled = TRUE; | 1054 | handled = TRUE; |
1070 | } | 1055 | } |
1071 | return handled; | 1056 | return handled; |