[Konsole-devel] [Bug 120046] history information not used from saved profile

Kurt V.Hindenburg kurt.hindenburg at kdemail.net
Sat Jan 14 20:58:23 UTC 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=120046         




------- Additional Comments From kurt.hindenburg kdemail net  2006-01-14 21:58 -------
SVN commit 498170 by hindenburg:

Forward port: The history options (line #/enabled) are now used in 
the profiles.  Currently Konsole crashes with --profile=.  The dialogs
don't work know anyway... test later.

CCBUG: 120046 


 M  +20 -1     konsole.cpp  
 M  +1 -0      konsole.h  
 M  +12 -0     main.cpp  


--- trunk/KDE/kdebase/konsole/konsole/konsole.cpp #498169:498170
 @ -1467,8 +1467,14  @
         config->writeEntry(key, sessions.current()->isMonitorSilence());
         key = QString("MasterMode%1").arg(counter);
         config->writeEntry(key, sessions.current()->isMasterMode());
-        key = QString("TabColor%1").arg(counter);
+        //key = QString("TabColor%1").arg(counter);
         //config->writeEntry(key, tabwidget->tabColor((sessions.current())->widget()));
+/* Test this when dialogs work again
+        key = QString("History%1").arg(counter);
+        config->writeEntry(key, sessions.current()->history().getSize());
+        key = QString("HistoryEnabled%1").arg(counter);
+        config->writeEntry(key, sessions.current()->history().isOn());
+*/
 
         QString cwd=sessions.current()->getCwd();
         if (cwd.isEmpty())
 @ -3127,6 +3133,19  @
    ; //tabwidget->setTabColor( se->widget(), color );
 }
 
+void Konsole::initHistory(int lines, bool enable)
+{
+return;
+   // If no History#= is given in the profile, use the history
+   // parameter saved in konsolerc.
+   if ( lines < 0 ) lines = m_histSize;
+
+   if ( enable )
+      se->setHistory( HistoryTypeBuffer( lines ) );
+   else
+      se->setHistory( HistoryTypeNone() );
+}
+
 void Konsole::slotToggleMasterMode()
 {
   setMasterMode( masterMode->isChecked() );
--- trunk/KDE/kdebase/konsole/konsole/konsole.h #498169:498170
 @ -87,6 +87,7  @
   void initMonitorSilence(bool on);
   void initMasterMode(bool on);
   void initTabColor(QColor color);
+  void initHistory(int lines, bool enable);
   void newSession(const QString &program, const QStringList &args, const QString &term, const QString &icon, const QString &title, const QString &cwd);
   void setSchema(const QString & path);
   void setEncoding(int);
--- trunk/KDE/kdebase/konsole/konsole/main.cpp #498169:498170
 @ -519,6 +519,9  @
         //FIXME: Verify this code when KDE4 supports tab colors... kvh
         QVariant v_tabColor = sessionconfig->readEntry("TabColor0");
         m->initTabColor( v_tabColor.value<QColor>() );
+        // -1 will be changed to the default history in konsolerc
+//        m->initHistory(sessionconfig->readNumEntry("History0", -1),
+//                       sessionconfig->readBoolEntry("HistoryEnabled0", true));
 
         counter++;
 
 @ -566,6 +569,15  @
           //FIXME: Verify this code when KDE4 supports tab colors... kvh
 //          QVariant v_tabColor = sessionconfig->readEntry(key));
 //          m->initTabColor( v_tabColor.value<QColor>() );
+
+/* Test this when the dialogs work again...kvh
+          // -1 will be changed to the default history in konsolerc
+          key = QString("History%1").arg(counter);
+          QString key2 = QString("HistoryEnabled%1").arg(counter);
+          m->initHistory(sessionconfig->readNumEntry(key, -1),
+                         sessionconfig->readBoolEntry(key2, true));
+*/
+
           counter++;
         }
         m->setDefaultSession( sessionconfig->readEntry("DefaultSession","shell.desktop") );



More information about the konsole-devel mailing list