From 2d5b7ef7c2e7c5dc982b66ab3f4210a5cf605c73 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 25 Jan 2013 00:14:08 -0600 Subject: [PATCH] Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4 --- displayconfig/displayconfig.py | 12 +++++------ grubconfig/grubconfig.py | 2 +- mountconfig/mountconfig.py | 8 ++++---- powermanager/guidance-power-manager.py | 2 +- serviceconfig/serviceconfig.py | 8 ++++---- userconfig/userconfig.py | 8 ++++---- wineconfig/kcm_wineconfig.cpp | 28 +++++++++++++------------- wineconfig/wineconfig.py | 18 ++++++++--------- 8 files changed, 43 insertions(+), 43 deletions(-) diff --git a/displayconfig/displayconfig.py b/displayconfig/displayconfig.py index ac8c8ce..bc9ba60 100755 --- a/displayconfig/displayconfig.py +++ b/displayconfig/displayconfig.py @@ -387,7 +387,7 @@ class MonitorDialog(KDialogBase): if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule ############################################################################ class DisplayApp(programbase): @@ -402,8 +402,8 @@ class DisplayApp(programbase): self.setButtonText(KDialogBase.User1,i18n("Reset")) self.setButtonText(KDialogBase.User2,i18n("About")) else: - KCModule.__init__(self,parent,name) - self.setButtons(KCModule.Apply|KCModule.Reset) + TDECModule.__init__(self,parent,name) + self.setButtons(TDECModule.Apply|TDECModule.Reset) self.aboutdata = MakeAboutData() # This line has the effect of hiding the "Admin only" message and also forcing @@ -412,7 +412,7 @@ class DisplayApp(programbase): self.setUseRootOnlyMsg(False) # Create a configuration object. - self.config = KConfig("displayconfigrc") + self.config = TDEConfig("displayconfigrc") # Compact mode means that we have to make the GUI # much smaller to fit on low resolution screens. @@ -713,7 +713,7 @@ class DisplayApp(programbase): if not standalone: tabcontrol.addTab(self.dpmspage,tabname) - def save(self): # KCModule + def save(self): # TDECModule xorg_config_changed = self.xsetup.isXorgConfigChanged() restart_recommended = self.xsetup.getRestartHint() @@ -819,7 +819,7 @@ class DisplayApp(programbase): print "Live gamma change not supported" KDialogBase.slotClose(self) - def load(self): # KCModule + def load(self): # TDECModule self.__reset() self._sendChangedSignal() diff --git a/grubconfig/grubconfig.py b/grubconfig/grubconfig.py index 435d701..eb948cf 100644 --- a/grubconfig/grubconfig.py +++ b/grubconfig/grubconfig.py @@ -37,7 +37,7 @@ standalone = __name__=='__main__' if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule parsable = ["default","menu","color","timeout","hiddenmenu","title","root","kernel","initrd"] cat1 = ["default","menu","color","timeout","hiddenmenu","root","initrd"] diff --git a/mountconfig/mountconfig.py b/mountconfig/mountconfig.py index 9ffdca1..12cb349 100755 --- a/mountconfig/mountconfig.py +++ b/mountconfig/mountconfig.py @@ -2851,7 +2851,7 @@ class MountGroupListViewItem(KListViewItem): if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule class MountConfigApp(programbase): ######################################################################## @@ -2865,13 +2865,13 @@ class MountConfigApp(programbase): self.setButtonText(KDialogBase.User1,i18n("About")) topwidget = self.plainPage() else: - KCModule.__init__(self,parent,name) + TDECModule.__init__(self,parent,name) self.setButtons(0) self.aboutdata = MakeAboutData() topwidget = self # Create a configuration object. - self.config = KConfig("mountconfigrc") + self.config = TDEConfig("mountconfigrc") TDEGlobal.iconLoader().addAppDir("guidance") self.updatingGUI = False @@ -3274,7 +3274,7 @@ class MountConfigApp(programbase): return self.aboutdata def buttons(self): # Only supply a Help button. Other choices are Default and Apply. - return KCModule.Help + return TDECModule.Help ############################################################################ # Factory function for KControl diff --git a/powermanager/guidance-power-manager.py b/powermanager/guidance-power-manager.py index 1f25691..c861bfa 100755 --- a/powermanager/guidance-power-manager.py +++ b/powermanager/guidance-power-manager.py @@ -91,7 +91,7 @@ class PowerManager(PowerManagerUI): self.connect(self.systray, SIGNAL("quitSelected()"), self.quit) # Configuration filename - self.config = KConfig("power-managerrc") + self.config = TDEConfig("power-managerrc") self.powermanager = PowerManage() diff --git a/serviceconfig/serviceconfig.py b/serviceconfig/serviceconfig.py index 87449fb..b93be65 100755 --- a/serviceconfig/serviceconfig.py +++ b/serviceconfig/serviceconfig.py @@ -930,7 +930,7 @@ class GentooRunLevel(SysVRunLevel): if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule # is_shown exists to prevent loadDescriptions from running two times, which is # the case when we're running inside kcontrol. Yes, this is an ugly hack. :( @@ -950,12 +950,12 @@ class SysVInitApp(programbase): KDialogBase.User1|KDialogBase.Close, KDialogBase.Close) self.setButtonText(KDialogBase.User1,i18n("About")) else: - KCModule.__init__(self,parent,name) + TDECModule.__init__(self,parent,name) self.setButtons(1) self.aboutdata = MakeAboutData() # Create a configuration object. - self.config = KConfig("serviceconfigrc") + self.config = TDEConfig("serviceconfigrc") TDEGlobal.iconLoader().addAppDir("guidance") self.updatingGUI = False @@ -1367,7 +1367,7 @@ class SysVInitApp(programbase): def buttons(self): # Only supply a Help button. Other choices are Default and Apply. - return KCModule.Help + return TDECModule.Help ############################################################################ class CommandRunner(KDialogBase): diff --git a/userconfig/userconfig.py b/userconfig/userconfig.py index d2f04e2..77b30f8 100755 --- a/userconfig/userconfig.py +++ b/userconfig/userconfig.py @@ -52,7 +52,7 @@ def QDateToSptime(qdate): if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule class UserConfigApp(programbase): def __init__(self,parent=None,name=None): @@ -64,7 +64,7 @@ class UserConfigApp(programbase): KDialogBase.User1|KDialogBase.Close, KDialogBase.Close) self.setButtonText(KDialogBase.User1,i18n("About")) else: - KCModule.__init__(self,parent,name) + TDECModule.__init__(self,parent,name) self.setButtons(0) self.aboutdata = MakeAboutData() @@ -74,7 +74,7 @@ class UserConfigApp(programbase): toplayout.setStretchFactor(tabcontrol,1) # Create a configuration object. - self.config = KConfig("userconfigrc") + self.config = TDEConfig("userconfigrc") TDEGlobal.iconLoader().addAppDir("guidance") @@ -572,7 +572,7 @@ class UserConfigApp(programbase): return self.aboutdata def buttons(self): # Only supply a Help button. Other choices are Default and Apply. - return KCModule.Help + return TDECModule.Help ########################################################################### diff --git a/wineconfig/kcm_wineconfig.cpp b/wineconfig/kcm_wineconfig.cpp index 7a34a4e..bdaf708 100644 --- a/wineconfig/kcm_wineconfig.cpp +++ b/wineconfig/kcm_wineconfig.cpp @@ -28,15 +28,15 @@ #define LIB_PYTHON "libpython2.5.so" #define debug 1 -static KCModule *report_error(char *msg) { +static TDECModule *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; +static TDECModule* return_instance( QWidget *parent, const char *name ) { + TDECModule* kcmodule; + PyObject *pyTDECModuleTuple; + PyObject *pyTDECModule; Pythonize *pyize; // Pythonize object to manage the Python interpreter. int isErr; @@ -111,8 +111,8 @@ static KCModule* return_instance( QWidget *parent, const char *name ) { PyObject *args = Py_BuildValue ("NN", pyParent, pyName); if(pyName && pyParent && args) { // run the factory function - pyKCModuleTuple = pyize->runFunction(kcmFactory, args); - if(!pyKCModuleTuple) { + pyTDECModuleTuple = pyize->runFunction(kcmFactory, args); + if(!pyTDECModuleTuple) { PyErr_Print(); return report_error ("*** runFunction failure\n;"); } @@ -124,16 +124,16 @@ static KCModule* return_instance( QWidget *parent, const char *name ) { pyize->decref(kcmFactory); // Stop this from getting garbage collected. - Py_INCREF(PyTuple_GET_ITEM(pyKCModuleTuple,0)); + Py_INCREF(PyTuple_GET_ITEM(pyTDECModuleTuple,0)); - // convert the KCModule PyObject to a real C++ KCModule *. + // convert the TDECModule PyObject to a real C++ TDECModule *. isErr = 0; - pyKCModule = PyTuple_GET_ITEM(pyKCModuleTuple,1); - kcmodule = (KCModule *)PyLong_AsVoidPtr(pyKCModule); + pyTDECModule = PyTuple_GET_ITEM(pyTDECModuleTuple,1); + kcmodule = (TDECModule *)PyLong_AsVoidPtr(pyTDECModule); if(!kcmodule) { return report_error ("***failed sip conversion to C++ pointer\n"); } - pyize->decref(pyKCModuleTuple); + pyize->decref(pyTDECModuleTuple); // PyKDE can't run the module without this - Pythonize // grabs the lock at initialization and we have to give @@ -144,13 +144,13 @@ static KCModule* return_instance( QWidget *parent, const char *name ) { // take care of any translation info TDEGlobal::locale()->insertCatalogue(script); - // Return the pointer to our new KCModule + // Return the pointer to our new TDECModule return kcmodule; } extern "C" { // Factory function that kcontrol will call. - KCModule* CPP_FACTORY(QWidget *parent, const char *name) { + TDECModule* CPP_FACTORY(QWidget *parent, const char *name) { return return_instance(parent, name); } } diff --git a/wineconfig/wineconfig.py b/wineconfig/wineconfig.py index 3b1cf85..1b6f5ef 100755 --- a/wineconfig/wineconfig.py +++ b/wineconfig/wineconfig.py @@ -55,7 +55,7 @@ isroot = os.getuid()==0 if standalone: programbase = KDialogBase else: - programbase = KCModule + programbase = TDECModule ############################################################################ class WineConfigApp(programbase): @@ -73,12 +73,12 @@ class WineConfigApp(programbase): if args.count() > 0: application = args.arg(0) else: - KCModule.__init__(self,parent,name) - self.setButtons(KCModule.Apply|KCModule.Reset) + TDECModule.__init__(self,parent,name) + self.setButtons(TDECModule.Apply|TDECModule.Reset) self.aboutdata = MakeAboutData() # Create a configuration object. - self.config = KConfig("wineconfigrc") + self.config = TDEConfig("wineconfigrc") # Compact mode means that we have to make the GUI # much smaller to fit on low resolution screens. @@ -356,7 +356,7 @@ class WineConfigApp(programbase): else: programbase.exec_loop(self) - def save(self): # KCModule + def save(self): # TDECModule # Find out what's changed generalchanged = self.generalpage.isChanged() driveschanged = not application and self.drivespage.isChanged() @@ -390,7 +390,7 @@ class WineConfigApp(programbase): def slotClose(self): # KDialogBase KDialogBase.slotClose(self) - def load(self): # KCModule + def load(self): # TDECModule self.__reset() self._sendChangedSignal() @@ -1812,7 +1812,7 @@ class AppearancePage(QWidget): appearance_tab_layout.addItem(bottomspacer) self.selecteditem = None - self.config = KConfig("wineconfigrc",False,False) + self.config = TDEConfig("wineconfigrc",False,False) self.reset() self.clearWState(Qt.WState_Polished) @@ -2111,7 +2111,7 @@ class AppearancePage(QWidget): def GetKdeColorScheme(self): """ Sets the current color scheme settings to those currently set in KDE """ # Create a configuration object. - config = KConfig("kdesktoprc") + config = TDEConfig("kdesktoprc") config.setGroup("General") self.customizableitems["Application Workspace"][0]["AppWorkSpace"][1] =\ @@ -3306,7 +3306,7 @@ class ApplicationsPage(QWidget): def GetKdeDefaultBrowser(self): """ Returns the default browser set in KDE """ # Create a configuration object. - config = KConfig("wineconfigrc") + config = TDEConfig("wineconfigrc") return str(config.lookupData(KEntryKey("General","BrowserApplication")).mValue).strip('!') def setMargin(self,margin):