Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-06-21 18:23:18 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-06-21 18:23:18 (GMT)
commitf4e2791c897651d52980d35b84115e7c7f85a249 (patch)
tree8999ddbed2a6e3cc5864e4d59f9a6320e3fc9038
parenta6974cd597b52c9782e105a38d709784f882bedf (diff)
Big refactor of the directory structure and packages to
reflect private/public
-rw-r--r--.gitignore20
-rw-r--r--activities/browser/AddressItem.py (renamed from sugar/browser/AddressItem.py)0
-rw-r--r--activities/browser/BrowserActivity.py (renamed from sugar/browser/BrowserActivity.py)11
-rw-r--r--activities/browser/BrowserShell.py (renamed from sugar/browser/BrowserShell.py)4
-rw-r--r--activities/browser/Makefile.am (renamed from sugar/browser/Makefile.am)0
-rw-r--r--activities/browser/NavigationToolbar.py (renamed from sugar/browser/NavigationToolbar.py)2
-rw-r--r--activities/browser/NotificationBar.py (renamed from sugar/browser/NotificationBar.py)0
-rw-r--r--activities/browser/__init__.py (copied from sugar/browser/__init__.py)0
-rw-r--r--activities/browser/browser.activity2
-rwxr-xr-xactivities/browser/browser.py (renamed from sugar/browser/browser.py)4
-rw-r--r--activities/browser/browser.rc (renamed from sugar/browser/browser.rc)0
-rw-r--r--activities/browser/fold.png (renamed from sugar/browser/fold.png)bin156 -> 156 bytes
-rw-r--r--activities/browser/unfold.png (renamed from sugar/browser/unfold.png)bin157 -> 157 bytes
-rw-r--r--configure.ac8
-rw-r--r--shell/Makefile.am (renamed from sugar/shell/Makefile.am)0
-rw-r--r--shell/Owner.py (renamed from sugar/shell/Owner.py)0
-rw-r--r--shell/PresenceWindow.py (renamed from sugar/shell/PresenceWindow.py)0
-rw-r--r--shell/StartPage.py (renamed from sugar/shell/StartPage.py)9
-rw-r--r--shell/WindowManager.py (renamed from sugar/shell/WindowManager.py)0
-rw-r--r--shell/__init__.py (renamed from sugar/shell/__init__.py)0
-rw-r--r--shell/google/GoogleSOAPFacade.py (renamed from cut-n-paste/GoogleSOAPFacade.py)0
-rw-r--r--shell/google/Makefile.am (renamed from cut-n-paste/Makefile.am)2
-rwxr-xr-xshell/google/SOAP.py (renamed from cut-n-paste/SOAP.py)0
-rw-r--r--shell/google/__init__.py (copied from sugar/browser/__init__.py)0
-rwxr-xr-xshell/google/google.py (renamed from cut-n-paste/google.py)0
-rw-r--r--shell/session/Makefile.am (renamed from sugar/session/Makefile.am)0
-rw-r--r--shell/session/__init__.py (copied from sugar/browser/__init__.py)0
-rw-r--r--shell/session/session.py (renamed from sugar/session/session.py)2
-rwxr-xr-xshell/shell.py (renamed from sugar/shell/shell.py)11
-rwxr-xr-xshell/sugar (renamed from sugar/sugar)20
-rw-r--r--sugar/__uninstalled__.py2
-rw-r--r--sugar/activity/__init__.py (renamed from sugar/browser/__init__.py)0
-rw-r--r--sugar/activity/activity.py (renamed from sugar/shell/activity.py)0
-rw-r--r--sugar/browser/browser.activity2
-rw-r--r--sugar/p2p/model/Makefile.am3
35 files changed, 60 insertions, 42 deletions
diff --git a/.gitignore b/.gitignore
index f3d74a9..f09c5c0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,22 @@
+# Generic
+
*.pyc
*~
+Makefile
+Makefile.in
+
+# Absolute
+
+aclocal.m4
+autom4te.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+install-sh
+missing
+py-compile
+stamp-h1
+
+sugar/__installed__.py
diff --git a/sugar/browser/AddressItem.py b/activities/browser/AddressItem.py
index df5e71c..df5e71c 100644
--- a/sugar/browser/AddressItem.py
+++ b/activities/browser/AddressItem.py
diff --git a/sugar/browser/BrowserActivity.py b/activities/browser/BrowserActivity.py
index d2eeb41..662313f 100644
--- a/sugar/browser/BrowserActivity.py
+++ b/activities/browser/BrowserActivity.py
@@ -6,13 +6,14 @@ pygtk.require('2.0')
import gtk
import geckoembed
-from sugar.shell import activity
-from sugar.browser import NotificationBar
-from sugar.browser import NavigationToolbar
+from sugar.activity import activity
from sugar.presence.PresenceService import PresenceService
from sugar.p2p.model.LocalModel import LocalModel
from sugar.p2p.model.RemoteModel import RemoteModel
+from NotificationBar import NotificationBar
+from NavigationToolbar import NavigationToolbar
+
_BROWSER_ACTIVITY_TYPE = "_web_olpc._udp"
_SERVICE_URI_TAG = "URI"
_SERVICE_TITLE_TAG = "Title"
@@ -83,7 +84,7 @@ class BrowserActivity(activity.Activity):
vbox = gtk.VBox()
- self._notif_bar = NotificationBar.NotificationBar()
+ self._notif_bar = NotificationBar()
vbox.pack_start(self._notif_bar, False)
self._notif_bar.connect('action', self.__notif_bar_action_cb)
@@ -94,7 +95,7 @@ class BrowserActivity(activity.Activity):
self.embed.show()
self.embed.load_address(self.uri)
- nav_toolbar = NavigationToolbar.NavigationToolbar(self)
+ nav_toolbar = NavigationToolbar(self)
vbox.pack_start(nav_toolbar, False)
nav_toolbar.show()
diff --git a/sugar/browser/BrowserShell.py b/activities/browser/BrowserShell.py
index a968772..c1e0c44 100644
--- a/sugar/browser/BrowserShell.py
+++ b/activities/browser/BrowserShell.py
@@ -6,10 +6,10 @@ import gtk
import gobject
import sugar.env
-
-from sugar.browser.BrowserActivity import BrowserActivity
from sugar.presence import Service
+from BrowserActivity import BrowserActivity
+
class BrowserShell(dbus.service.Object):
def __init__(self, bus_name, object_path = '/com/redhat/Sugar/Browser'):
dbus.service.Object.__init__(self, bus_name, object_path)
diff --git a/sugar/browser/Makefile.am b/activities/browser/Makefile.am
index 2c66e22..2c66e22 100644
--- a/sugar/browser/Makefile.am
+++ b/activities/browser/Makefile.am
diff --git a/sugar/browser/NavigationToolbar.py b/activities/browser/NavigationToolbar.py
index e9cc1c5..bf8c96b 100644
--- a/sugar/browser/NavigationToolbar.py
+++ b/activities/browser/NavigationToolbar.py
@@ -2,7 +2,7 @@ import pygtk
pygtk.require('2.0')
import gtk
-from sugar.browser.AddressItem import AddressItem
+from AddressItem import AddressItem
class NavigationToolbar(gtk.Toolbar):
def __init__(self, browser):
diff --git a/sugar/browser/NotificationBar.py b/activities/browser/NotificationBar.py
index c9b3b8a..c9b3b8a 100644
--- a/sugar/browser/NotificationBar.py
+++ b/activities/browser/NotificationBar.py
diff --git a/sugar/browser/__init__.py b/activities/browser/__init__.py
index e69de29..e69de29 100644
--- a/sugar/browser/__init__.py
+++ b/activities/browser/__init__.py
diff --git a/activities/browser/browser.activity b/activities/browser/browser.activity
new file mode 100644
index 0000000..7aba61f
--- /dev/null
+++ b/activities/browser/browser.activity
@@ -0,0 +1,2 @@
+[Activity]
+python_class = browser
diff --git a/sugar/browser/browser.py b/activities/browser/browser.py
index b486bf3..bdfa2bd 100755
--- a/sugar/browser/browser.py
+++ b/activities/browser/browser.py
@@ -6,9 +6,9 @@ import gtk
import dbus
import sugar.env
-
from sugar.session.LogWriter import LogWriter
-from sugar.browser.BrowserShell import BrowserShell
+
+from BrowserShell import BrowserShell
log_writer = LogWriter("Web")
log_writer.start()
diff --git a/sugar/browser/browser.rc b/activities/browser/browser.rc
index 69f1320..69f1320 100644
--- a/sugar/browser/browser.rc
+++ b/activities/browser/browser.rc
diff --git a/sugar/browser/fold.png b/activities/browser/fold.png
index cd4169b..cd4169b 100644
--- a/sugar/browser/fold.png
+++ b/activities/browser/fold.png
Binary files differ
diff --git a/sugar/browser/unfold.png b/activities/browser/unfold.png
index f3f82fa..f3f82fa 100644
--- a/sugar/browser/unfold.png
+++ b/activities/browser/unfold.png
Binary files differ
diff --git a/configure.ac b/configure.ac
index 6ed84b9..df8922f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([Sugar],[0.9],[],[sugar])
+AC_INIT([Sugar],[0.10],[],[sugar])
AC_PREREQ([2.59])
@@ -17,15 +17,15 @@ AC_SUBST(PYGTK_LIBS)
AC_OUTPUT([
Makefile
+activities/browser/Makefile
cut-n-paste/Makefile
+shell/Makefile
+shell/session/Makefile
sugar/Makefile
sugar/__installed__.py
-sugar/browser/Makefile
sugar/chat/Makefile
sugar/chat/sketchpad/Makefile
sugar/p2p/Makefile
sugar/p2p/model/Makefile
-sugar/shell/Makefile
-sugar/session/Makefile
sugar/presence/Makefile
])
diff --git a/sugar/shell/Makefile.am b/shell/Makefile.am
index 1080b7d..1080b7d 100644
--- a/sugar/shell/Makefile.am
+++ b/shell/Makefile.am
diff --git a/sugar/shell/Owner.py b/shell/Owner.py
index bd8771d..bd8771d 100644
--- a/sugar/shell/Owner.py
+++ b/shell/Owner.py
diff --git a/sugar/shell/PresenceWindow.py b/shell/PresenceWindow.py
index c9ec558..c9ec558 100644
--- a/sugar/shell/PresenceWindow.py
+++ b/shell/PresenceWindow.py
diff --git a/sugar/shell/StartPage.py b/shell/StartPage.py
index 08219d5..4ceeec3 100644
--- a/sugar/shell/StartPage.py
+++ b/shell/StartPage.py
@@ -7,9 +7,10 @@ import cgi
import xml.sax.saxutils
import gobject
-import google
+from google import google
from sugar.presence.PresenceService import PresenceService
-from sugar.browser import BrowserActivity
+
+_BROWSER_ACTIVITY_TYPE = "_web_olpc._udp"
_COLUMN_TITLE = 0
_COLUMN_ADDRESS = 1
@@ -78,7 +79,7 @@ class ActivitiesModel(gtk.ListStore):
return
# Only accept browser activities for now
- if service.get_type() == BrowserActivity._BROWSER_ACTIVITY_TYPE:
+ if service.get_type() == _BROWSER_ACTIVITY_TYPE:
escaped_title = service.get_one_property('Title')
escaped_uri = service.get_one_property('URI')
if escaped_title and escaped_uri:
@@ -169,7 +170,7 @@ class StartPage(gtk.HBox):
self._pservice.connect("buddy-appeared", self._on_buddy_appeared_cb)
self._pservice.connect("buddy-disappeared", self._on_buddy_disappeared_cb)
self._pservice.start()
- self._pservice.track_service_type(BrowserActivity._BROWSER_ACTIVITY_TYPE)
+ self._pservice.track_service_type(_BROWSER_ACTIVITY_TYPE)
if self._pservice.get_owner():
self._on_buddy_appeared_cb(self._pservice, self._pservice.get_owner())
diff --git a/sugar/shell/WindowManager.py b/shell/WindowManager.py
index 765b2be..765b2be 100644
--- a/sugar/shell/WindowManager.py
+++ b/shell/WindowManager.py
diff --git a/sugar/shell/__init__.py b/shell/__init__.py
index e69de29..e69de29 100644
--- a/sugar/shell/__init__.py
+++ b/shell/__init__.py
diff --git a/cut-n-paste/GoogleSOAPFacade.py b/shell/google/GoogleSOAPFacade.py
index 0aab3cf..0aab3cf 100644
--- a/cut-n-paste/GoogleSOAPFacade.py
+++ b/shell/google/GoogleSOAPFacade.py
diff --git a/cut-n-paste/Makefile.am b/shell/google/Makefile.am
index e608554..89ba29e 100644
--- a/cut-n-paste/Makefile.am
+++ b/shell/google/Makefile.am
@@ -1,4 +1,4 @@
-cut_n_pastedir = $(pythondir)/cut-n-paste
+cut_n_pastedir = $(datadir)/sugar
cut_n_paste_PYTHON = \
google.py \
GoogleSOAPFacade.py \
diff --git a/cut-n-paste/SOAP.py b/shell/google/SOAP.py
index 032a452..032a452 100755
--- a/cut-n-paste/SOAP.py
+++ b/shell/google/SOAP.py
diff --git a/sugar/browser/__init__.py b/shell/google/__init__.py
index e69de29..e69de29 100644
--- a/sugar/browser/__init__.py
+++ b/shell/google/__init__.py
diff --git a/cut-n-paste/google.py b/shell/google/google.py
index a20ba51..a20ba51 100755
--- a/cut-n-paste/google.py
+++ b/shell/google/google.py
diff --git a/sugar/session/Makefile.am b/shell/session/Makefile.am
index a8ba913..a8ba913 100644
--- a/sugar/session/Makefile.am
+++ b/shell/session/Makefile.am
diff --git a/sugar/browser/__init__.py b/shell/session/__init__.py
index e69de29..e69de29 100644
--- a/sugar/browser/__init__.py
+++ b/shell/session/__init__.py
diff --git a/sugar/session/session.py b/shell/session/session.py
index ea232c0..2ddc554 100644
--- a/sugar/session/session.py
+++ b/shell/session/session.py
@@ -6,7 +6,7 @@ import pygtk
pygtk.require('2.0')
import gtk
-from sugar.shell.shell import Shell
+from shell import Shell
from sugar import env
class Session:
diff --git a/sugar/shell/shell.py b/shell/shell.py
index 3e5450c..18eceeb 100755
--- a/sugar/shell/shell.py
+++ b/shell/shell.py
@@ -9,13 +9,14 @@ import pango
import gobject
import sugar.util
-from sugar.session.LogWriter import LogWriter
-from sugar.shell.PresenceWindow import PresenceWindow
from sugar.chat.ChatWindow import ChatWindow
-from sugar.shell.Owner import ShellOwner
-from sugar.shell.StartPage import StartPage
-from sugar.shell.WindowManager import WindowManager
from sugar.chat.GroupChat import GroupChat
+from sugar.session.LogWriter import LogWriter
+
+from Owner import ShellOwner
+from StartPage import StartPage
+from WindowManager import WindowManager
+from PresenceWindow import PresenceWindow
class ActivityHost(dbus.service.Object):
diff --git a/sugar/sugar b/shell/sugar
index 1ec9a6a..ccfdd00 100755
--- a/sugar/sugar
+++ b/shell/sugar
@@ -56,19 +56,15 @@ if not os.environ.has_key("SUGAR_NICK_NAME"):
os.environ['SUGAR_NICK_NAME'] = nick
os.environ['SUGAR_USER_DIR'] = os.path.expanduser('~/.sugar')
-curdir = os.path.dirname(__file__)
-if curdir == '.':
- basedir = os.path.dirname(os.getcwd())
-else:
- basedir = os.path.dirname(curdir)
-if os.path.isfile(os.path.join(curdir, '__uninstalled__.py')):
- if basedir == '':
- print 'Running sugar from current directory...'
- else:
- print 'Running sugar from ' + basedir + ' ...'
+curdir = os.path.abspath(os.path.dirname(__file__))
+basedir = os.path.dirname(curdir)
+
+if os.path.isfile(os.path.join(basedir, 'sugar/__uninstalled__.py')):
+ print 'Running sugar from ' + basedir + ' ...'
add_to_python_path(basedir)
- add_to_python_path(os.path.join(basedir, 'cut-n-paste'))
+ add_to_python_path(os.path.join(basedir, 'shell'))
+ add_to_python_path(os.path.join(basedir, 'activities/browser'))
else:
print 'Running the installed sugar...'
@@ -76,7 +72,7 @@ add_to_python_path(os.path.expanduser('~/.sugar/activities'))
print 'Redirecting output to the console, press ctrl+d to open it.'
-from sugar.session.session import Session
+from session.session import Session
session = Session()
session.start()
diff --git a/sugar/__uninstalled__.py b/sugar/__uninstalled__.py
index 4813b16..286a735 100644
--- a/sugar/__uninstalled__.py
+++ b/sugar/__uninstalled__.py
@@ -1,5 +1,5 @@
import os
data_basedir = os.path.dirname(os.path.dirname(__file__))
-data_dirs = [ 'sugar/browser', 'sugar/chat' ]
+data_dirs = [ 'activities/browser' ]
activities_dir = ''
diff --git a/sugar/browser/__init__.py b/sugar/activity/__init__.py
index e69de29..e69de29 100644
--- a/sugar/browser/__init__.py
+++ b/sugar/activity/__init__.py
diff --git a/sugar/shell/activity.py b/sugar/activity/activity.py
index 509565c..509565c 100644
--- a/sugar/shell/activity.py
+++ b/sugar/activity/activity.py
diff --git a/sugar/browser/browser.activity b/sugar/browser/browser.activity
deleted file mode 100644
index bc120b7..0000000
--- a/sugar/browser/browser.activity
+++ /dev/null
@@ -1,2 +0,0 @@
-[Activity]
-python_class = sugar/browser/browser
diff --git a/sugar/p2p/model/Makefile.am b/sugar/p2p/model/Makefile.am
index aa113c8..2925345 100644
--- a/sugar/p2p/model/Makefile.am
+++ b/sugar/p2p/model/Makefile.am
@@ -3,5 +3,4 @@ sugar_PYTHON = \
__init__.py \
AbstractModel.py \
LocalModel.py \
- RemoteModel.py \
- Store.py
+ RemoteModel.py