aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llui/llclipboard.cpp
diff options
context:
space:
mode:
authorArmin Weatherwax2009-06-08 11:10:27 +0200
committerMcCabe Maxsted2009-09-04 11:34:24 -0700
commit3f0082a9dda60432b8b759e09f19b495d9d5275c (patch)
tree989f5e10f9b9891ec7718b5ee2406582b6c0e352 /linden/indra/llui/llclipboard.cpp
parentRebranded startup loading page to Imprudence (diff)
downloadmeta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.zip
meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.gz
meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.bz2
meta-impy-3f0082a9dda60432b8b759e09f19b495d9d5275c.tar.xz
Linux middle mouse button paste/primary selection support and gtk clipboard handler (fixes crashbug using synergy mouse-keyboard-clipboard-sharing over lan)
modified: linden/doc/contributions.txt modified: linden/indra/llui/llclipboard.cpp modified: linden/indra/llui/llclipboard.h modified: linden/indra/llui/llfloater.cpp modified: linden/indra/llui/llfloater.h modified: linden/indra/llui/lllineeditor.cpp modified: linden/indra/llui/lllineeditor.h modified: linden/indra/llui/lltexteditor.cpp modified: linden/indra/llui/lltexteditor.h modified: linden/indra/llui/llview.cpp modified: linden/indra/llui/llview.h modified: linden/indra/llwindow/CMakeLists.txt new file: linden/indra/llwindow/llmousehandler.cpp modified: linden/indra/llwindow/llmousehandler.h modified: linden/indra/llwindow/llwindow.cpp modified: linden/indra/llwindow/llwindow.h modified: linden/indra/llwindow/llwindowsdl.cpp modified: linden/indra/llwindow/llwindowsdl.h modified: linden/indra/newview/lltool.cpp modified: linden/indra/newview/lltool.h modified: linden/indra/newview/llviewertexteditor.cpp modified: linden/indra/newview/llviewertexteditor.h modified: linden/indra/newview/llviewerwindow.cpp modified: linden/indra/newview/llviewerwindow.h (cherry picked from commit 594f4830922f4294dda432fa748935adffaeed8f)
Diffstat (limited to '')
-rw-r--r--linden/indra/llui/llclipboard.cpp41
1 files changed, 41 insertions, 0 deletions
diff --git a/linden/indra/llui/llclipboard.cpp b/linden/indra/llui/llclipboard.cpp
index d5255e7..f33f3fa 100644
--- a/linden/indra/llui/llclipboard.cpp
+++ b/linden/indra/llui/llclipboard.cpp
@@ -92,3 +92,44 @@ BOOL LLClipboard::canPasteString() const
92{ 92{
93 return LLView::getWindow()->isClipboardTextAvailable(); 93 return LLView::getWindow()->isClipboardTextAvailable();
94} 94}
95
96
97void LLClipboard::copyFromPrimarySubstring(const LLWString &src, S32 pos, S32 len, const LLUUID& source_id )
98{
99 mSourceID = source_id;
100 mString = src.substr(pos, len);
101 LLView::getWindow()->copyTextToPrimary( mString );
102}
103
104
105const LLWString& LLClipboard::getPastePrimaryWString( LLUUID* source_id )
106{
107 if( mSourceID.notNull() )
108 {
109 LLWString temp_string;
110 LLView::getWindow()->pasteTextFromPrimary(temp_string);
111
112 if( temp_string != mString )
113 {
114 mSourceID.setNull();
115 mString = temp_string;
116 }
117 }
118 else
119 {
120 LLView::getWindow()->pasteTextFromPrimary(mString);
121 }
122
123 if( source_id )
124 {
125 *source_id = mSourceID;
126 }
127
128 return mString;
129}
130
131
132BOOL LLClipboard::canPastePrimaryString() const
133{
134 return LLView::getWindow()->isPrimaryTextAvailable();
135}