Author: tgoettlicher
Date: Fri May 4 15:11:12 2007
New Revision: 5484
URL: http://svn.opensuse.org/viewcvs/zypp?rev=5484&view=rev
Log:
Backend plugin configuration works
Modified:
branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp
branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.h
branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp
Modified: branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp?rev=5484&r1=5483&r2=5484&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.cpp Fri May 4 15:11:12 2007
@@ -21,6 +21,8 @@
#include
#include
#include
+#include
+
#include "UpdaterApplication.h"
#include "opensuseupdater_settings.h"
@@ -35,9 +37,11 @@
, _main(0L), _updater(0L)
{
- selectPlugin();
_main = new MainWindow(UpdaterCapabilities());
+ connect(this, SIGNAL(pluginError(const QString &)), _main, SLOT(slotAppletError(const QString &)));
+ connect(this, SIGNAL(pluginError(const QString &)), _main, SLOT(configButtonClicked()));
+ selectPlugin();
setMainWidget(_main);
if (_updater != NULL )
setupUpdater(_updater);
@@ -116,18 +120,21 @@
}
if (!pluginFound)
{
- kdDebug() << "please change backend configuration." << endl;
-
// Our configuration data contains no available backend plugin
// therefor we preselect the fist available backend plugin
- // because kcfg would overwrite this item at the config dialog
-
+ // because kcfg would overwrite this item with invalid data
+ // at the config dialog
+
+
iter = offers.begin();
if (iter != offers.end())
{
KService::Ptr service = *iter;
UpdaterSettings::setBackendPlugin(service->name());
}
+ UpdaterSettings::writeConfig();
+
+ emit(pluginError(i18n("Backend plugin is not properly configured.\nPlease use the configuration dialog to choose the correct one.")));
}
}
@@ -178,3 +185,5 @@
delete _updater;
}
+
+#include "UpdaterApplication.moc"
Modified: branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.h
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.h?rev=5484&r1=5483&r2=5484&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.h (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/UpdaterApplication.h Fri May 4 15:11:12 2007
@@ -43,13 +43,14 @@
class UpdaterApplication : public KUniqueApplication {
+ Q_OBJECT
+
public:
UpdaterApplication();
~UpdaterApplication();
void setupUpdater( Updater *updater );
- signals:
- void shutdown();
+
private:
MainWindow *_main;
@@ -57,6 +58,9 @@
bool loadPlugin(KService::Ptr service);
void selectPlugin();
+ signals:
+ void shutdown();
+ void pluginError(const QString &desc);
};
#endif
Modified: branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp
URL: http://svn.opensuse.org/viewcvs/zypp/branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp?rev=5484&r1=5483&r2=5484&view=diff
==============================================================================
--- branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp (original)
+++ branches/work/updater-kde-refactoring/updater-kde/updater/zypp/ZYppUpdater.cpp Fri May 4 15:11:12 2007
@@ -38,15 +38,12 @@
#include
#include
#include
-#include
#include
#include
#include "ZYppUpdater.h"
#include "ZYppListItem.h"
#include "MainWindow.h"
-//#include "ZYppInstallWindow.h"
-//#include "ZYppConfigWindow.h"
#include "UpdateListItem.h"
// <?xml version='1.0'?>
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org