Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/shell/home
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-08-19 00:00:04 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-08-19 00:00:04 (GMT)
commitde65daf5480b673df26c5144925c8041a766cc87 (patch)
tree313c1b856d1dd7be2ab630e202a7f68e908c72b2 /shell/home
parent24dae31a9d1bb2141db3bfd0364f2d95219fc7fa (diff)
Implement zooming levels, actual view still empty
Diffstat (limited to 'shell/home')
-rw-r--r--shell/home/FriendsView.py20
-rw-r--r--shell/home/HomeWindow.py13
-rw-r--r--shell/home/Makefile.am3
3 files changed, 35 insertions, 1 deletions
diff --git a/shell/home/FriendsView.py b/shell/home/FriendsView.py
new file mode 100644
index 0000000..baa834b
--- /dev/null
+++ b/shell/home/FriendsView.py
@@ -0,0 +1,20 @@
+import goocanvas
+
+class Model(goocanvas.CanvasModelSimple):
+ def __init__(self, shell):
+ goocanvas.CanvasModelSimple.__init__(self)
+
+ root = self.get_root_item()
+
+class FriendsView(goocanvas.CanvasView):
+ def __init__(self, shell):
+ goocanvas.CanvasView.__init__(self)
+ self._shell = shell
+
+ self.connect("item_view_created", self.__item_view_created_cb)
+
+ canvas_model = Model(shell)
+ self.set_model(canvas_model)
+
+ def __item_view_created_cb(self, view, item_view, item):
+ pass
diff --git a/shell/home/HomeWindow.py b/shell/home/HomeWindow.py
index d66020e..ca3007d 100644
--- a/shell/home/HomeWindow.py
+++ b/shell/home/HomeWindow.py
@@ -2,8 +2,13 @@ import gtk
from home.MeshView import MeshView
from home.HomeView import HomeView
+from home.FriendsView import FriendsView
class HomeWindow(gtk.Window):
+ HOME_VIEW = 0
+ FRIENDS_VIEW = 1
+ MESH_VIEW = 2
+
def __init__(self, shell):
gtk.Window.__init__(self)
@@ -17,6 +22,11 @@ class HomeWindow(gtk.Window):
self._nb.append_page(home_view)
self._setup_canvas(home_view)
home_view.show()
+
+ friends_view = FriendsView(shell)
+ self._nb.append_page(friends_view)
+ self._setup_canvas(friends_view)
+ friends_view.show()
mesh_view = MeshView(shell)
self._setup_canvas(mesh_view)
@@ -26,6 +36,9 @@ class HomeWindow(gtk.Window):
self.add(self._nb)
self._nb.show()
+ def set_view(self, view):
+ self._nb.set_current_page(view)
+
def _setup_canvas(self, canvas):
canvas.set_bounds(0, 0, 1200, 900)
canvas.set_scale(float(800) / float(1200))
diff --git a/shell/home/Makefile.am b/shell/home/Makefile.am
index 184570e..72445ec 100644
--- a/shell/home/Makefile.am
+++ b/shell/home/Makefile.am
@@ -1,6 +1,7 @@
sugardir = $(pkgdatadir)/shell
sugar_PYTHON = \
__init__.py \
+ FriendsView.py \
MeshView.py \
HomeView.py \
- Window.py
+ HomeWindow.py