[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Mixed patches
From:       Anders Lund <anders () alweb ! dk>
Date:       2002-03-12 23:33:54
[Download RAW message or body]

Hi all,
Here are a few mixed things:

1) language.dtd.diff
An update to the language DTD for hl files, bringing it up to speed with 
reality:) I did not change the NMTOKENs to PCDATA which I think should be 
done, as context names can and should contain whitespaces.

2) iconborder.diff
A fix to get lines below the document end repainted, needed if the document 
gets shorter or it by mistake gets moved too far upwards (which will 
currently happen if you reload a document with the cursor at the last few 
lines, but see below)

3) kateview.diff
A fix to avoid moving the document too far north, causing unexisting space to 
appear below the document (to see it, try putting a bookmark at one of the 
last few lines, move the cursor away and then go to the bookmark using the 
bookmarks menu, before applying this patch). This patch concerns the center() 
method of kateview, if you know of other situations causing this to happen 
let me know (or fix it:)

4) cpp.xml.diff
Add *.moc to wildcards - actually, i may be guilty of removing it by 
accident:(

-anders
["cpp.xml.diff" (text/x-diff)]

Index: cpp.xml
===================================================================
RCS file: /home/kde/kdelibs/kate/data/cpp.xml,v
retrieving revision 1.24
diff -u -r1.24 cpp.xml
--- cpp.xml	2002/03/01 23:20:43	1.24
+++ cpp.xml	2002/03/12 23:30:58
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE language SYSTEM "language.dtd">
-<language name="C++" version="1.00" kateversion="2.0" section="Sources" \
extensions="*.cxx;*.cpp;*.cc;*.C;*.h" \
mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr;text/x-c++src"> +<language \
name="C++" version="1.00" kateversion="2.0" section="Sources" \
extensions="*.cxx;*.cpp;*.cc;*.C;*.h;*.moc" \
mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr;text/x-c++src">  <highlighting>
     <list name="keywords">
       <item> class </item>


["kateview.diff" (text/x-diff)]

Index: kateview.cpp
===================================================================
RCS file: /home/kde/kdelibs/kate/part/kateview.cpp,v
retrieving revision 1.119
diff -u -r1.119 kateview.cpp
--- kateview.cpp	2002/03/07 23:21:59	1.119
+++ kateview.cpp	2002/03/12 23:29:23
@@ -709,6 +709,9 @@
   newXPos = 0;
   newYPos = cursor.line*myDoc->viewFont.fontHeight - height()/2;
   if (newYPos < 0) newYPos = 0;
+  // anders: don't move below document
+  uint ym = ( myDoc->numLines() * myDoc->viewFont.fontHeight ) - height();
+  if ( newYPos > ym ) newYPos = ym;
 }
 
 void KateViewInternal::updateView(int flags) {
@@ -1512,7 +1515,7 @@
   KStdAction::findNext(this, SLOT(findAgain()), ac);
   KStdAction::findPrev(this, SLOT(findPrev()), ac, "edit_find_prev");
   KStdAction::gotoLine(this, SLOT(gotoLine()), ac);
-  new KAction(i18n("&Configure Editor..."), 0, myDoc, SLOT(configDialog()),ac, \
"set_confdlg"); +  new KAction(i18n("&Configure Editor..."), "configure", 0, myDoc, \
SLOT(configDialog()),ac, "set_confdlg");  setHighlight = myDoc->hlActionMenu \
(i18n("&Highlight Mode"),ac,"set_highlight");  myDoc->exportActionMenu \
(i18n("&Export"),ac,"file_export");  KStdAction::selectAll(myDoc, SLOT(selectAll()), \
ac);


["iconborder.diff" (text/x-diff)]

Index: kateiconborder.cpp
===================================================================
RCS file: /home/kde/kdelibs/kate/part/kateiconborder.cpp,v
retrieving revision 1.9
diff -u -r1.9 kateiconborder.cpp
--- kateiconborder.cpp	2002/01/25 10:47:41	1.9
+++ kateiconborder.cpp	2002/03/12 23:28:12
@@ -184,7 +184,6 @@
 void KateIconBorder::paintLine(int i)
 {
   if ( myView->iconBorderStatus == None ) return;
-  if ( (uint)i > myView->myDoc->numLines() ) return;
 
 //kdDebug()<<"KateIconBorder::paintLine( "<<i<<") - line is "<<i+1<<endl;
   QPainter p(this);
@@ -208,10 +207,11 @@
   }
 
   // line number
-  if ( (myView->iconBorderStatus & LineNumbers) && i < myView->doc()->numLines() ) {
+  if ( (myView->iconBorderStatus & LineNumbers) ) {
     p.fillRect( lnX, y, width()-2, fontHeight, colorGroup().light() );
     p.setPen(QColor(colorGroup().background()).dark());
     p.drawLine( width()-1, y, width()-1, y + fontHeight );
+    if ( (uint)i < myView->myDoc->numLines() )
       p.drawText( lnX + 1, y, width()-lnX-4, fontHeight, \
Qt::AlignRight|Qt::AlignVCenter, QString("%1").arg(i+1) );  }
          /*


["language.dtd.diff" (text/x-diff)]

Index: language.dtd
===================================================================
RCS file: /home/kde/kdelibs/kate/data/language.dtd,v
retrieving revision 1.7
diff -u -r1.7 language.dtd
--- language.dtd	2001/07/08 13:30:50	1.7
+++ language.dtd	2002/03/12 23:25:10
@@ -4,6 +4,8 @@
   section (Sources|Markup|Other|Scripts) #REQUIRED
   extensions CDATA #REQUIRED
   mimetype CDATA #REQUIRED
+  version CDATA #IMPLIED
+  kateverison CDATA #IMPLIED
   casesensitive (0|1) #IMPLIED
 >
 
@@ -41,12 +43,14 @@
 
 <!ELEMENT contexts (context)+>
 
-<!ELEMENT context (keyword | Float | HlCOct | HlCHex | Int | DetectChar | \
Detect2Chars | AnyChar | StringDetect | RegExpr | LineContinue | HlCStringChar | \
RangeDetect | HlCChar)*> +<!ELEMENT context (keyword | Float | HlCOct | HlCHex | Int \
| DetectChar | Detect2Chars | AnyChar | StringDetect | RegExpr | LineContinue | \
HlCStringChar | RangeDetect | HlCChar | IncludeRules)*>  <!ATTLIST context
   attribute CDATA #REQUIRED
   lineEndContext NMTOKEN #REQUIRED
   lineBeginContext NMTOKEN #IMPLIED
   name CDATA #IMPLIED
+  fallthrough (0|1|false|true) #IMPLIED
+  fallthroughContext NMTOKEN #IMPLIED
 >
 
 <!ELEMENT keyword EMPTY>
@@ -122,6 +126,8 @@
   attribute CDATA #REQUIRED
   context NMTOKEN #REQUIRED
   String CDATA #REQUIRED
+  insensitive (false|true) #IMPLIED
+  minimal (false|true) #IMPLIED
 >
 
 <!ELEMENT LineContinue EMPTY>
@@ -142,6 +148,11 @@
   context NMTOKEN #REQUIRED
   char CDATA #REQUIRED
   char1 CDATA #REQUIRED
+>
+
+<!ELEMENT IncludeRules EMPTY>
+<!ATTLIST IncludeRules
+  context NMTOKEN #REQUIRED
 >
 
 <!ELEMENT itemDatas (itemData)+>


_______________________________________________
kwrite-devel mailing list
kwrite-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwrite-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic