From bcc1740f7f514f04629cecb7536c93d4feaf83cf Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 15 Sep 2006 13:23:21 +0200 Subject: [PATCH] Move the view to his own module --- configure.ac | 5 +++-- shell/Makefile.am | 8 +------- shell/Session.py | 5 ++--- shell/{ => view}/ActivityHost.py | 0 shell/{ => view}/ConsoleWindow.py | 0 shell/{ => view}/FirstTimeDialog.py | 0 shell/{ => view}/FriendIcon.py | 2 +- shell/{ => view}/FriendPopup.py | 0 shell/view/Makefile.am | 11 +++++++++++ shell/{ => view}/Shell.py | 6 +++--- shell/{frame => view}/__init__.py | 0 shell/{ => view}/frame/BottomPanel.py | 0 shell/{ => view}/frame/Frame.py | 8 ++++---- shell/{ => view}/frame/Makefile.am | 2 +- shell/{ => view}/frame/PanelWindow.py | 0 shell/{ => view}/frame/RightPanel.py | 2 +- shell/{ => view}/frame/TopPanel.py | 0 shell/{home => view/frame}/__init__.py | 0 shell/{ => view}/home/DonutItem.py | 0 shell/{ => view}/home/FriendsGroup.py | 6 +++--- shell/{ => view}/home/HomeGroup.py | 4 ++-- shell/{ => view}/home/HomeWindow.py | 6 +++--- shell/{ => view}/home/IconLayout.py | 0 shell/{ => view}/home/Makefile.am | 2 +- shell/{ => view}/home/MeshGroup.py | 2 +- shell/{ => view}/home/MyIcon.py | 0 shell/view/home/__init__.py | 0 27 files changed, 37 insertions(+), 32 deletions(-) rename shell/{ => view}/ActivityHost.py (100%) rename shell/{ => view}/ConsoleWindow.py (100%) rename shell/{ => view}/FirstTimeDialog.py (100%) rename shell/{ => view}/FriendIcon.py (98%) rename shell/{ => view}/FriendPopup.py (100%) create mode 100644 shell/view/Makefile.am rename shell/{ => view}/Shell.py (94%) rename shell/{frame => view}/__init__.py (100%) rename shell/{ => view}/frame/BottomPanel.py (100%) rename shell/{ => view}/frame/Frame.py (88%) rename shell/{ => view}/frame/Makefile.am (74%) rename shell/{ => view}/frame/PanelWindow.py (100%) rename shell/{ => view}/frame/RightPanel.py (98%) rename shell/{ => view}/frame/TopPanel.py (100%) rename shell/{home => view/frame}/__init__.py (100%) rename shell/{ => view}/home/DonutItem.py (100%) rename shell/{ => view}/home/FriendsGroup.py (86%) rename shell/{ => view}/home/HomeGroup.py (94%) rename shell/{ => view}/home/HomeWindow.py (89%) rename shell/{ => view}/home/IconLayout.py (100%) rename shell/{ => view}/home/Makefile.am (79%) rename shell/{ => view}/home/MeshGroup.py (98%) rename shell/{ => view}/home/MyIcon.py (100%) create mode 100644 shell/view/home/__init__.py diff --git a/configure.ac b/configure.ac index dfebdf2e..52214ddb 100644 --- a/configure.ac +++ b/configure.ac @@ -48,8 +48,9 @@ bindings/threadframe/Makefile shell/Makefile shell/conf/Makefile shell/data/Makefile -shell/home/Makefile -shell/frame/Makefile +shell/view/Makefile +shell/view/home/Makefile +shell/view/frame/Makefile shell/model/Makefile shell/PresenceService/Makefile sugar/Makefile diff --git a/shell/Makefile.am b/shell/Makefile.am index 69dbe870..1bf373dc 100644 --- a/shell/Makefile.am +++ b/shell/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = conf data frame home model PresenceService +SUBDIRS = conf data model view PresenceService bin_SCRIPTS = \ sugar \ @@ -10,12 +10,6 @@ bin_SCRIPTS = \ sugardir = $(pkgdatadir)/shell sugar_PYTHON = \ __init__.py \ - ActivityHost.py \ - ConsoleWindow.py \ - FirstTimeDialog.py \ - FriendIcon.py \ - FriendPopup.py \ - Shell.py \ Session.py EXTRA_DIST = $(bin_SCRIPTS) diff --git a/shell/Session.py b/shell/Session.py index bbd1c73a..da17cd71 100644 --- a/shell/Session.py +++ b/shell/Session.py @@ -1,9 +1,8 @@ import os import gtk -from Shell import Shell +from view.Shell import Shell from model.ShellModel import ShellModel -from ConsoleWindow import ConsoleWindow from sugar import env from sugar import logger @@ -11,7 +10,7 @@ from sugar.session.Process import Process from sugar.session.DbusProcess import DbusProcess from sugar.session.MatchboxProcess import MatchboxProcess -from FirstTimeDialog import FirstTimeDialog +from view.FirstTimeDialog import FirstTimeDialog import conf class DBusMonitorProcess(Process): diff --git a/shell/ActivityHost.py b/shell/view/ActivityHost.py similarity index 100% rename from shell/ActivityHost.py rename to shell/view/ActivityHost.py diff --git a/shell/ConsoleWindow.py b/shell/view/ConsoleWindow.py similarity index 100% rename from shell/ConsoleWindow.py rename to shell/view/ConsoleWindow.py diff --git a/shell/FirstTimeDialog.py b/shell/view/FirstTimeDialog.py similarity index 100% rename from shell/FirstTimeDialog.py rename to shell/view/FirstTimeDialog.py diff --git a/shell/FriendIcon.py b/shell/view/FriendIcon.py similarity index 98% rename from shell/FriendIcon.py rename to shell/view/FriendIcon.py index 49eecfbb..e5158e2b 100644 --- a/shell/FriendIcon.py +++ b/shell/view/FriendIcon.py @@ -1,6 +1,6 @@ from sugar.canvas.IconItem import IconItem -from FriendPopup import FriendPopup from sugar.canvas.Grid import Grid +from view.FriendPopup import FriendPopup class _PopupShell: def __init__(self): diff --git a/shell/FriendPopup.py b/shell/view/FriendPopup.py similarity index 100% rename from shell/FriendPopup.py rename to shell/view/FriendPopup.py diff --git a/shell/view/Makefile.am b/shell/view/Makefile.am new file mode 100644 index 00000000..7481dbe5 --- /dev/null +++ b/shell/view/Makefile.am @@ -0,0 +1,11 @@ +SUBDIRS = frame home + +sugardir = $(pkgdatadir)/shell/view +sugar_PYTHON = \ + __init__.py \ + ActivityHost.py \ + ConsoleWindow.py \ + FirstTimeDialog.py \ + FriendIcon.py \ + FriendPopup.py \ + Shell.py diff --git a/shell/Shell.py b/shell/view/Shell.py similarity index 94% rename from shell/Shell.py rename to shell/view/Shell.py index 30a79576..7e1050e0 100644 --- a/shell/Shell.py +++ b/shell/view/Shell.py @@ -2,9 +2,9 @@ import gtk import gobject import wnck -from home.HomeWindow import HomeWindow -from ActivityHost import ActivityHost -from frame.Frame import Frame +from view.home.HomeWindow import HomeWindow +from view.ActivityHost import ActivityHost +from view.frame.Frame import Frame from globalkeys import KeyGrabber import sugar diff --git a/shell/frame/__init__.py b/shell/view/__init__.py similarity index 100% rename from shell/frame/__init__.py rename to shell/view/__init__.py diff --git a/shell/frame/BottomPanel.py b/shell/view/frame/BottomPanel.py similarity index 100% rename from shell/frame/BottomPanel.py rename to shell/view/frame/BottomPanel.py diff --git a/shell/frame/Frame.py b/shell/view/frame/Frame.py similarity index 88% rename from shell/frame/Frame.py rename to shell/view/frame/Frame.py index 826295f1..5ebecccb 100644 --- a/shell/frame/Frame.py +++ b/shell/view/frame/Frame.py @@ -2,10 +2,10 @@ import gtk import gobject import goocanvas -from frame.BottomPanel import BottomPanel -from frame.RightPanel import RightPanel -from frame.TopPanel import TopPanel -from frame.PanelWindow import PanelWindow +from view.frame.BottomPanel import BottomPanel +from view.frame.RightPanel import RightPanel +from view.frame.TopPanel import TopPanel +from view.frame.PanelWindow import PanelWindow from sugar.canvas.Grid import Grid class Frame: diff --git a/shell/frame/Makefile.am b/shell/view/frame/Makefile.am similarity index 74% rename from shell/frame/Makefile.am rename to shell/view/frame/Makefile.am index 9f455439..a737e018 100644 --- a/shell/frame/Makefile.am +++ b/shell/view/frame/Makefile.am @@ -1,4 +1,4 @@ -sugardir = $(pkgdatadir)/shell/frame +sugardir = $(pkgdatadir)/shell/view/frame sugar_PYTHON = \ __init__.py \ RightPanel.py \ diff --git a/shell/frame/PanelWindow.py b/shell/view/frame/PanelWindow.py similarity index 100% rename from shell/frame/PanelWindow.py rename to shell/view/frame/PanelWindow.py diff --git a/shell/frame/RightPanel.py b/shell/view/frame/RightPanel.py similarity index 98% rename from shell/frame/RightPanel.py rename to shell/view/frame/RightPanel.py index c60cc46c..f12ccf5f 100644 --- a/shell/frame/RightPanel.py +++ b/shell/view/frame/RightPanel.py @@ -4,7 +4,7 @@ from sugar.canvas.IconItem import IconItem from sugar.canvas.IconColor import IconColor from sugar.canvas.CanvasBox import CanvasBox from sugar.presence import PresenceService -from FriendIcon import FriendIcon +from view.FriendIcon import FriendIcon from model.Friends import Friend class RightPanel(CanvasBox): diff --git a/shell/frame/TopPanel.py b/shell/view/frame/TopPanel.py similarity index 100% rename from shell/frame/TopPanel.py rename to shell/view/frame/TopPanel.py diff --git a/shell/home/__init__.py b/shell/view/frame/__init__.py similarity index 100% rename from shell/home/__init__.py rename to shell/view/frame/__init__.py diff --git a/shell/home/DonutItem.py b/shell/view/home/DonutItem.py similarity index 100% rename from shell/home/DonutItem.py rename to shell/view/home/DonutItem.py diff --git a/shell/home/FriendsGroup.py b/shell/view/home/FriendsGroup.py similarity index 86% rename from shell/home/FriendsGroup.py rename to shell/view/home/FriendsGroup.py index adb3de8d..1e2fb8f2 100644 --- a/shell/home/FriendsGroup.py +++ b/shell/view/home/FriendsGroup.py @@ -2,9 +2,9 @@ import random import goocanvas -from home.IconLayout import IconLayout -from home.MyIcon import MyIcon -from FriendIcon import FriendIcon +from view.home.IconLayout import IconLayout +from view.home.MyIcon import MyIcon +from view.FriendIcon import FriendIcon class FriendsGroup(goocanvas.Group): def __init__(self, shell_model): diff --git a/shell/home/HomeGroup.py b/shell/view/home/HomeGroup.py similarity index 94% rename from shell/home/HomeGroup.py rename to shell/view/home/HomeGroup.py index 90fc079c..e6376cde 100644 --- a/shell/home/HomeGroup.py +++ b/shell/view/home/HomeGroup.py @@ -1,7 +1,7 @@ import goocanvas -from home.DonutItem import DonutItem -from home.MyIcon import MyIcon +from view.home.DonutItem import DonutItem +from view.home.MyIcon import MyIcon class TasksItem(DonutItem): def __init__(self, shell_model): diff --git a/shell/home/HomeWindow.py b/shell/view/home/HomeWindow.py similarity index 89% rename from shell/home/HomeWindow.py rename to shell/view/home/HomeWindow.py index 3c895fab..b89420f0 100644 --- a/shell/home/HomeWindow.py +++ b/shell/view/home/HomeWindow.py @@ -3,9 +3,9 @@ import goocanvas import cairo from sugar.canvas.CanvasView import CanvasView -from home.MeshGroup import MeshGroup -from home.HomeGroup import HomeGroup -from home.FriendsGroup import FriendsGroup +from view.home.MeshGroup import MeshGroup +from view.home.HomeGroup import HomeGroup +from view.home.FriendsGroup import FriendsGroup import sugar class HomeWindow(gtk.Window): diff --git a/shell/home/IconLayout.py b/shell/view/home/IconLayout.py similarity index 100% rename from shell/home/IconLayout.py rename to shell/view/home/IconLayout.py diff --git a/shell/home/Makefile.am b/shell/view/home/Makefile.am similarity index 79% rename from shell/home/Makefile.am rename to shell/view/home/Makefile.am index 5d5436e3..ddf9653a 100644 --- a/shell/home/Makefile.am +++ b/shell/view/home/Makefile.am @@ -1,4 +1,4 @@ -sugardir = $(pkgdatadir)/shell/home +sugardir = $(pkgdatadir)/shell/view/home sugar_PYTHON = \ __init__.py \ DonutItem.py \ diff --git a/shell/home/MeshGroup.py b/shell/view/home/MeshGroup.py similarity index 98% rename from shell/home/MeshGroup.py rename to shell/view/home/MeshGroup.py index 3247b734..90dce0e0 100644 --- a/shell/home/MeshGroup.py +++ b/shell/view/home/MeshGroup.py @@ -6,7 +6,7 @@ import conf from sugar.canvas.IconItem import IconItem from sugar.canvas.IconItem import IconColor from sugar.presence import PresenceService -from home.IconLayout import IconLayout +from view.home.IconLayout import IconLayout class ActivityItem(IconItem): def __init__(self, activity, service): diff --git a/shell/home/MyIcon.py b/shell/view/home/MyIcon.py similarity index 100% rename from shell/home/MyIcon.py rename to shell/view/home/MyIcon.py diff --git a/shell/view/home/__init__.py b/shell/view/home/__init__.py new file mode 100644 index 00000000..e69de29b