Dynamic creation of XMLGuiClients (plugins)

Andreas Zehender zehender at kde.org
Sun Jan 5 15:56:10 GMT 2003


On Saturday 04 January 2003 22:40, David Faure wrote:
> > What is the most efficient way to trigger an update of the xml gui when a
> > XMLGuiClient is added?
>
> factory()->removeClient() + factory()->addClient() ?

I tried that but the configuration (toolbar position etc.) gets lost.
It doesn't work without saving and restoring the configuration with
saveMainWindowSettings( ) and applyMainWindowSettings( ) in the shell.

My current solution which works only inside kpovmodeler is to call
void PMShell::updateGUI( )
{
   saveMainWindowSettings( KGlobal::config( ), "Appearance" );
   createGUI( 0 );
   createShellGUI( false );
   createGUI( m_pPart );
   applyMainWindowSettings( KGlobal::config( ), "Appearance" );
}
after the plugins are updated.

-- 
--------------------------------------------------
 Andreas Zehender, Dipl. Ing. (BA)
 Student, 10th semester computer science
 http://www.azweb.de
 az at azweb.de | zehender at kde.org      
--------------------------------------------------





More information about the kde-core-devel mailing list