Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <silbe@activitycentral.com>2011-03-05 11:23:31 (GMT)
committer Sascha Silbe <silbe@activitycentral.com>2011-10-18 15:41:58 (GMT)
commit9bcbda746abdc03747bb57e9e955940fd1bf135a (patch)
tree515ea60747da6f42dc5334407fe7b4c57c2da0c2
parent48108c9a5f46fb8a479e07872f8f2e166ac6e4de (diff)
factor out Sugar intro screen into separate script
-rw-r--r--bin/Makefile.am1
-rwxr-xr-xbin/sugar-intro26
-rwxr-xr-xbin/sugar-session3
-rw-r--r--bin/sugar.in2
4 files changed, 29 insertions, 3 deletions
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 05a9215..4472ef2 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -3,6 +3,7 @@ python_scripts = \
sugar-control-panel \
sugar-emulator \
sugar-install-bundle \
+ sugar-intro \
sugar-launch \
sugar-session \
sugar-ui-check
diff --git a/bin/sugar-intro b/bin/sugar-intro
new file mode 100755
index 0000000..d059050
--- /dev/null
+++ b/bin/sugar-intro
@@ -0,0 +1,26 @@
+#!/usr/bin/env python
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+import gettext
+
+import gtk
+
+from jarabe import config
+from jarabe import intro
+
+
+gettext.bindtextdomain('sugar', config.locale_path)
+gettext.bindtextdomain('sugar-toolkit', config.locale_path)
+gettext.textdomain('sugar')
+intro.check_profile()
diff --git a/bin/sugar-session b/bin/sugar-session
index 8ea195f..812f6c7 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -227,7 +227,6 @@ def main():
from jarabe.desktop import homewindow
from jarabe.model import sound
- from jarabe import intro
logger.start('shell')
@@ -245,8 +244,6 @@ def main():
# even when we initially get blocked on the intro screen
gobject.idle_add(unfreeze_dcon_cb)
- intro.check_profile()
-
start_ui_service()
start_session_manager()
diff --git a/bin/sugar.in b/bin/sugar.in
index 12098db..4390ec2 100644
--- a/bin/sugar.in
+++ b/bin/sugar.in
@@ -1,4 +1,5 @@
#!/bin/sh
+set -e
if [ "$(id -u)" -eq 0 -o "$(id -ru)" -eq 0 ] ; then
echo Refusing to run as root.
@@ -79,4 +80,5 @@ fi
echo Xcursor.theme: sugar | xrdb -merge
metacity --no-force-fullscreen -d $DISPLAY &
+sugar-intro
exec sugar-session