Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-04-26 06:25:58 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-04-26 06:25:58 (GMT)
commit200c3d077ada98d51eb416a46c3c70e5ee8cc950 (patch)
tree57a9ae163e2f7fc96aeae1bb945c54bbf5fc62dd
parent070088a6a57caf40cd213f14c6e5eaec3479520b (diff)
Install service files so that services are automatically
-rw-r--r--browser/Makefile.am16
-rw-r--r--shell/src/Makefile.am16
-rwxr-xr-xshell/src/shell.py10
-rwxr-xr-xsugar16
4 files changed, 52 insertions, 6 deletions
diff --git a/browser/Makefile.am b/browser/Makefile.am
index 0bc5b88..9bbc378 100644
--- a/browser/Makefile.am
+++ b/browser/Makefile.am
@@ -5,3 +5,19 @@ icondir = $(pkgdatadir)
icon_DATA = \
fold.png \
unfold.png
+
+# Dbus service file
+servicedir = $(datadir)/dbus-1/services
+service_in_files = com.redhat.Sugar.Browser.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+# Rule to make the service file with bindir expanded
+$(service_DATA): $(service_in_files) Makefile
+ @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
+
+EXTRA_DIST = \
+ $(service_in_files) \
+ $(service_DATA)
+
+DISTCLEANFILES = \
+ $(service_DATA)
diff --git a/shell/src/Makefile.am b/shell/src/Makefile.am
index 604552a..bdab0b7 100644
--- a/shell/src/Makefile.am
+++ b/shell/src/Makefile.am
@@ -2,3 +2,19 @@ sugardir = $(pythondir)/sugar
sugar_PYTHON = \
activity.py \
shell.py
+
+# Dbus service file
+servicedir = $(datadir)/dbus-1/services
+service_in_files = com.redhat.Sugar.Shell.service.in
+service_DATA = $(service_in_files:.service.in=.service)
+
+# Rule to make the service file with bindir expanded
+$(service_DATA): $(service_in_files) Makefile
+ @sed -e "s|\@bindir\@|$(bindir)|" $< > $@
+
+EXTRA_DIST = \
+ $(service_in_files) \
+ $(service_DATA)
+
+DISTCLEANFILES = \
+ $(service_DATA)
diff --git a/shell/src/shell.py b/shell/src/shell.py
index 193c2a3..c1b0362 100755
--- a/shell/src/shell.py
+++ b/shell/src/shell.py
@@ -191,10 +191,12 @@ class ActivityContainer(dbus.service.Object):
self.window.resize(640, 480)
self.window.set_geometry_hints(min_width = 640, max_width = 640, min_height = 480, max_height = 480)
self.notebook = gtk.Notebook()
- tab_label = gtk.Label("My Laptop")
- empty_label = gtk.Label("This activity could launch other activities / be a help page")
- empty_label.show()
- self.notebook.append_page(empty_label, tab_label)
+
+ #tab_label = gtk.Label("My Laptop")
+ #empty_label = gtk.Label("This activity could launch other activities / be a help page")
+ #empty_label.show()
+ #self.notebook.append_page(empty_label, tab_label)
+
self.notebook.show()
self.notebook.connect("switch-page", self.notebook_tab_changed)
self.window.add(self.notebook)
diff --git a/sugar b/sugar
index 2036d9b..2c4f105 100755
--- a/sugar
+++ b/sugar
@@ -1,9 +1,21 @@
#!/usr/bin/python
import sys
+import os
-# FIXME Without args we should startup the session thing
-if len(sys.argv) == 1 or sys.argv[1] == 'shell':
+if len(sys.argv) == 1:
+ # FIXME Start a session
+
+ # We are lucky and this
+ # currently behave as we want.
+ # The chat depends on the
+ # web browser, so both activities
+ # are spanned. But obviously we
+ # need something better.
+
+ import sugar.chat
+ sugar.chat.main()
+elif sys.argv[1] == 'shell':
import sugar.shell
sugar.shell.main()
elif sys.argv[1] == 'chat':