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

List:       kde-core-devel
Subject:    Re: konsole patch to disable argument inheriting by new sessions by default
From:       Antonio Larrosa =?iso-8859-1?q?Jim=E9nez?= <larrosa () kde ! org>
Date:       2001-08-01 3:26:20
[Download RAW message or body]

El Mié 01 Ago 2001 04:11, Chris Machemer escribió:
> I had an insane day.  I finally got to my machine to check my mail
> now...already ten minutes past my usual bed time...so I wno't be able to

Ok, (btw, I'm around 2 hours past my usual bed time, which is the same 
than 5 hours past the usual bed time for the "mortals" :) )

> start looking at your patch today.
>

Hmmm, I'd like you to review it, as I'm not sure about my original patch.

Anyway, I'm now running the attached patch and it seems to run better
(altough it may be because I had compilation problems with my previous 
patch due to broken memory)

> One question though.
>
> Does it introduce new text strings that would break the message freeze?
>

Of course not, it adds a config option, but no GUI to change it (the user 
has to edit the konsolerc file manually)

Greetings,

--
Antonio Larrosa Jimenez
KDE Core developer  - larrosa@kde.org
SuSE Labs developer - larrosa@suse.de
http://perso.wanadoo.es/antlarr
KDE - The development framework of the future, today.

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

Index: include/konsole.h
===================================================================
RCS file: /home/kde/kdebase/konsole/include/konsole.h,v
retrieving revision 1.48
diff -u -p -r1.48 konsole.h
--- include/konsole.h	2001/07/16 06:36:04	1.48
+++ include/konsole.h	2001/08/01 03:17:54
@@ -208,6 +208,9 @@ private:
 public:
 
   QString     title;
+
+private:
+  bool        b_inheritArgs;
 };
 
 class QSpinBox;
Index: src/konsole.C
===================================================================
RCS file: /home/kde/kdebase/konsole/src/konsole.C,v
retrieving revision 1.150
diff -u -p -r1.150 konsole.C
--- src/konsole.C	2001/07/29 15:33:42	1.150
+++ src/konsole.C	2001/08/01 03:17:58
@@ -214,6 +214,7 @@ Konsole::Konsole(const char* name, const
 ,alreadyNoticedBackgroundChange_(false)
 ,m_histSize(DEFAULT_HISTORY_SIZE)
 ,b_histEnabled(true)
+,b_inheritArgs(false)
 {
   //kdDebug() << "pgm = " << pgm << " at startup" << endl;
   //QTime time;
@@ -776,6 +777,7 @@ void Konsole::readProperties(KConfig* co
    n_scroll   = QMIN(config->readUnsignedNumEntry("scrollbar",TEWidget::SCRRIGHT),2);
    s_word_seps= config->readEntry("wordseps",":@-./_~");
    b_framevis = config->readBoolEntry("has frame",TRUE);
+   b_inheritArgs = config->readBoolEntry("inheritArgs",FALSE);
 
    // Global options ///////////////////////
 
@@ -1394,9 +1396,8 @@ TESession *Konsole::newSession(KSimpleCo
       txt = co->readEntry("Comment", txt);
       fno = co->readUnsignedNumEntry("Font", fno);
 
-      if (!(bIsBlankNewSession)) {
-        cmdArgs.append(shell);
-        }
+      if ( (!bIsBlankNewSession) || !b_inheritArgs ) 
+	cmdArgs.append(shell);
 
       if (!cmd.isEmpty())
       {
@@ -1404,11 +1405,13 @@ TESession *Konsole::newSession(KSimpleCo
         cmdArgs.append(QFile::encodeName(cmd));
       }
   }
-  else  {
-      cmdArgs = args;
-      }
+  else 
+    {
+      if( !args.isEmpty() )
+	cmdArgs = args;
+    }
 
-  if (bIsBlankNewSession) {
+  if ( b_inheritArgs && bIsBlankNewSession) {
     //This session was started with the New button or the newSession key combo
     shell = pgm;
     if(!(args.isEmpty())) {


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

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