|
|
|
@ -58,7 +58,7 @@ class KCMultiWidget::KCMultiWidgetPrivate
|
|
|
|
|
{}
|
|
|
|
|
|
|
|
|
|
bool hasRootKCM;
|
|
|
|
|
KCModuleProxy* currentModule;
|
|
|
|
|
TDECModuleProxy* currentModule;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -140,7 +140,7 @@ void KCMultiWidget::apply()
|
|
|
|
|
ModuleList::Iterator end = m_modules.end();
|
|
|
|
|
for( ModuleList::Iterator it = m_modules.begin(); it != end; ++it )
|
|
|
|
|
{
|
|
|
|
|
KCModuleProxy * m = ( *it ).kcm;
|
|
|
|
|
TDECModuleProxy * m = ( *it ).kcm;
|
|
|
|
|
if( m && m->changed() )
|
|
|
|
|
{
|
|
|
|
|
m->save();
|
|
|
|
@ -233,10 +233,10 @@ void KCMultiWidget::addModule(const TQString& path, bool withfallback)
|
|
|
|
|
|
|
|
|
|
KService::Ptr service = KService::serviceByStorageId( complete );
|
|
|
|
|
|
|
|
|
|
addModule( KCModuleInfo( service ), TQStringList(), withfallback);
|
|
|
|
|
addModule( TDECModuleInfo( service ), TQStringList(), withfallback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
|
|
|
|
void KCMultiWidget::addModule(const TDECModuleInfo& moduleinfo,
|
|
|
|
|
TQStringList parentmodulenames, bool withfallback)
|
|
|
|
|
{
|
|
|
|
|
if( !moduleinfo.service() )
|
|
|
|
@ -245,7 +245,7 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
|
|
|
|
if ( !kapp->authorizeControlModule( moduleinfo.service()->menuId() ))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
if( !KCModuleLoader::testModule( moduleinfo ))
|
|
|
|
|
if( !TDECModuleLoader::testModule( moduleinfo ))
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
TQFrame* page = 0;
|
|
|
|
@ -274,17 +274,17 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if(!page) {
|
|
|
|
|
KCModuleLoader::unloadModule(moduleinfo);
|
|
|
|
|
TDECModuleLoader::unloadModule(moduleinfo);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
KCModuleProxy * module;
|
|
|
|
|
TDECModuleProxy * module;
|
|
|
|
|
if( m_orphanModules.contains( moduleinfo.service() ) )
|
|
|
|
|
{
|
|
|
|
|
// the KCModule already exists - it was removed from the dialog in
|
|
|
|
|
// the TDECModule already exists - it was removed from the dialog in
|
|
|
|
|
// removeAllModules
|
|
|
|
|
module = m_orphanModules[ moduleinfo.service() ];
|
|
|
|
|
m_orphanModules.remove( moduleinfo.service() );
|
|
|
|
|
kdDebug( 710 ) << "Use KCModule from the list of orphans for " <<
|
|
|
|
|
kdDebug( 710 ) << "Use TDECModule from the list of orphans for " <<
|
|
|
|
|
moduleinfo.moduleName() << ": " << module << endl;
|
|
|
|
|
|
|
|
|
|
module->reparent( page, 0, TQPoint( 0, 0 ), true );
|
|
|
|
@ -298,7 +298,7 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
module = new KCModuleProxy( moduleinfo, withfallback, page );
|
|
|
|
|
module = new TDECModuleProxy( moduleinfo, withfallback, page );
|
|
|
|
|
|
|
|
|
|
TQStringList parentComponents = moduleinfo.service()->property(
|
|
|
|
|
"X-TDE-ParentComponents" ).toStringList();
|
|
|
|
@ -331,14 +331,14 @@ void KCMultiWidget::addModule(const KCModuleInfo& moduleinfo,
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KCModuleProxy * KCMultiWidget::currentModule() {
|
|
|
|
|
TDECModuleProxy * KCMultiWidget::currentModule() {
|
|
|
|
|
if(d) {
|
|
|
|
|
return d->currentModule;
|
|
|
|
|
}
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void KCMultiWidget::applyOrRevert(KCModuleProxy * module){
|
|
|
|
|
void KCMultiWidget::applyOrRevert(TDECModuleProxy * module){
|
|
|
|
|
if( !module || !module->changed() )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
@ -359,11 +359,11 @@ void KCMultiWidget::applyOrRevert(KCModuleProxy * module){
|
|
|
|
|
|
|
|
|
|
void KCMultiWidget::slotAboutToShow(TQWidget *page)
|
|
|
|
|
{
|
|
|
|
|
TQObject * obj = page->child( 0, "KCModuleProxy" );
|
|
|
|
|
TQObject * obj = page->child( 0, "TDECModuleProxy" );
|
|
|
|
|
if( ! obj )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
KCModuleProxy *module = ( KCModuleProxy* )obj->tqt_cast( "KCModuleProxy" );
|
|
|
|
|
TDECModuleProxy *module = ( TDECModuleProxy* )obj->tqt_cast( "TDECModuleProxy" );
|
|
|
|
|
if( ! module )
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
@ -382,14 +382,14 @@ void KCMultiWidget::slotAboutToShow(TQWidget *page)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showButton(Apply, buttons & KCModule::Apply);
|
|
|
|
|
showButton(User1, buttons & KCModule::Apply); // Reset button.
|
|
|
|
|
showButton(Apply, buttons & TDECModule::Apply);
|
|
|
|
|
showButton(User1, buttons & TDECModule::Apply); // Reset button.
|
|
|
|
|
|
|
|
|
|
// Close button. No Apply button implies a Close button.
|
|
|
|
|
showButton(User2, (buttons & KCModule::Apply)==0);
|
|
|
|
|
showButton(User2, (buttons & TDECModule::Apply)==0);
|
|
|
|
|
|
|
|
|
|
enableButton( KDialogBase::Help, buttons & KCModule::Help );
|
|
|
|
|
enableButton( KDialogBase::Default, buttons & KCModule::Default );
|
|
|
|
|
enableButton( KDialogBase::Help, buttons & TDECModule::Help );
|
|
|
|
|
enableButton( KDialogBase::Default, buttons & TDECModule::Default );
|
|
|
|
|
|
|
|
|
|
disconnect( this, TQT_SIGNAL(user3Clicked()), 0, 0 );
|
|
|
|
|
|
|
|
|
|