StatusBar in KMainWindow
ben at meyerhome.net
Wed Mar 12 09:30:43 GMT 2003
I have made a few small changes to KMainWindow so that it can completely
maintain the statusBar. Below is the small patch. I have tested it on
applications that currently maintain the statusbar and those that don't. In
both cases it performed fine and didn't mess up the applications that handled
it on there own.
The purpose of this patch is to do two things:
1) Remove the duplication of code which is in most applications
- KStdAction::showStatusbar() variable
- Reading the default value of said statusBar
- The function that hides/shows the statusbar.
2) Lets KMainWindow know when it is hidden/shown fixing an annoying bug.
For an application to take advantage of these changes an application simply
has to call KMainWindow::statusBar() before calling either
The same can be done for the toolbar, but that would be a bit more dynamic
based and would need to be done as the xml files are read in (sense there
could be any number of toolbars with different names)
Feedback? Good to commit?
RCS file: /home/kde/kdelibs/kdeui/kmainwindow.cpp,v
retrieving revision 1.97
diff -r1.97 kmainwindow.cpp
> KToggleAction *showStatusbar = KStdAction::showStatusbar(0, 0,
> connect(showStatusbar, SIGNAL(toggled(bool)), sb,
> connect(showStatusbar, SIGNAL(activated()), this,
More information about the kde-core-devel