[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Solved: Configure toolbar problem with KParts
From:       Andreas Zehender <az () azweb ! de>
Date:       2002-05-28 21:18:10
[Download RAW message or body]

Hi!

The solution is:
(a mixture of all versions in the KEditToolbar documentation)

void PMShell::slotConfigureToolbars( )
{
   saveMainWindowSettings( KGlobal::config( ), "Appearance" );
   KEditToolbar dlg( factory( ) );
   if( dlg.exec( ) )
   {
      // otherwise createGUI will segfault
      guiFactory( )->removeClient( m_pPart );
      createGUI( "kpovmodelershell.rc", false );
      guiFactory( )->addClient( m_pPart );
      applyMainWindowSettings( KGlobal::config( ), "Appearance" );
   }
}

Is the documentation of KEditToolbar correct and up to date?

On Monday 27 May 2002 18:40, Andreas Zehender wrote:
> Hi!
>
> When I configure the toolbars in kpovmodeler, all standard menu items and
> the help menu disappear.
> The main window is a KDockMainWindow ( a KMainWindow). There is another xml
> gui client: The displayed part.
>
> KDE-version: 3.0
>
> The gui creation code (in kpovmodeler/pmshell.cpp):
>
> PMShell::PMShell( )
> {
>    [...]
>    setupActions( );
>    setupView( );
>    createGUI( "kpovmodelershell.rc", false );
>    guiFactory( )->addClient( m_pPart );
>    config->setGroup( "Appearance" );
>    applyMainWindowSettings( config );
>    [...]
> }
>
> The toolbar configuration code:
>
> void PMShell::slotConfigureToolbars( )
> {
>    saveMainWindowSettings( KGlobal::config( ), "Appearance" );
>    KEditToolbar dlg( factory( ) );
>    connect( &dlg, SIGNAL( newToolbarConfig( ) ),
>             this, SLOT( slotNewToolbarConfig( ) ) );
>    dlg.exec( );
> }
>
> void PMShell::slotNewToolbarConfig( )
> {
>    applyMainWindowSettings( KGlobal::config( ), "Appearance" );
> }
>
> This problem exists in KDE2.x, too.
>
> Andreas

-- 
--------------------------------------------------
 Andreas Zehender, Dipl. Ing. (BA)
 Student, 10. Semester Informatik
 http://www.azweb.de
 az@azweb.de | zehender@kde.org      
--------------------------------------------------


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic