tag 424430 patch pending
thanks

Hi,

here is a patch. Note that moving stuff out of the source directory is as bad an idea. I will NMU this issue, most likely together with #445281 (Python policy).

Kind regards

T.
--
Thomas Viehmann, http://thomas.viehmann.net/
diff -u kde-guidance-0.8.0/debian/changelog kde-guidance-0.8.0/debian/changelog
--- kde-guidance-0.8.0/debian/changelog
+++ kde-guidance-0.8.0/debian/changelog
@@ -1,3 +1,10 @@
+kde-guidance (0.8.0-2.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix double build FTBFS. They annoy NMUers. Closes: #424430
+
+ -- Thomas Viehmann <[EMAIL PROTECTED]>  Fri, 07 Mar 2008 22:06:05 +0100
+
 kde-guidance (0.8.0-2) unstable; urgency=low
 
   * Add Build-Depends: python-qt-dev
diff -u kde-guidance-0.8.0/debian/rules kde-guidance-0.8.0/debian/rules
--- kde-guidance-0.8.0/debian/rules
+++ kde-guidance-0.8.0/debian/rules
@@ -35,8 +35,8 @@
 		$(PYSUPPORT_PATH)/displayconfig-hwprobe.py
 
 	# move python modules in PYSUPPORT_PATH
-	mv $(DEB_DESTDIR)/usr/lib/python*/site-packages/*.py $(PYSUPPORT_PATH)
-	mv $(DEB_DESTDIR)/usr/share/apps/guidance/*.py $(PYSUPPORT_PATH)
+	cp $(DEB_DESTDIR)/usr/lib/python*/site-packages/*.py $(PYSUPPORT_PATH)
+	cp $(DEB_DESTDIR)/usr/share/apps/guidance/*.py $(PYSUPPORT_PATH)
 
         # fix script-not-executable
 	chmod 0755 $(PYSUPPORT_PATH)/xf86misc.py
@@ -96,8 +96,8 @@
 	(cd powermanager; kdepyuic tooltip.ui)
 	(cd powermanager; kdepyuic notify.ui)
 
-	# move python modules in PYSUPPORT_PATH
-	mv powermanager/*.py $(PYSUPPORT_PATH)
+	# copy python modules in PYSUPPORT_PATH
+	cp powermanager/*.py $(PYSUPPORT_PATH)
 
 	# generate guidance-power-manager script
 	echo "#!/bin/sh" > $(DEB_DESTDIR)/usr/bin/guidance-power-manager
only in patch2:
unchanged:
--- kde-guidance-0.8.0.orig/wineconfig/kcm_wineconfig.cpp
+++ kde-guidance-0.8.0/wineconfig/kcm_wineconfig.cpp
@@ -0,0 +1,141 @@
+
+/*
+ * pykcm_launcher.cpp
+ * 
+ * Launch Control Centre modules written in Python using an embedded Python
+ * interpreter.
+ * Based on David Boddie's PyKDE-components.
+ */
+
+// pythonize.h must be included first.
+#include <pythonize.h>
+#include <kcmodule.h>
+#include <kglobal.h>
+#include <klocale.h>
+#include <klibloader.h>
+#include <kstandarddirs.h>
+#include <ksimpleconfig.h>
+#include <qstring.h>
+#include <sip.h>
+
+#define MODULE_DIR "/tmp/kde-guidance-0.8.0/debian/tmp/usr/share/apps/guidance"
+#define MODULE_NAME "wineconfig"
+#define FACTORY "create_wineconfig"
+#define CPP_FACTORY create_wineconfig
+#define LIB_PYTHON "libpython2.4.so"
+#define debug 1
+
+static KCModule *report_error(char *msg) {
+    if (debug) printf ("error: %s\n", msg);
+    return NULL;
+}
+
+static KCModule* return_instance( QWidget *parent, const char *name ) {
+    KCModule* kcmodule;
+    PyObject *pyKCModuleTuple; 
+    PyObject *pyKCModule;
+    Pythonize *pyize;  // Pythonize object to manage the Python interpreter.
+    int isErr;
+    
+    // Try to determine what py script we're loading. Note that "name"
+    // typically appears to be NULL.
+    QString script(MODULE_NAME);
+
+    // Reload libpython, but this time tell the runtime linker to make the
+    // symbols global and available for later loaded libraries/module.
+    KLibLoader::self()->globalLibrary(LIB_PYTHON);
+    
+    // Start the interpreter.
+    pyize = initialize();
+    if (!pyize) {
+        return report_error ("***Failed to start interpreter\n");
+    }
+    
+    // Add the path to the python script to the interpreter search path.
+    QString path = QString(MODULE_DIR);
+    if(path == QString::null) {
+        return report_error ("***Failed to locate script path");
+    }
+    if(!pyize->appendToSysPath (path.latin1 ())) {
+        return report_error ("***Failed to set sys.path\n");
+    }
+    
+    // Load the Python script.
+    PyObject *pyModule = pyize->importModule ((char *)script.latin1 ());
+    if(!pyModule) {
+        PyErr_Print();
+        return report_error ("***failed to import module\n");
+    }
+
+    // Inject a helper function
+    QString bridge = QString("import sip\n" 
+                            "import qt\n"
+                            "def kcontrol_bridge_" FACTORY "(parent,name):\n"
+                             "    if parent!=0:\n"
+#if SIP_VERSION >= 0x040200
+                             "        wparent = sip.wrapinstance(parent,qt.QWidget)\n"
+#else                             
+                             "        wparent = sip.wrapinstance(parent,'QWidget')\n"
+#endif
+                             "    else:\n"
+                             "        wparent = None\n"
+                             "    inst = " FACTORY "(wparent, name)\n"
+                             "    return (inst,sip.unwrapinstance(inst))\n");
+    PyRun_String(bridge.latin1(),Py_file_input,PyModule_GetDict(pyModule),PyModule_GetDict(pyModule));
+
+    // Get the Python module's factory function.
+    PyObject *kcmFactory = pyize->getNewObjectRef(pyModule, "kcontrol_bridge_" FACTORY);
+    if(!kcmFactory) {
+        return report_error ("***failed to find module factory\n");
+    }
+    
+    // Call the factory function. Set up the args.
+    PyObject *pyParent = PyLong_FromVoidPtr(parent);
+    PyObject *pyName = PyString_FromString(MODULE_NAME);
+        // Using NN here is effect gives our references to the arguement away.
+    PyObject *args = Py_BuildValue ("NN", pyParent, pyName);
+    if(pyName && pyParent && args) {
+        // run the factory function
+        pyKCModuleTuple = pyize->runFunction(kcmFactory, args);
+        if(!pyKCModuleTuple) {
+            PyErr_Print();
+            return report_error ("*** runFunction failure\n;");
+        }
+    } else {
+        return report_error ("***failed to create args\n");
+    }
+    // cleanup a bit
+    pyize->decref(args);
+    pyize->decref(kcmFactory);
+
+    // Stop this from getting garbage collected.
+    Py_INCREF(PyTuple_GET_ITEM(pyKCModuleTuple,0));
+    
+    // convert the KCModule PyObject to a real C++ KCModule *.
+    isErr = 0;
+    pyKCModule = PyTuple_GET_ITEM(pyKCModuleTuple,1);
+    kcmodule = (KCModule *)PyLong_AsVoidPtr(pyKCModule);
+    if(!kcmodule) {
+        return report_error ("***failed sip conversion to C++ pointer\n");
+    }
+    pyize->decref(pyKCModuleTuple);
+    
+    // PyKDE can't run the module without this - Pythonize
+    // grabs the lock at initialization and we have to give
+    // it back before exiting. At this point, we no longer need
+    // it.
+    //pyize->releaseLock ();
+
+    // take care of any translation info
+    KGlobal::locale()->insertCatalogue(script);
+
+    // Return the pointer to our new KCModule
+    return kcmodule;
+}
+
+extern "C" {
+    // Factory function that kcontrol will call.
+    KCModule* CPP_FACTORY(QWidget *parent, const char *name) {
+        return return_instance(parent, name);
+    }
+}
only in patch2:
unchanged:
--- kde-guidance-0.8.0.orig/powermanager/tooltip.py
+++ kde-guidance-0.8.0/powermanager/tooltip.py
@@ -0,0 +1,59 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'tooltip.ui'
+#
+# Created: Fri Mar 7 22:16:15 2008
+#      by: The PyQt User Interface Compiler (pyuic) 3.17.4
+#
+# WARNING! All changes made in this file will be lost!
+
+
+import sys
+from qt import *
+from kdecore import KCmdLineArgs, KApplication
+from kdeui import *
+
+from kdeui import *
+
+class ToolTip(QWidget):
+    def __init__(self,parent = None,name = None,fl = 0):
+        QWidget.__init__(self,parent,name,fl)
+
+        if not name:
+            self.setName("ToolTip")
+
+        self.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.MinimumExpanding,0,0,self.sizePolicy().hasHeightForWidth()))
+        self.setMinimumSize(QSize(240,0))
+        self.setBaseSize(QSize(200,0))
+
+        ToolTipLayout = QVBoxLayout(self,0,6,"ToolTipLayout")
+
+        self.languageChange()
+
+        self.resize(QSize(300,80).expandedTo(self.minimumSizeHint()))
+        self.clearWState(Qt.WState_Polished)
+
+
+    def languageChange(self):
+        self.setCaption(self.__tr("Form1"))
+
+
+    def ToolTip_destroyed(self,a0):
+        print "ToolTip.ToolTip_destroyed(QObject*): Not implemented yet"
+
+    def __tr(self,s,c = None):
+        return qApp.translate("ToolTip",s,c)
+
+if __name__ == "__main__":
+    appname     = ""
+    description = ""
+    version     = ""
+
+    KCmdLineArgs.init (sys.argv, appname, description, version)
+    a = KApplication ()
+
+    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
+    w = ToolTip()
+    a.setMainWidget(w)
+    w.show()
+    a.exec_loop()
only in patch2:
unchanged:
--- kde-guidance-0.8.0.orig/powermanager/notify.py
+++ kde-guidance-0.8.0/powermanager/notify.py
@@ -0,0 +1,70 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'notify.ui'
+#
+# Created: Fri Mar 7 22:16:15 2008
+#      by: The PyQt User Interface Compiler (pyuic) 3.17.4
+#
+# WARNING! All changes made in this file will be lost!
+
+
+import sys
+from qt import *
+from kdecore import KCmdLineArgs, KApplication
+from kdeui import *
+
+
+class NotifyWidget(QWidget):
+    def __init__(self,parent = None,name = None,fl = 0):
+        QWidget.__init__(self,parent,name,fl)
+
+        if not name:
+            self.setName("NotifyWidgetUI")
+
+        self.setSizePolicy(QSizePolicy(QSizePolicy.MinimumExpanding,QSizePolicy.MinimumExpanding,0,0,self.sizePolicy().hasHeightForWidth()))
+        self.setBaseSize(QSize(0,0))
+
+        NotifyWidgetUILayout = QGridLayout(self,1,1,11,6,"NotifyWidgetUILayout")
+
+        self.Icon = QLabel(self,"Icon")
+        self.Icon.setSizePolicy(QSizePolicy(QSizePolicy.Fixed,QSizePolicy.Fixed,0,0,self.Icon.sizePolicy().hasHeightForWidth()))
+        self.Icon.setScaledContents(1)
+
+        NotifyWidgetUILayout.addMultiCellWidget(self.Icon,0,1,0,0)
+
+        self.Text = QLabel(self,"Text")
+
+        NotifyWidgetUILayout.addWidget(self.Text,1,1)
+
+        self.Caption = QLabel(self,"Caption")
+
+        NotifyWidgetUILayout.addWidget(self.Caption,0,1)
+
+        self.languageChange()
+
+        self.resize(QSize(151,60).expandedTo(self.minimumSizeHint()))
+        self.clearWState(Qt.WState_Polished)
+
+
+    def languageChange(self):
+        self.setCaption(self.__tr("Form3"))
+        self.Text.setText(QString.null)
+        self.Caption.setText(self.__tr("<b>Powermanager:</b>"))
+
+
+    def __tr(self,s,c = None):
+        return qApp.translate("NotifyWidget",s,c)
+
+if __name__ == "__main__":
+    appname     = ""
+    description = ""
+    version     = ""
+
+    KCmdLineArgs.init (sys.argv, appname, description, version)
+    a = KApplication ()
+
+    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
+    w = NotifyWidget()
+    a.setMainWidget(w)
+    w.show()
+    a.exec_loop()
only in patch2:
unchanged:
--- kde-guidance-0.8.0.orig/powermanager/guidance_power_manager_ui.py
+++ kde-guidance-0.8.0/powermanager/guidance_power_manager_ui.py
@@ -0,0 +1,243 @@
+# -*- coding: utf-8 -*-
+
+# Form implementation generated from reading ui file 'guidance_power_manager_ui.ui'
+#
+# Created: Fri Mar 7 22:16:15 2008
+#      by: The PyQt User Interface Compiler (pyuic) 3.17.4
+#
+# WARNING! All changes made in this file will be lost!
+
+
+import sys
+from qt import *
+from kdecore import KCmdLineArgs, KApplication
+from kdeui import *
+
+
+
+class PowerManagerUI(QWidget):
+    def __init__(self,parent = None,name = None,fl = 0):
+        QWidget.__init__(self,parent,name,fl)
+
+        if not name:
+            self.setName("PowerManagerUI")
+
+        self.setMouseTracking(1)
+
+        PowerManagerUILayout = QVBoxLayout(self,11,6,"PowerManagerUILayout")
+
+        self.GeneralSettingsBox = QGroupBox(self,"GeneralSettingsBox")
+        self.GeneralSettingsBox.setColumnLayout(0,Qt.Vertical)
+        self.GeneralSettingsBox.layout().setSpacing(6)
+        self.GeneralSettingsBox.layout().setMargin(11)
+        GeneralSettingsBoxLayout = QVBoxLayout(self.GeneralSettingsBox.layout())
+        GeneralSettingsBoxLayout.setAlignment(Qt.AlignTop)
+
+        self.lockScreenOnResume = QCheckBox(self.GeneralSettingsBox,"lockScreenOnResume")
+        GeneralSettingsBoxLayout.addWidget(self.lockScreenOnResume)
+        PowerManagerUILayout.addWidget(self.GeneralSettingsBox)
+
+        self.MainsPoweredBox = QGroupBox(self,"MainsPoweredBox")
+        self.MainsPoweredBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.MainsPoweredBox.sizePolicy().hasHeightForWidth()))
+        self.MainsPoweredBox.setColumnLayout(0,Qt.Vertical)
+        self.MainsPoweredBox.layout().setSpacing(6)
+        self.MainsPoweredBox.layout().setMargin(11)
+        MainsPoweredBoxLayout = QVBoxLayout(self.MainsPoweredBox.layout())
+        MainsPoweredBoxLayout.setAlignment(Qt.AlignTop)
+
+        layout17 = QHBoxLayout(None,0,6,"layout17")
+
+        self.PoweredBrightnessLabel = QLabel(self.MainsPoweredBox,"PoweredBrightnessLabel")
+        layout17.addWidget(self.PoweredBrightnessLabel)
+
+        self.PoweredBrightnessSlider = QSlider(self.MainsPoweredBox,"PoweredBrightnessSlider")
+        self.PoweredBrightnessSlider.setMouseTracking(1)
+        self.PoweredBrightnessSlider.setAcceptDrops(1)
+        self.PoweredBrightnessSlider.setMaxValue(7)
+        self.PoweredBrightnessSlider.setLineStep(1)
+        self.PoweredBrightnessSlider.setPageStep(1)
+        self.PoweredBrightnessSlider.setOrientation(QSlider.Horizontal)
+        self.PoweredBrightnessSlider.setTickmarks(QSlider.Both)
+        self.PoweredBrightnessSlider.setTickInterval(0)
+        layout17.addWidget(self.PoweredBrightnessSlider)
+        MainsPoweredBoxLayout.addLayout(layout17)
+
+        layout13 = QHBoxLayout(None,0,6,"layout13")
+        spacer12_3_2_2 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        layout13.addItem(spacer12_3_2_2)
+
+        self.PoweredIdleLabel = QLabel(self.MainsPoweredBox,"PoweredIdleLabel")
+        layout13.addWidget(self.PoweredIdleLabel)
+
+        self.PoweredIdleTime = QSpinBox(self.MainsPoweredBox,"PoweredIdleTime")
+        layout13.addWidget(self.PoweredIdleTime)
+
+        self.PoweredIdleCombo = QComboBox(0,self.MainsPoweredBox,"PoweredIdleCombo")
+        layout13.addWidget(self.PoweredIdleCombo)
+        MainsPoweredBoxLayout.addLayout(layout13)
+
+        layout13_2_2 = QHBoxLayout(None,0,6,"layout13_2_2")
+        spacer12_3_2_2_3_2 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        layout13_2_2.addItem(spacer12_3_2_2_3_2)
+
+        self.PoweredFreqLabel = QLabel(self.MainsPoweredBox,"PoweredFreqLabel")
+        layout13_2_2.addWidget(self.PoweredFreqLabel)
+
+        self.PoweredFreqCombo = QComboBox(0,self.MainsPoweredBox,"PoweredFreqCombo")
+        layout13_2_2.addWidget(self.PoweredFreqCombo)
+        MainsPoweredBoxLayout.addLayout(layout13_2_2)
+        PowerManagerUILayout.addWidget(self.MainsPoweredBox)
+
+        self.BatteryBox = QGroupBox(self,"BatteryBox")
+        self.BatteryBox.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.BatteryBox.sizePolicy().hasHeightForWidth()))
+        self.BatteryBox.setColumnLayout(0,Qt.Vertical)
+        self.BatteryBox.layout().setSpacing(6)
+        self.BatteryBox.layout().setMargin(11)
+        BatteryBoxLayout = QVBoxLayout(self.BatteryBox.layout())
+        BatteryBoxLayout.setAlignment(Qt.AlignTop)
+
+        layout16 = QHBoxLayout(None,0,6,"layout16")
+
+        self.BatteryBrightnessLabel = QLabel(self.BatteryBox,"BatteryBrightnessLabel")
+        layout16.addWidget(self.BatteryBrightnessLabel)
+
+        self.BatteryBrightnessSlider = QSlider(self.BatteryBox,"BatteryBrightnessSlider")
+        self.BatteryBrightnessSlider.setMouseTracking(1)
+        self.BatteryBrightnessSlider.setMaxValue(7)
+        self.BatteryBrightnessSlider.setPageStep(1)
+        self.BatteryBrightnessSlider.setOrientation(QSlider.Horizontal)
+        self.BatteryBrightnessSlider.setTickmarks(QSlider.Both)
+        layout16.addWidget(self.BatteryBrightnessSlider)
+        BatteryBoxLayout.addLayout(layout16)
+
+        layout14 = QGridLayout(None,1,1,0,6,"layout14")
+
+        self.BatteryIdleCombo = QComboBox(0,self.BatteryBox,"BatteryIdleCombo")
+
+        layout14.addWidget(self.BatteryIdleCombo,1,4)
+
+        self.BatteryIdleLabel = QLabel(self.BatteryBox,"BatteryIdleLabel")
+
+        layout14.addWidget(self.BatteryIdleLabel,1,2)
+
+        self.BatteryCriticalCombo = QComboBox(0,self.BatteryBox,"BatteryCriticalCombo")
+
+        layout14.addWidget(self.BatteryCriticalCombo,0,4)
+
+        self.BatteryCriticalLabel = QLabel(self.BatteryBox,"BatteryCriticalLabel")
+
+        layout14.addMultiCellWidget(self.BatteryCriticalLabel,0,0,1,2)
+
+        self.BatteryIdleTime = QSpinBox(self.BatteryBox,"BatteryIdleTime")
+
+        layout14.addWidget(self.BatteryIdleTime,1,3)
+
+        self.CriticalRemainTime = QSpinBox(self.BatteryBox,"CriticalRemainTime")
+
+        layout14.addWidget(self.CriticalRemainTime,0,3)
+        spacer12_3 = QSpacerItem(28,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        layout14.addItem(spacer12_3,0,0)
+        spacer12_3_2 = QSpacerItem(50,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        layout14.addMultiCell(spacer12_3_2,1,1,0,1)
+        BatteryBoxLayout.addLayout(layout14)
+
+        layout13_2 = QHBoxLayout(None,0,6,"layout13_2")
+        spacer12_3_2_2_3 = QSpacerItem(200,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        layout13_2.addItem(spacer12_3_2_2_3)
+
+        self.BatteryFreqLabel = QLabel(self.BatteryBox,"BatteryFreqLabel")
+        layout13_2.addWidget(self.BatteryFreqLabel)
+
+        self.BatteryFreqCombo = QComboBox(0,self.BatteryBox,"BatteryFreqCombo")
+        layout13_2.addWidget(self.BatteryFreqCombo)
+        BatteryBoxLayout.addLayout(layout13_2)
+        PowerManagerUILayout.addWidget(self.BatteryBox)
+
+        self.LaptopLidRadios = QButtonGroup(self,"LaptopLidRadios")
+        self.LaptopLidRadios.setSizePolicy(QSizePolicy(QSizePolicy.Preferred,QSizePolicy.Fixed,0,0,self.LaptopLidRadios.sizePolicy().hasHeightForWidth()))
+        self.LaptopLidRadios.setFrameShape(QButtonGroup.GroupBoxPanel)
+        self.LaptopLidRadios.setColumnLayout(0,Qt.Vertical)
+        self.LaptopLidRadios.layout().setSpacing(5)
+        self.LaptopLidRadios.layout().setMargin(11)
+        LaptopLidRadiosLayout = QHBoxLayout(self.LaptopLidRadios.layout())
+        LaptopLidRadiosLayout.setAlignment(Qt.AlignTop)
+
+        self.laptopClosedNone = QRadioButton(self.LaptopLidRadios,"laptopClosedNone")
+        LaptopLidRadiosLayout.addWidget(self.laptopClosedNone)
+
+        self.laptopClosedBlank = QRadioButton(self.LaptopLidRadios,"laptopClosedBlank")
+        LaptopLidRadiosLayout.addWidget(self.laptopClosedBlank)
+
+        self.laptopClosedSuspend = QRadioButton(self.LaptopLidRadios,"laptopClosedSuspend")
+        LaptopLidRadiosLayout.addWidget(self.laptopClosedSuspend)
+
+        self.laptopClosedHibernate = QRadioButton(self.LaptopLidRadios,"laptopClosedHibernate")
+        LaptopLidRadiosLayout.addWidget(self.laptopClosedHibernate)
+
+        self.laptopClosedShutdown = QRadioButton(self.LaptopLidRadios,"laptopClosedShutdown")
+        LaptopLidRadiosLayout.addWidget(self.laptopClosedShutdown)
+        spacer12_2 = QSpacerItem(213,20,QSizePolicy.Expanding,QSizePolicy.Minimum)
+        LaptopLidRadiosLayout.addItem(spacer12_2)
+        PowerManagerUILayout.addWidget(self.LaptopLidRadios)
+        spacer11 = QSpacerItem(31,80,QSizePolicy.Minimum,QSizePolicy.Expanding)
+        PowerManagerUILayout.addItem(spacer11)
+
+        self.languageChange()
+
+        self.resize(QSize(505,374).expandedTo(self.minimumSizeHint()))
+        self.clearWState(Qt.WState_Polished)
+
+
+    def languageChange(self):
+        self.setCaption(self.__tr("PowerManagerUI"))
+        self.GeneralSettingsBox.setTitle(self.__tr("General Settings"))
+        self.lockScreenOnResume.setText(self.__tr("Lock screen on resume"))
+        self.MainsPoweredBox.setTitle(self.__tr("Mains Powered"))
+        self.PoweredBrightnessLabel.setText(self.__tr("Brightness"))
+        QWhatsThis.add(self.PoweredBrightnessSlider,self.__tr("With this slider you can set the brightness when the system is plugged into the socket outlet"))
+        self.PoweredIdleLabel.setText(self.__tr("When the system is idle for more than"))
+        self.PoweredIdleTime.setPrefix(QString.null)
+        self.PoweredIdleTime.setSuffix(self.__tr(" min"))
+        QWhatsThis.add(self.PoweredIdleTime,self.__tr("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action."))
+        self.PoweredFreqLabel.setText(self.__tr("CPU frequency scaling policy"))
+        self.BatteryBox.setTitle(self.__tr("Battery Powered"))
+        self.BatteryBrightnessLabel.setText(self.__tr("Brightness"))
+        QWhatsThis.add(self.BatteryBrightnessSlider,self.__tr("This slider controls the brightness when the system runs on batteries"))
+        self.BatteryIdleLabel.setText(self.__tr("When the system is idle for more than"))
+        self.BatteryCriticalLabel.setText(self.__tr("When battery remaining time drops below"))
+        self.BatteryIdleTime.setPrefix(QString.null)
+        self.BatteryIdleTime.setSuffix(self.__tr(" min"))
+        QWhatsThis.add(self.BatteryIdleTime,self.__tr("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action."))
+        self.CriticalRemainTime.setPrefix(QString.null)
+        self.CriticalRemainTime.setSuffix(self.__tr(" min"))
+        QWhatsThis.add(self.CriticalRemainTime,self.__tr("To prevent data loss or other damage, you can have the system suspend or hibernate, so you don't run accidentally out of battery power. Configure the number of minutes below which the machine will run the configured action."))
+        self.BatteryFreqLabel.setText(self.__tr("CPU frequency scaling policy"))
+        self.LaptopLidRadios.setTitle(self.__tr("When Laptop Lid Closed"))
+        self.laptopClosedNone.setText(self.__tr("Do nothing"))
+        self.laptopClosedBlank.setText(self.__tr("Lock screen"))
+        self.laptopClosedSuspend.setText(self.__tr("Suspend"))
+        QToolTip.add(self.laptopClosedSuspend,self.__tr("Suspend to Memory"))
+        QWhatsThis.add(self.laptopClosedSuspend,self.__tr("Suspend is a sleep state, the system will consume only very little energy when suspended"))
+        self.laptopClosedHibernate.setText(self.__tr("Hibernate"))
+        QToolTip.add(self.laptopClosedHibernate,self.__tr("Suspend to Disk"))
+        QWhatsThis.add(self.laptopClosedHibernate,self.__tr("Hibernate or \"Suspend to Disk\" is a deep sleepstate, allowing the system to power off completely"))
+        self.laptopClosedShutdown.setText(self.__tr("Shutdown"))
+        QToolTip.add(self.laptopClosedShutdown,self.__tr("Halt the machine"))
+
+
+    def __tr(self,s,c = None):
+        return qApp.translate("PowerManagerUI",s,c)
+
+if __name__ == "__main__":
+    appname     = ""
+    description = ""
+    version     = ""
+
+    KCmdLineArgs.init (sys.argv, appname, description, version)
+    a = KApplication ()
+
+    QObject.connect(a,SIGNAL("lastWindowClosed()"),a,SLOT("quit()"))
+    w = PowerManagerUI()
+    a.setMainWidget(w)
+    w.show()
+    a.exec_loop()
_______________________________________________
pkg-kde-extras mailing list
pkg-kde-extras@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-kde-extras

Reply via email to