From kde-core-devel Thu Mar 13 09:30:36 2003 From: David Faure Date: Thu, 13 Mar 2003 09:30:36 +0000 To: kde-core-devel Subject: Re: StatusBar in KMainWindow X-MARC-Message: https://marc.info/?l=kde-core-devel&m=104754793227471 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Thursday 13 March 2003 09:05, Benjamin Meyer wrote: > @@ -729,9 +730,11 @@ void KMainWindow::applyMainWindowSetting > i = config->readListEntry (QString::fromLatin1("StatusBar"), > entryList, ';'); > entry = entryList.first(); > if (entry == QString::fromLatin1("Disabled")){ > + d->showStatusbar->setChecked(false); > sb->hide(); > } > else{ > + d->showStatusbar->setChecked(true); > sb->show(); > } > } > @@ -939,6 +942,8 @@ KStatusBar *KMainWindow::statusBar() > // trigger a re-layout and trigger a call to the private > // setStatusBar method. > QMainWindow::statusBar(); > + d->showStatusbar = KStdAction::showStatusbar(this, > SLOT(setSettingsDirty()), actionCollection()); > + connect(d->showStatusbar, SIGNAL(toggled(bool)), sb, > SLOT(setShown(bool))); > } > return sb; > } This might be a little too intrusive IMHO. The app will have no way to choose whether it wants this action or not. And in e.g. Konqueror we don't want it (there isn't a single statusbar, but one per view). I think we rather need a dedicated class, KToggleStatusBar, like we have KToggleToolBar, that does all the magic behind the scenes, but one still has to create it explicitly using KStdAction::showStatusbar. - -- David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se Qt/KDE/KOffice developer Klarälvdalens Datakonsult AB, Platform-independent software solutions -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) iD4DBQE+cE++72KcVAmwbhARApxuAJ9PdFnNykXRcRq9Em3JjZhRtyDXqQCYzghn abkj/emw/HyxCqL6f7pLxw== =A71P -----END PGP SIGNATURE-----