[EMAIL PROTECTED] (Lars Gullik Bj�nnes) writes:

| Alfredo Braunstein <[EMAIL PROTECTED]> writes:
| 
| | Lars Gullik Bjønnes wrote:
| | 
| | > This is more to my liking, but it is still a bit complex.
| | 
| | Your patch seems nicer... (I don't like so much the fact that it has to
| | export all 10 full cut buffers to ascii to show the menu, but I suppose
| | that it's ok)
| 
| I am going to use a simpler solution, and only use what is in this
| patch if there is user demand.

This is the patch I am going for. It is simpler, and I belive good
enough. The amount of information this string is providing is limited
rgardless of where the '...' is put.

? src/frontends/xforms/lyx_forms.h
? src/frontends/xforms/lyx_xpm.h
Index: src/CutAndPaste.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/CutAndPaste.C,v
retrieving revision 1.103
diff -u -p -r1.103 CutAndPaste.C
--- src/CutAndPaste.C	17 Jun 2003 15:33:45 -0000	1.103
+++ src/CutAndPaste.C	18 Jun 2003 07:53:17 -0000
@@ -58,8 +58,18 @@ CutAndPaste::availableSelections(Buffer 
 	CutStack::const_iterator end = cuts.end();
 	for (; cit != end; ++cit) {
 		ParagraphList const & pars = cit->first;
-		string asciiPar(pars.front().asString(&buffer, false), 0, 25);
-		selList.push_back(asciiPar);
+		string asciiSel;
+		ParagraphList::const_iterator pit = pars.begin();
+		ParagraphList::const_iterator pend = pars.end();
+		for (; pit != pend; ++pit) {
+			asciiSel += pit->asString(&buffer, false);
+			if (asciiSel.size() > 25) {
+				asciiSel.replace(22, string::npos, "...");
+				break;
+			}
+		}
+
+		selList.push_back(asciiSel);
 	}
 
 	return selList;
-- 
        Lgb

Reply via email to