From 347f56e400ad0cbc996f99f7689994691beeab2a Mon Sep 17 00:00:00 2001 From: Kurt Granroth Date: Mon, 10 Apr 2000 23:14:38 +0000 Subject: [PATCH] Okay, it does NOT get more bizarre then this... y'know the problem I (and others) was having with konsole not reading in the schema and size anymore? Well, this fixes it for me. The bizarre part is where the problem appears to be -- it just doesn't make any sense! With lots of debug statements, I found out that the 'config' object stopped reading in *any* values after the 'slotToggleToolBar()' call in 'readProperties'. That is, the config->readEntry calls would *always* return the default, ignoring the saved value. I traced into the slotToggleToolbar function and found that all I had to do was comment out the 'enableToolbar' function and everything worked perfectly! I don't get it at all! The enableToolbar function has *nothing* to do with KConfig so how is it changing it all of a sudden :-( Anyway, I moved the code around in readProperties and it works now. Very very very weird. svn path=/trunk/kdebase/konsole/; revision=46262 --- src/konsole.C | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/konsole.C b/src/konsole.C index ca34828a..20fc2f29 100644 --- a/src/konsole.C +++ b/src/konsole.C @@ -535,18 +535,12 @@ void Konsole::readProperties(KConfig* config) showFrame->setChecked( b_framevis ); slotToggleFrame(); - showToolbar->setChecked(b_toolbarvis); - slotToggleToolbar(); - showMenubar->setChecked(b_menuvis); - slotToggleMenubar(); - - toolBar()->setBarPos((KToolBar::BarPosition)n_toolbarpos); // Options that should be applied to all sessions ///////////// // (1) set menu items and Konsole members QFont tmpFont("fixed"); defaultFont = config->readFontEntry("defaultfont", &tmpFont); setFont(QMIN(config->readUnsignedNumEntry("font",3),TOPFONT)); // sets n_font and menu item - setSchema(config->readEntry("schema","")); + setSchema(config->readEntry("schema", "")); // (2) apply to sessions (currently only the 1st one) // TESession* s = no2session.find(1); @@ -565,6 +559,13 @@ void Konsole::readProperties(KConfig* config) // Default values for startup, changed by "save options". Not used by SM. defaultSize.setWidth ( config->readNumEntry("defaultwidth", 0) ); defaultSize.setHeight( config->readNumEntry("defaultheight", 0) ); + + showToolbar->setChecked(b_toolbarvis); + slotToggleToolbar(); + showMenubar->setChecked(b_menuvis); + slotToggleMenubar(); + + toolBar()->setBarPos((KToolBar::BarPosition)n_toolbarpos); } /* ------------------------------------------------------------------------- */