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

List:       kde-commits
Subject:    KDE/kdebase/workspace/systemsettings/core
From:       Ben Cooksley <sourtooth () gmail ! com>
Date:       2009-09-05 5:15:52
Message-ID: 1252127752.900458.10909.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1020025 by bcooksley:

Polish support for external applications.
CCBUG: 171058

 M  +1 -0      CMakeLists.txt  
 A             ExternalAppModule.cpp   [License: GPL (v2+)]
 A             ExternalAppModule.h   [License: GPL (v2+)]
 M  +2 -13     ModuleView.cpp  
 M  +0 -1      ModuleView.h  


--- trunk/KDE/kdebase/workspace/systemsettings/core/CMakeLists.txt #1020024:1020025
@@ -17,6 +17,7 @@
     ToolTips/KToolTipItem.cpp
     ToolTips/KToolTipManager.cpp
     ToolTipManager.cpp
+    ExternalAppModule.cpp
 )
 
 KDE4_ADD_UI_FILES( systemsettingsview_LIB_SRCS externalModule.ui )
--- trunk/KDE/kdebase/workspace/systemsettings/core/ModuleView.cpp #1020024:1020025
@@ -19,7 +19,7 @@
  *****************************************************************************/
 
 #include "ModuleView.h"
-#include "ui_externalModule.h"
+#include "ExternalAppModule.h"
 
 #include <QMap>
 #include <QList>
@@ -49,7 +49,6 @@
     Private() { }
     QMap<KPageWidgetItem*, KCModuleProxy*> mPages;
     QMap<KPageWidgetItem*, KCModuleInfo*> mModules;
-    Ui::ExternalModule externalModule;
     KPageWidget* mPageWidget;
     QVBoxLayout* mLayout;
     KDialogButtonBox* mButtons;
@@ -168,12 +167,7 @@
     // Provide information to the users
 
     if( module->service()->hasServiceType("SystemSettingsExternalApp") ) { // Is it \
                an external app?
-        QProcess::startDetached( module->service()->exec() ); // Launch it!
-        QWidget * externalWidget = new QWidget( this );
-        d->externalModule.setupUi( externalWidget );
-        d->externalModule.LblText->setText( i18n("%1 is an external application and \
                has been automatically launched", module->moduleName() ) );
-        d->externalModule.PbRelaunch->setText( i18n("Relaunch %1", \
                module->moduleName()) );
-        connect( d->externalModule.PbRelaunch, SIGNAL(clicked()), this, \
SLOT(runExternal()) ); +        QWidget * externalWidget = new ExternalAppModule( \
this, module );  moduleScroll->setWidget( externalWidget );
     } else { // It must be a normal module then
         KCModuleProxy * moduleProxy = new KCModuleProxy( *module, moduleScroll );
@@ -387,9 +381,4 @@
     d->mDefault->setEnabled(buttons & KCModule::Default );
 }
 
-void ModuleView::runExternal()
-{
-    QProcess::startDetached( activeModule()->service()->exec() ); // Launch it!
-}
-
 #include "ModuleView.moc"
--- trunk/KDE/kdebase/workspace/systemsettings/core/ModuleView.h #1020024:1020025
@@ -134,7 +134,6 @@
     void activeModuleChanged( KPageWidgetItem* current, KPageWidgetItem* previous);
     void updateButtons();
     void stateChanged();
-    void runExternal();
 
 Q_SIGNALS:
     /**


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

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