Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4

pull/2/head
Timothy Pearson 11 years ago
parent 3a80ef8a0d
commit 4066d7fb18

@ -394,7 +394,7 @@ class DisplayApp(programbase):
########################################################################
def __init__(self,parent=None,name=None):
global standalone,isroot,kapp
KGlobal.locale().insertCatalogue("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
if standalone:
KDialogBase.__init__(self,KJanusWidget.Tabbed,"Display Configuration",\
@ -418,10 +418,10 @@ class DisplayApp(programbase):
# much smaller to fit on low resolution screens.
self.compact_mode = kapp.desktop().height()<=600
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
global imagedir
imagedir = unicode(KGlobal.dirs().findDirs("data","guidance/pics/displayconfig")[0])
imagedir = unicode(TDEGlobal.dirs().findDirs("data","guidance/pics/displayconfig")[0])
self.imagedir = imagedir
@ -437,7 +437,7 @@ class DisplayApp(programbase):
self.xf86server = xf86misc.XF86Server()
self.xconfigpath = self._findXorgConfig()
SetDataFileDir(unicode(KGlobal.dirs().findResourceDir("data","guidance/pcitable")) + "guidance/")
SetDataFileDir(unicode(TDEGlobal.dirs().findResourceDir("data","guidance/pcitable")) + "guidance/")
self.xsetup = XSetup(self.xconfigpath)
self.updatingGUI = True
@ -982,7 +982,7 @@ class DisplayApp(programbase):
if testserver is not None:
# Start the timed popup on the :9 display.
#servertestpy = str(KGlobal.dirs().findResource("data","guidance/servertestdialog.py"))
#servertestpy = str(TDEGlobal.dirs().findResource("data","guidance/servertestdialog.py"))
servertestpy = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),"servertestdialog.py")
pythonexe = unicode(KStandardDirs.findExe("python"))

@ -43,11 +43,11 @@ class SimpleCommandRunner(QObject):
if debug: print cmdlist
self.STDOUT_only = STDOUT_only
self.output = u""
proc = KProcess()
proc = TDEProcess()
proc.setEnvironment("LANG","US")
proc.setEnvironment("LC_ALL","US")
self.connect(proc,SIGNAL("receivedStdout(KProcess *,char *,int)"),self.slotStdout)
self.connect(proc,SIGNAL("receivedStderr(KProcess *,char *,int)"),self.slotStderr)
self.connect(proc,SIGNAL("receivedStdout(TDEProcess *,char *,int)"),self.slotStdout)
self.connect(proc,SIGNAL("receivedStderr(TDEProcess *,char *,int)"),self.slotStderr)
proc.setArguments(cmdlist)
rc = None
if proc.start(proc.Block,proc.AllOutput)==True:

@ -290,7 +290,7 @@ if standalone:
# ----------------------------------------------------------------------------
kapp = TDEApplication()
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
fuserapp = FUser(device)
fuserapp.setApp(kapp)

@ -2379,7 +2379,7 @@ class ROListBoxItem(QListBoxPixmap):
boldfont = QFont(p.font())
boldfont.setWeight(QFont.Bold)
p.setFont(boldfont)
p.setBackgroundColor(KGlobalSettings.alternateBackgroundColor())
p.setBackgroundColor(TDEGlobalSettings.alternateBackgroundColor())
p.eraseRect(0,0,self.listBox().width(),self.height(self.listBox()))
QListBoxPixmap.paint(self,p)
@ -2857,7 +2857,7 @@ class MountConfigApp(programbase):
########################################################################
def __init__(self,parent=None,name=None):
global standalone,isroot
KGlobal.locale().insertCatalogue("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
if standalone:
KDialogBase.__init__(self,KJanusWidget.Plain,i18n("Disk & Filesystems"),
@ -2873,7 +2873,7 @@ class MountConfigApp(programbase):
# Create a configuration object.
self.config = KConfig("mountconfigrc")
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
self.updatingGUI = False
self.mounttable = MountTable('/etc/fstab','/etc/mtab')
self.selectedentry = None

@ -81,7 +81,7 @@ class PowerManager(PowerManagerUI):
def __init__ (self, parent, name):
PowerManagerUI.__init__(self, parent, name)
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
# The systray icon should show and hide the KDialogBase, not only this widget,
# therefore, it gets our parent as parent.
@ -336,9 +336,9 @@ class PowerManager(PowerManagerUI):
menu.insertItem(i18n("CPU policy"), submenu)
# KGlobalAccel crashes the application in pytde
# TDEGlobalAccel crashes the application in pytde
# see http://mats.gmd.de/pipermail/pytde/2006-May/013224.html
#self.globalActions = KGlobalAccel(self)
#self.globalActions = TDEGlobalAccel(self)
#self.suspendShortcut = KShortcut("XF86Sleep")
#self.hibernateShortcut = KShortcut("XF86Standby")
#self.hshutdownShortcut = KShortcut("XF86PowerOff")
@ -1042,8 +1042,8 @@ class PowermanagerApp(KDialogBase):
def __init__(self,parent=None,name=None):
""" Initialise dialog and set mainwidget. """
KGlobal.locale().insertCatalogue("guidance")
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
# We would like to use a KUniqueApplication, but that breaks dcop due to some
# strange bug. The following line is the revenge code for this bug, it is

@ -943,7 +943,7 @@ class SysVInitApp(programbase):
def __init__(self,parent=None,name=None):
global standalone,isroot, DISTRO, is_shown
KGlobal.locale().insertCatalogue("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
if standalone:
KDialogBase.__init__(self,KJanusWidget.Plain,i18n("Service Configuration"), \
@ -956,7 +956,7 @@ class SysVInitApp(programbase):
# Create a configuration object.
self.config = KConfig("serviceconfigrc")
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
self.updatingGUI = False
self.context = getServiceContext()

@ -57,7 +57,7 @@ else:
class UserConfigApp(programbase):
def __init__(self,parent=None,name=None):
global standalone,isroot
KGlobal.locale().insertCatalogue("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
if standalone:
KDialogBase.__init__(self,KJanusWidget.Tabbed,i18n("User Accounts and Groups"),
@ -76,7 +76,7 @@ class UserConfigApp(programbase):
# Create a configuration object.
self.config = KConfig("userconfigrc")
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
self.usersToListItems = None
self.selecteduserid = None
@ -1093,7 +1093,7 @@ class UserEditDialog(KDialogBase):
if self.userobj.getLastPasswordChange() in (None,0):
self.lastchangelabel.setText('-');
else:
self.lastchangelabel.setText(KGlobal.locale().formatDate(SptimeToQDate(int(self.userobj.getLastPasswordChange()))))
self.lastchangelabel.setText(TDEGlobal.locale().formatDate(SptimeToQDate(int(self.userobj.getLastPasswordChange()))))
########################################################################
def __updateObjectFromGUI(self,userobj):
@ -1371,7 +1371,7 @@ class UserDeleteDialog(KDialog):
toplayout.setStretchFactor(contentbox,1)
label = QLabel(contentbox)
label.setPixmap(KGlobal.iconLoader().loadIcon("messagebox_warning", KIcon.NoGroup, KIcon.SizeMedium,
label.setPixmap(TDEGlobal.iconLoader().loadIcon("messagebox_warning", KIcon.NoGroup, KIcon.SizeMedium,
KIcon.DefaultState, None, True))
contentbox.setStretchFactor(label,0)
@ -1460,7 +1460,7 @@ class OverwriteHomeDirectoryDialog(KDialog):
toplayout.setStretchFactor(contentbox,1)
label = QLabel(contentbox)
label.setPixmap(KGlobal.iconLoader().loadIcon("messagebox_warning", KIcon.NoGroup, KIcon.SizeMedium,
label.setPixmap(TDEGlobal.iconLoader().loadIcon("messagebox_warning", KIcon.NoGroup, KIcon.SizeMedium,
KIcon.DefaultState, None, True))
contentbox.setStretchFactor(label,0)

@ -37,7 +37,7 @@ class FirstRunWizard(KWizard):
if not name:
self.setName("firstrunwizard")
self.imagedir = unicode(KGlobal.dirs().findDirs("data","guidance/pics")[0])
self.imagedir = unicode(TDEGlobal.dirs().findDirs("data","guidance/pics")[0])
self.setupPage1()
self.setupPageVersion()
@ -83,7 +83,7 @@ class FirstRunWizard(KWizard):
self.winefolderedit = KLineEdit(self.winepath,hbox)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.winefolderedit.setCompletionObject(self.urlcompletion)
self.winefolderedit.setCompletionMode(KGlobalSettings.CompletionPopup)
self.winefolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
self.connect(self.winefolderedit,SIGNAL("textChanged(const QString &)"),self.slotWineFolderEdited)
self.browsecreatebutton = KPushButton(i18n("Browse"),hbox)
@ -101,7 +101,7 @@ class FirstRunWizard(KWizard):
self.existingwinefolderedit = KLineEdit("",hbox)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.existingwinefolderedit.setCompletionObject(self.urlcompletion)
self.existingwinefolderedit.setCompletionMode(KGlobalSettings.CompletionPopup)
self.existingwinefolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
self.connect(self.existingwinefolderedit,SIGNAL("textChanged(const QString &)"),self.slotWineFolderEdited)
self.browseexistingbutton = KPushButton(i18n("Browse"),hbox)

@ -142,7 +142,7 @@ static KCModule* return_instance( QWidget *parent, const char *name ) {
//pyize->releaseLock ();
// take care of any translation info
KGlobal::locale()->insertCatalogue(script);
TDEGlobal::locale()->insertCatalogue(script);
// Return the pointer to our new KCModule
return kcmodule;

@ -62,7 +62,7 @@ class WineConfigApp(programbase):
########################################################################
def __init__(self,parent=None,name=None):
global standalone,kapp,default_winepath,application
KGlobal.locale().insertCatalogue("guidance")
TDEGlobal.locale().insertCatalogue("guidance")
if standalone:
KDialogBase.__init__(self,KJanusWidget.Tabbed,"Wine Configuration",\
@ -84,7 +84,7 @@ class WineConfigApp(programbase):
# much smaller to fit on low resolution screens.
self.compact_mode = kapp.desktop().height()<=600
KGlobal.iconLoader().addAppDir("guidance")
TDEGlobal.iconLoader().addAppDir("guidance")
self.wineconfigchanged = False
@ -566,7 +566,7 @@ class DrivesPage(QWidget):
self.fsfolderedit = KLineEdit("/",hbox2)
self.urlcompletion = KURLCompletion(KURLCompletion.DirCompletion)
self.fsfolderedit.setCompletionObject(self.urlcompletion)
self.fsfolderedit.setCompletionMode(KGlobalSettings.CompletionPopup)
self.fsfolderedit.setCompletionMode(TDEGlobalSettings.CompletionPopup)
self.connect(self.fsfolderedit,SIGNAL("textChanged(const QString &)"),self.slotFolderEdited)
self.browsebutton = KPushButton(i18n("Browse"),hbox2)

Loading…
Cancel
Save