Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2008-05-14 15:52:54 (GMT)
committer Simon Schampijer <simon@schampijer.de>2008-05-14 15:52:54 (GMT)
commit434cd24676de8532e2574fc218c90eb62be967b7 (patch)
treecb825726383126bbb0b43873cd3dc58f03c72e22
parentf8c4c8994568f66efef77bb03f19c8d0e96d452d (diff)
Revert "Add shell_path to config and changed cp accordingly"
This reverts commit db6ddf7ad60fc53e0160b87a0d870832fd5558d8.
-rw-r--r--bin/sugar-control-panel.in6
-rw-r--r--src/config.py.in1
-rw-r--r--src/controlpanel/cmd.py9
3 files changed, 8 insertions, 8 deletions
diff --git a/bin/sugar-control-panel.in b/bin/sugar-control-panel.in
index 922f95c..e70764b 100644
--- a/bin/sugar-control-panel.in
+++ b/bin/sugar-control-panel.in
@@ -17,10 +17,12 @@
import sys
-sys.path.insert(0, '@prefix@/share/sugar/shell')
+path = '@prefix@/share/sugar/shell'
+
+sys.path.insert(0, path)
from controlpanel.cmd import main
-main()
+main(path)
diff --git a/src/config.py.in b/src/config.py.in
index fb26181..3b29a05 100644
--- a/src/config.py.in
+++ b/src/config.py.in
@@ -16,4 +16,3 @@
prefix = '@prefix@'
data_path = '@prefix@/share/sugar/data'
-shell_path = '@prefix@/share/sugar/shell' \ No newline at end of file
diff --git a/src/controlpanel/cmd.py b/src/controlpanel/cmd.py
index 76ab270..db23559 100644
--- a/src/controlpanel/cmd.py
+++ b/src/controlpanel/cmd.py
@@ -19,7 +19,6 @@ import getopt
import os
from gettext import gettext as _
-import config
def cmd_help():
'''Print the help to the screen'''
@@ -38,12 +37,12 @@ def note_restart():
print _('To apply your changes you have to restart sugar.\n' +
'Hit ctrl+alt+erase on the keyboard to trigger a restart.')
-def load_modules():
+def load_modules(path):
'''Build a list of pointers to available modules in the model directory
and load them.
'''
subpath = ['controlpanel', 'model']
- names = os.listdir(os.path.join(config.shell_path, '/'.join(subpath)))
+ names = os.listdir(os.path.join(path, '/'.join(subpath)))
modules = []
for name in names:
@@ -54,7 +53,7 @@ def load_modules():
modules.append(mod)
return modules
-def main():
+def main(path):
try:
opts, args = getopt.getopt(sys.argv[1:], "h:s:g:l", [])
except getopt.GetoptError:
@@ -65,7 +64,7 @@ def main():
cmd_help()
sys.exit()
- modules = load_modules()
+ modules = load_modules(path)
for opt, key in opts:
if opt in ("-h"):