[Kwintv] kdenonbeta/kwintv3/qtvision/clients
Richard J. Moore
kwintv@mail.kde.org
Wed, 29 Jan 2003 23:51:32 +0100 (CET)
CVS commit by rich:
- Disable ToggleView actions if we don't have a view.
- Fix volume bar toggling.
- Fix view bar toggling.
CCMAIL: fidler@ecf.utoronto.ca
CCMAIL: kwintv@mail.kde.org
M +1 -0 actions.cpp 1.17
M +7 -3 mainwindow.cpp 1.53
--- kdenonbeta/kwintv3/qtvision/clients/actions.cpp #1.16:1.17
@@ -375,4 +375,5 @@ void ToggleViewAction::setView( QWidget
void ToggleViewAction::update()
{
+ setEnabled( win );
setChecked( (win ? win->isVisible() : false) );
}
--- kdenonbeta/kwintv3/qtvision/clients/mainwindow.cpp #1.52:1.53
@@ -149,8 +149,12 @@ MainWindow::MainWindow( QWidget *parent,
mb->changeItem( mb->idAt(0), i18n("&Channels") );
- KToolBar *volBar = static_cast<KToolBar *>( factory()->container("volumeToolBar", this) );
- if ( volBar ) {
+ // Setup toolbar toggles
+ KToolBar *volBar = toolBar( "volumeToolBar" );
+ if ( volBar )
_actShowVolbar->setView( volBar );
- }
+
+ KToolBar *viewBar = toolBar( "viewToolBar" );
+ if ( viewBar )
+ _actShowViewbar->setView( viewBar );
// Create context menu