Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/library.py
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2009-02-26 15:52:53 (GMT)
committer Walter Bender <walter@walter-laptop.(none)>2009-03-02 14:45:11 (GMT)
commitaeaff165cd66fc48d6d794aa6a506c878a7af83b (patch)
tree8cd942af824d275796e666110aefc5c43cbbe2d2 /library.py
parent39bfabdfd281c509e0e48580fbdda436423f022b (diff)
Use array in memory to store map
Diffstat (limited to 'library.py')
-rw-r--r--library.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/library.py b/library.py
index f649291..fea1f56 100644
--- a/library.py
+++ b/library.py
@@ -23,6 +23,7 @@ from sugar.graphics.toolcombobox import ToolComboBox
from GUI_Components.Compound_Widgets.Library_View import Library_View
from GUI_Components.Compound_Widgets.toolbar import WidgetItem
from GUI_Components.Compound_Widgets.bookview import BookView
+from GUI_Components.Compound_Widgets.Reading_View import Reading_View
import book
class View(gtk.EventBox): #Library_View):
@@ -30,15 +31,35 @@ class View(gtk.EventBox): #Library_View):
gtk.EventBox.__init__(self)
books = gtk.VBox()
+ books.set_size_request(gtk.gdk.screen_width()/4, -1)
books.pack_start(BookView(book.wiki, _('Wiki Articles')))
books.pack_start(BookView(book.custom, _('Custom Articles')))
+ self.wiki_arcticle = Reading_View()
+ self.custom_arcticle = Reading_View()
+ self.custom_arcticle.set_size_request(gtk.gdk.screen_width()/4*3/2, -1)
+
+ articles = gtk.HBox()
+ articles.pack_start(self.wiki_arcticle)
+ articles.pack_start(self.custom_arcticle, False)
+
desktop = gtk.HBox()
- desktop.pack_start(books)
+ desktop.pack_start(books, False)
+ desktop.pack_start(articles)
desktop.show_all()
self.add(desktop)
+ book.wiki.connect('article-changed', self._wiki_changed_cb)
+ book.custom.connect('article-changed', self._custom_changed_cb)
+
+ def _wiki_changed_cb(self, book, article):
+ self.wiki_arcticle.textbox.set_article(article)
+
+ def _custom_changed_cb(self, book, article):
+ self.custom_arcticle.textbox.set_article(article)
+
+
#Library_View.__init__(self)