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

List:       kde-commits
Subject:    kdenetwork/ksirc
From:       Andrew Standley-Jones <asj () cban ! com>
Date:       2002-12-12 17:09:48
[Download RAW message or body]

CVS commit by asj: 

Increased the line length for entry for Simon.  Seems he can't fit most of 
his irc messages into < 256 characters.  RFC also says 510 characters per
line, so we split it up at 450 characters to allow channel/nicks, etc.  This
should be pretty safe, but might be problems on channels with names over
50 characters (200 allowable). If Simon has problems, he'll have to let me know. 


  A            advfollow.pl   1.1
  M +8 -3      ahistlineedit.cpp   1.45
  M +14 -13    filters.pl   1.17
  M +2 -0      ksopts.h   1.13
  M +2 -2      toplevel.cpp   1.242


--- kdenetwork/ksirc/ahistlineedit.cpp  #1.44:1.45
@@ -95,5 +95,5 @@ void aHistLineEdit::slotMaybeResize()
 */
 
-    if(text().length() > 255){
+    if(text().length() > IRC_SAFE_MAX_LINE){
         if(m_drawrect == false){
             m_drawrect = true;
@@ -113,6 +113,11 @@ void aHistLineEdit::slotMaybeResize()
     // only grow if we are less than 1/4 the size of the toplevel
     if(h > (topLevelWidget()->height() >> 2)) {
-        if(this != topLevelWidget())
+        if(this != topLevelWidget()) {
             h = topLevelWidget()->height() >> 2;
+            setVScrollBarMode( Auto );
+        }
+    }
+    else {
+        setVScrollBarMode( AlwaysOff );
     }
     if(h != m_height){

--- kdenetwork/ksirc/filters.pl  #1.16:1.17
@@ -20,10 +20,11 @@
   for(; $i <= $#KSIRC_FILTER; $i++){
     eval{
+            print LOG "*** $i $_[0]\n";
       if($_[0] =~ m/$KSIRC_FILTER[$i]{'SEARCH'}/){
          $_[0] =~ s/$KSIRC_FILTER[$i]{'FROM'}/$KSIRC_FILTER[$i]{'TO'}/eeg;
       }
     };
-    if ($@){
-      (my $error = $@) =~ s/before HERE.*//;
+        if ( $@ ){
+            (my $error = $@ ) =~ s/before HERE.*//;
       my $desc = $KSIRC_FILTER[$i]{'DESC'};
       splice(@KSIRC_FILTER, $i--, 1);

--- kdenetwork/ksirc/ksopts.h  #1.12:1.13
@@ -10,4 +10,6 @@
 #include <qpixmap.h>
 
+#define IRC_SAFE_MAX_LINE 450
+
 #include "boundscheckingarray.h"
 

--- kdenetwork/ksirc/toplevel.cpp  #1.241:1.242
@@ -870,5 +870,5 @@ void KSircTopLevel::returnPressed()
 
     for(len = 0; len < s.length(); ){
-        int l = s.length() > 255 ? 255 : s.length();
+        int l = s.length() > IRC_SAFE_MAX_LINE ? IRC_SAFE_MAX_LINE : s.length();
         sirc_line_return( s.mid(len, l) );
         len += l;


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

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