Convert remaining references to kde3 (e.g. in paths) to trinity

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/desktop-effects-kde@1248408 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru v3.5.13
tpearson 13 years ago
parent 7e131609b7
commit c2ea0e0970

@ -1,3 +1,3 @@
if [ -e $HOME/.kde3/share/config/compizasWM ] ; then if [ -e $HOME/.trinity/share/config/compizasWM ] ; then
export KDEWM="/opt/kde3/bin/compiz" export KDEWM="/opt/trinity/bin/compiz"
fi fi

@ -44,13 +44,13 @@ class DesktopEffectsCommon(object):
self.action = 0 self.action = 0
self.ibText = "" self.ibText = ""
self.check() self.check()
self.DATADIR = "/opt/kde3/share/apps/desktop-effects-kde/" self.DATADIR = "/opt/trinity/share/apps/desktop-effects-kde/"
def checkInstalled(self): def checkInstalled(self):
progress = OpProgress() progress = OpProgress()
cache = apt_pkg.GetCache(progress) cache = apt_pkg.GetCache(progress)
for pkg in cache.Packages: for pkg in cache.Packages:
if pkg.Name == "compiz-kde-kde3": if pkg.Name == "compiz-kde-trinity":
if pkg.CurrentVer is not None: if pkg.CurrentVer is not None:
return True return True
# otherwise # otherwise
@ -58,8 +58,8 @@ class DesktopEffectsCommon(object):
def checkEnabled(self): def checkEnabled(self):
'''checks if the compizasWM file is present, and if so, reads what mode we are in''' '''checks if the compizasWM file is present, and if so, reads what mode we are in'''
if os.path.exists(os.path.expanduser("~/.kde3/share/config/compizasWM")): if os.path.exists(os.path.expanduser("~/.trinity/share/config/compizasWM")):
compizasWM = open(os.path.expanduser("~/.kde3/share/config/compizasWM")) compizasWM = open(os.path.expanduser("~/.trinity/share/config/compizasWM"))
state = compizasWM.readline() state = compizasWM.readline()
return state return state
else: else:
@ -121,7 +121,7 @@ class DesktopEffectsCommon(object):
elif self.action == 4: elif self.action == 4:
self.enableCustomEffects() self.enableCustomEffects()
if not self.enabled and not self.action == 1: if not self.enabled and not self.action == 1:
os.spawnl(os.P_NOWAIT, "/opt/kde3/bin/compiz", "--replace") os.spawnl(os.P_NOWAIT, "/opt/trinity/bin/compiz", "--replace")
self.enabled = True self.enabled = True
def btnInstallClicked(self): def btnInstallClicked(self):
@ -130,7 +130,7 @@ class DesktopEffectsCommon(object):
return return
try: try:
''' Installs the Compiz package. Not very nice as it is distribution dependent. ''' ''' Installs the Compiz package. Not very nice as it is distribution dependent. '''
subprocess.call(['kdesudo', '-c' '/opt/kde3/bin/adept_batch install compiz-kde-kde3 compiz-fusion-plugins-main-kde3 compiz-fusion-plugins-extra-kde3']) subprocess.call(['kdesudo', '-c' '/opt/trinity/bin/adept_batch install compiz-kde-trinity compiz-fusion-plugins-main-trinity compiz-fusion-plugins-extra-trinity'])
except: except:
subprocess.call(['kdialog', '--sorry', 'Adept Batch is not installed on this system']) subprocess.call(['kdialog', '--sorry', 'Adept Batch is not installed on this system'])
self.check() self.check()
@ -158,14 +158,14 @@ class DesktopEffectsCommon(object):
if removeAnswer == 0: if removeAnswer == 0:
try: try:
''' Remove the Compiz package. Not very nice as it is distribution dependent. ''' ''' Remove the Compiz package. Not very nice as it is distribution dependent. '''
subprocess.call(['kdesudo', '-c' '/opt/kde3/bin/adept_batch remove compiz-kde-kde3 compiz-fusion-plugins-main-kde3 compiz-fusion-plugins-extra-kde3']) subprocess.call(['kdesudo', '-c' '/opt/trinity/bin/adept_batch remove compiz-kde-trinity compiz-fusion-plugins-main-trinity compiz-fusion-plugins-extra-trinity'])
except: except:
subprocess.call(['kdialog', '--sorry', 'Adept Batch is not installed on this system']) subprocess.call(['kdialog', '--sorry', 'Adept Batch is not installed on this system'])
def disableEffects(self): def disableEffects(self):
'''remove compiz as the default WM''' '''remove compiz as the default WM'''
os.remove(os.path.expanduser("~/.kde3/share/config/compizasWM")) os.remove(os.path.expanduser("~/.trinity/share/config/compizasWM"))
self.enabled = False self.enabled = False
@ -173,7 +173,7 @@ class DesktopEffectsCommon(object):
'''copy the .ini to Default.ini and enable compiz as default WM''' '''copy the .ini to Default.ini and enable compiz as default WM'''
code = os.system('mkdir -p ~/.config/compiz/compizconfig') code = os.system('mkdir -p ~/.config/compiz/compizconfig')
try: try:
enable = open(os.path.expanduser("~/.kde3/share/config/compizasWM"),"w") enable = open(os.path.expanduser("~/.trinity/share/config/compizasWM"),"w")
if enable.readline() == "custom": if enable.readline() == "custom":
customeffects = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"r") customeffects = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"r")
backupfile = open(os.path.expanduser("~/.config/compiz/compizconfig/Custom.ini"),"w") backupfile = open(os.path.expanduser("~/.config/compiz/compizconfig/Custom.ini"),"w")
@ -194,8 +194,8 @@ class DesktopEffectsCommon(object):
def enableExtraEffects(self): def enableExtraEffects(self):
''' copy the extraeffects.ini to Default.ini and enable compiz as defaultWM''' ''' copy the extraeffects.ini to Default.ini and enable compiz as defaultWM'''
code = os.system('mkdir -p ~/.config/compiz/compizconfig') code = os.system('mkdir -p ~/.config/compiz/compizconfig')
if os.path.exists(os.path.expanduser("~/.kde3/share/config/compizasWM")): if os.path.exists(os.path.expanduser("~/.trinity/share/config/compizasWM")):
enable = open(os.path.expanduser("~/.kde3/share/config/compizasWM"),"r") enable = open(os.path.expanduser("~/.trinity/share/config/compizasWM"),"r")
if enable.readline() == "custom": if enable.readline() == "custom":
customeffects = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"r") customeffects = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"r")
backupfile = open(os.path.expanduser("~/.config/compiz/compizconfig/Custom.ini"),"w") backupfile = open(os.path.expanduser("~/.config/compiz/compizconfig/Custom.ini"),"w")
@ -204,7 +204,7 @@ class DesktopEffectsCommon(object):
customeffects.close() customeffects.close()
enable.close() enable.close()
enable = open(os.path.expanduser("~/.kde3/share/config/compizasWM"),"w") enable = open(os.path.expanduser("~/.trinity/share/config/compizasWM"),"w")
enable.write("extraeffects") enable.write("extraeffects")
enable.close() enable.close()
config = open(os.path.join(self.DATADIR,"HighEffects.ini"),"r") config = open(os.path.join(self.DATADIR,"HighEffects.ini"),"r")
@ -221,7 +221,7 @@ class DesktopEffectsCommon(object):
except: except:
print "no custom effects file, creating blank .ini" #DEBUG print "no custom effects file, creating blank .ini" #DEBUG
config = open(os.path.join(self.DATADIR,"BlankEffects.ini"),"r") config = open(os.path.join(self.DATADIR,"BlankEffects.ini"),"r")
enable = open(os.path.expanduser("~/.kde3/share/config/compizasWM"),"w") enable = open(os.path.expanduser("~/.trinity/share/config/compizasWM"),"w")
enable.write("custom") enable.write("custom")
enable.close() enable.close()
dest = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"w") dest = open(os.path.expanduser("~/.config/compiz/compizconfig/Default.ini"),"w")

@ -51,7 +51,7 @@ class DesktopEffectsKDE(DesktopEffectsDialog, DesktopEffectsCommon):
DesktopEffectsDialog.__init__(self) DesktopEffectsDialog.__init__(self)
# bind the locale # bind the locale
localesApp="desktop-effects" localesApp="desktop-effects"
localesDir="/opt/kde3/share/locale" localesDir="/opt/trinity/share/locale"
gettext.bindtextdomain(localesApp, localesDir) gettext.bindtextdomain(localesApp, localesDir)
gettext.textdomain(localesApp) gettext.textdomain(localesApp)
# initialize variables # initialize variables
@ -116,7 +116,7 @@ class DesktopEffectsKDE(DesktopEffectsDialog, DesktopEffectsCommon):
progress = OpProgress() progress = OpProgress()
cache = apt_pkg.GetCache(progress) cache = apt_pkg.GetCache(progress)
for pkg in cache.Packages: for pkg in cache.Packages:
if pkg.Name == "compiz-kde-kde3": if pkg.Name == "compiz-kde-trinity":
if pkg.CurrentVer is not None: if pkg.CurrentVer is not None:
return True return True
# otherwise # otherwise

@ -56,7 +56,7 @@ class DesktopEffectsKDE4(DesktopEffectsCommon):
self.ui.setupUi(self.qd) self.ui.setupUi(self.qd)
localesApp="desktop-effects-kde" localesApp="desktop-effects-kde"
localesDir="/opt/kde3/share/locale" localesDir="/opt/trinity/share/locale"
gettext.bindtextdomain(localesApp, localesDir) gettext.bindtextdomain(localesApp, localesDir)
gettext.textdomain(localesApp) gettext.textdomain(localesApp)
@ -102,8 +102,8 @@ class DesktopEffectsKDE4(DesktopEffectsCommon):
DesktopEffectsCommon.check(self) DesktopEffectsCommon.check(self)
self.ui.packageText.setText(self.pText) self.ui.packageText.setText(self.pText)
self.ui.installButton.setText(self.ibText) self.ui.installButton.setText(self.ibText)
if os.path.exists(os.path.expanduser("~/.kde3/share/config/compizasWM")): if os.path.exists(os.path.expanduser("~/.trinity/share/config/compizasWM")):
compizasWM = open(os.path.expanduser("~/.kde3/share/config/compizasWM")) compizasWM = open(os.path.expanduser("~/.trinity/share/config/compizasWM"))
state = compizasWM.readline() state = compizasWM.readline()
if state == "standardeffects": if state == "standardeffects":
self.action = 2 self.action = 2

@ -24,9 +24,9 @@ window.
__copyright__ = "Copyright © 2007 Martin Böhm and the Kubuntu Team" __copyright__ = "Copyright © 2007 Martin Böhm and the Kubuntu Team"
__author__ = "Kubuntu Team <kubuntu-devel@lists.ubuntu.com>" __author__ = "Kubuntu Team <kubuntu-devel@lists.ubuntu.com>"
import sys import sys
sys.path.append("/opt/kde3/share/pyshared") sys.path.append("/opt/trinity/share/pyshared")
if sys.argv[0].endswith("kde3"): if sys.argv[0].endswith("trinity"):
from DesktopEffects.DesktopEffectsKDE import DesktopEffectsKDE as DesktopEffects from DesktopEffects.DesktopEffectsKDE import DesktopEffectsKDE as DesktopEffects
else: else:
from DesktopEffects.DesktopEffectsKDE4 import DesktopEffectsKDE4 as DesktopEffects from DesktopEffects.DesktopEffectsKDE4 import DesktopEffectsKDE4 as DesktopEffects

@ -26,7 +26,7 @@ window.
__copyright__ = "Copyright © 2007 Martin Böhm and the Kubuntu Team" __copyright__ = "Copyright © 2007 Martin Böhm and the Kubuntu Team"
__author__ = "Kubuntu Team <kubuntu-devel@lists.ubuntu.com>" __author__ = "Kubuntu Team <kubuntu-devel@lists.ubuntu.com>"
import sys import sys
sys.path.append("/opt/kde3/share/pyshared") sys.path.append("/opt/trinity/share/pyshared")
from DesktopEffects.DesktopEffectsKDE4 import DesktopEffectsKDE4 as DesktopEffects from DesktopEffects.DesktopEffectsKDE4 import DesktopEffectsKDE4 as DesktopEffects
de = DesktopEffects() de = DesktopEffects()

Loading…
Cancel
Save