From ca19f0f25100006c0f6c84e405e2e6a0cecdd15b Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 15 Sep 2006 12:52:37 +0200 Subject: [PATCH] Move the model to his own module --- configure.ac | 1 + shell/Makefile.am | 5 +---- shell/Session.py | 2 +- shell/Shell.py | 0 shell/frame/RightPanel.py | 2 +- shell/home/HomeGroup.py | 1 - shell/{ => model}/Friends.py | 0 shell/{ => model}/Invites.py | 0 shell/model/Makefile.am | 7 +++++++ shell/{ => model}/Owner.py | 0 shell/{ => model}/ShellModel.py | 6 +++--- shell/model/__init__.py | 0 12 files changed, 14 insertions(+), 10 deletions(-) mode change 100755 => 100644 shell/Shell.py rename shell/{ => model}/Friends.py (100%) rename shell/{ => model}/Invites.py (100%) create mode 100644 shell/model/Makefile.am rename shell/{ => model}/Owner.py (100%) rename shell/{ => model}/ShellModel.py (95%) create mode 100644 shell/model/__init__.py diff --git a/configure.ac b/configure.ac index 842a1133..dfebdf2e 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,7 @@ shell/conf/Makefile shell/data/Makefile shell/home/Makefile shell/frame/Makefile +shell/model/Makefile shell/PresenceService/Makefile sugar/Makefile sugar/__installed__.py diff --git a/shell/Makefile.am b/shell/Makefile.am index 80aad02b..69dbe870 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = conf data frame home PresenceService +SUBDIRS = conf data frame home model PresenceService bin_SCRIPTS = \ sugar \ @@ -15,9 +15,6 @@ sugar_PYTHON = \ FirstTimeDialog.py \ FriendIcon.py \ FriendPopup.py \ - Friends.py \ - Invites.py \ - Owner.py \ Shell.py \ Session.py diff --git a/shell/Session.py b/shell/Session.py index 0bf3fa4f..bbd1c73a 100644 --- a/shell/Session.py +++ b/shell/Session.py @@ -2,7 +2,7 @@ import os import gtk from Shell import Shell -from ShellModel import ShellModel +from model.ShellModel import ShellModel from ConsoleWindow import ConsoleWindow from sugar import env from sugar import logger diff --git a/shell/Shell.py b/shell/Shell.py old mode 100755 new mode 100644 diff --git a/shell/frame/RightPanel.py b/shell/frame/RightPanel.py index 1bc27f5c..c60cc46c 100644 --- a/shell/frame/RightPanel.py +++ b/shell/frame/RightPanel.py @@ -5,7 +5,7 @@ from sugar.canvas.IconColor import IconColor from sugar.canvas.CanvasBox import CanvasBox from sugar.presence import PresenceService from FriendIcon import FriendIcon -from Friends import Friend +from model.Friends import Friend class RightPanel(CanvasBox): def __init__(self, grid, shell_model): diff --git a/shell/home/HomeGroup.py b/shell/home/HomeGroup.py index 3834bda6..90fc079c 100644 --- a/shell/home/HomeGroup.py +++ b/shell/home/HomeGroup.py @@ -27,7 +27,6 @@ class TasksItem(DonutItem): def _add(self, activity): icon_name = activity.get_icon_name() icon_color = activity.get_icon_color() - print 'Add activity %s' % icon_color.to_string() item = self.add_piece(100 / 8, icon_name, icon_color) item.get_icon().connect('clicked', diff --git a/shell/Friends.py b/shell/model/Friends.py similarity index 100% rename from shell/Friends.py rename to shell/model/Friends.py diff --git a/shell/Invites.py b/shell/model/Invites.py similarity index 100% rename from shell/Invites.py rename to shell/model/Invites.py diff --git a/shell/model/Makefile.am b/shell/model/Makefile.am new file mode 100644 index 00000000..2ce494ba --- /dev/null +++ b/shell/model/Makefile.am @@ -0,0 +1,7 @@ +sugardir = $(pkgdatadir)/shell/model +sugar_PYTHON = \ + __init__.py \ + Friends.py \ + Invites.py \ + Owner.py \ + ShellModel.py diff --git a/shell/Owner.py b/shell/model/Owner.py similarity index 100% rename from shell/Owner.py rename to shell/model/Owner.py diff --git a/shell/ShellModel.py b/shell/model/ShellModel.py similarity index 95% rename from shell/ShellModel.py rename to shell/model/ShellModel.py index c0c8bccf..2f9dd255 100644 --- a/shell/ShellModel.py +++ b/shell/model/ShellModel.py @@ -1,11 +1,11 @@ import gobject -from Owner import ShellOwner from sugar.presence import PresenceService from sugar.activity import ActivityFactory from sugar.activity import Activity -from Friends import Friends -from Invites import Invites +from model.Friends import Friends +from model.Invites import Invites +from model.Owner import ShellOwner class ShellModel(gobject.GObject): __gsignals__ = { diff --git a/shell/model/__init__.py b/shell/model/__init__.py new file mode 100644 index 00000000..e69de29b