Web · Wiki · Activities · Blog · Lists · Chat · Meeting · Bugs · Git · Translate · Archive · People · Donate

Commit 7985475cbfd4db1a82acace6dd2996af876ef30b

Cambios subidos
Toolbars.py
(37 / 23)
  
3232 print 'NO SE ESTA EN SUGAR.. SALIENDO'
3333 sys.exit()
3434Fonts = Combo()
35Fonts.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
35Fonts.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8",
36 "Monospace 12", "Monospace 24", "Times New Roman 8",
37 "Times New Roman 12", "Times New Roman 24", "FreeSans 8",
38 "FreeSans 12", "FreeSans 24"])
3639Title_Tam = Combo()
37Title_Tam.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8", "Monospace 12", "Monospace 24", "Times New Roman 8", "Times New Roman 12", "Times New Roman 24", "FreeSans 8", "FreeSans 12", "FreeSans 24"])
40Title_Tam.set_items(["Purisa 8", "Purisa 12", "Purisa 24", "Monospace 8",
41 "Monospace 12", "Monospace 24", "Times New Roman 8",
42 "Times New Roman 12", "Times New Roman 24", "FreeSans 8",
43 "FreeSans 12", "FreeSans 24"])
3844ColorLetra = ColorToolButton()
3945ColorTitle = ColorToolButton()
4046ColorFondo = ColorToolButton()
5757page_button = ToolButton("edit-c")
5858check_button = ToolButton("broken")
5959
60
6061def Color_Toolbar(toolbar):
6162 color_button = ToolbarButton(icon_name='color-preview')
6263 color_toolbar = gtk.Toolbar()
63 ColorContentLabel = gtk.Label(_('Color for content')) # Duda ¿Es content o context?
64 ColorFondoLabel = gtk.Label(_('Color for page'))
65 ColorTitleLabel = gtk.Label(_('Color for title'))
64 ColorContentLabel = gtk.Label(_('Text color'))
65 ColorFondoLabel = gtk.Label(_('Page color'))
66 ColorTitleLabel = gtk.Label(_('Title color'))
6667 # Contenido del libro
6768 Item = gtk.ToolItem()
6869 Item.add(ColorContentLabel)
9191 color_button.props.page = color_toolbar
9292 color_toolbar.show_all()
9393 toolbar.toolbar.insert(color_button, -1)
94
95
9496def Text_Toolbar(toolbar):
9597 text_button = ToolbarButton(icon_name="format-text-size")
9698 text_toolbar = gtk.Toolbar()
123123 text_toolbar.show_all()
124124 text_button.props.page = text_toolbar
125125 toolbar.toolbar.insert(text_button, -1)
126
127
126128def Read_Toolbar(toolbar):
127129 # read toolbar
128130 read_button = ToolbarButton(icon_name="read")
157157 tutorial.show()
158158 credits.show()
159159 toolbar.toolbar.insert(read_button, -1)
160
161
160162def Write_Toolbar(toolbar):
161163 # write toolbar
162164 write_button = ToolbarButton(icon_name="edit")
182182 write_button.props.page = write_toolbar
183183 write_toolbar.show_all()
184184 toolbar.toolbar.insert(write_button, -1)
185
185186
186187def Ayuda(toolbar):
187188 Boton_Ayuda = Ayudas()
188189 # Porfavor, traducir esto al ingles! #
189 Boton_Ayuda.add_section(_("Crear un libro"))
190 Boton_Ayuda.add_paragraph(_("Para crear un nuevo libro debes hacer click en el icono"),'edit')
191 Boton_Ayuda.add_paragraph(_("Posterior a esto haz click en:"),'new')
192 Boton_Ayuda.add_section(_("Editar un libro"))
193 Boton_Ayuda.add_paragraph(_("Para editar el libro debes hacer click en"),'edit')
194 Boton_Ayuda.add_paragraph(_("Luego haz click en:"),'edit-c')
195 Boton_Ayuda.add_section(_("Editar las propiedades"))
196 Boton_Ayuda.add_paragraph(_("Para editar las propiedades debes hacer click en"),'edit')
197 Boton_Ayuda.add_paragraph(_("Despues haz click en:"),'edit-p')
198 Boton_Ayuda.add_section(_("Leer un libro"))
199 Boton_Ayuda.add_paragraph(_("Para leer un libro debes hacer click en:"),'read')
200 Boton_Ayuda.add_paragraph(_("Si quieres ir a la primer página debes hacer click en:"),'home')
201 Boton_Ayuda.add_paragraph(_("Si quieres cargar tu libro haz click en:"),'open-from-journal')
202 Boton_Ayuda.add_paragraph(_("Si te interesan los créditos haz click en:"),'credits')
203 Boton_Ayuda.add_section(_("Editar la 'letra'"))
204 Boton_Ayuda.add_paragraph(_("Para editar la tipografía de un libro debes hacer click en:"),'format-text-size')
205 Boton_Ayuda.add_paragraph(_("Si tu quieres editar el nombre de la tipografía deberas hacer click donde dice 'Purisa 8', se desplegara una lista de fuentes. Selecciona una"))
206 Boton_Ayuda.add_paragraph(_("Si quieres editar el color haz click en:"), 'color-preview')
190 Boton_Ayuda.add_section(_("Creating a book"))
191 Boton_Ayuda.add_paragraph(_("To create a new book, click on"),'edit')
192 Boton_Ayuda.add_paragraph(_("Then click on"),'new')
193 Boton_Ayuda.add_section(_("Editing a book"))
194 Boton_Ayuda.add_paragraph(_("To edit the book, click on"),'edit')
195 Boton_Ayuda.add_paragraph(_("Then click on"),'edit-c')
196 Boton_Ayuda.add_section(_("Editing the book properties"))
197 Boton_Ayuda.add_paragraph(_("To edit the book properties, click on"),'edit')
198 Boton_Ayuda.add_paragraph(_("Then click on"),'edit-p')
199 Boton_Ayuda.add_section(_("Reading a book"))
200 Boton_Ayuda.add_paragraph(_("To read a book, click on"),'read')
201 Boton_Ayuda.add_paragraph(_("If you want to go to the first page, click on"),'home')
202 Boton_Ayuda.add_paragraph(_("If you want to load a book from the journal, click on"),'open-from-journal')
203 Boton_Ayuda.add_paragraph(_("If you want to read a tutorial and the credits, click on"),'credits')
204 Boton_Ayuda.add_section(_("Editing the text style"))
205 Boton_Ayuda.add_paragraph(_("To change the font size, click on"),'format-text-size')
206 Boton_Ayuda.add_paragraph(_("If you want to edit the font name, click on the text box (e.g., 'Purisa 8'); a font list will be displayed. Select one."))
207 Boton_Ayuda.add_paragraph(_("If you want to change the color, click on"), 'color-preview')
207208 Boton_Ayuda.show()
208209 toolbar.toolbar.insert(Boton_Ayuda, -1)
abook.py
(11 / 3)
  
236236 EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
237237
238238# self._start_button_cb(widget)
239
240
239241 def Credits(self, widget):
240 self._book = credits_book()
242 self._book = tutorial_book() #credits_book()
241243 self._start_book(Toolbars.ColorLetra.get_color())
242244 EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
245
246
243247 def Tutorial(self, widget):
244248 self._book = tutorial_book()
245249 self._start_book(Toolbars.ColorLetra.get_color())
246250 EventBox.modify_bg(gtk.STATE_NORMAL, Toolbars.ColorFondo.get_color())
251
252
247253 def _edit_book_button_cb(self, widget, Color):
248254 Tam = pango.FontDescription('8')
249255 Col = gtk.gdk.Color('#ff0000')
580580 pointed_to = True
581581 if not pointed_to:
582582 print "Page "+ p1.get_title() + " not referenced"
583 msg_label = gtk.Label("Error: Page '"+ p1.get_title() + "' not referenced from any other page")
583 msg_label = gtk.Label("Error: Page '"+ p1.get_title() +
584 "' not referenced from any other page")
584585 msg_label.modify_fg(gtk.STATE_NORMAL, Color)
585586 msg_label.modify_font(Tam)
586587 self._main_view.pack_start(msg_label)
590590 for p1 in self._book.get_pages():
591591 for p in self._book.get_pages():
592592 if p1.get_title() == p.get_title() and p1 != p:
593 msg_label = gtk.Label("Error: Page title '"+ p1.get_title() + "' is not unique")
593 msg_label = gtk.Label("Error: Page title '"+ p1.get_title() +
594 "' is not unique")
594595 msg_label.modify_fg(gtk.STATE_NORMAL, Color)
595596 msg_label.modify_font(Tam)
596597 self._main_view.pack_start(msg_label)
textbook.py
(53 / 4)
  
1414
1515 p1 = cPage(_("What are Adventure Books?"))
1616 mybook.add_page(p1)
17 p1.set_text(_("""Adventure Books are books that allow the reader to choose between different alternatives."""))
17 p1.set_text(_("""Adventure Books are books that allow the reader to
18choose between different alternatives. Every page in an Adventure Book
19offers several options and depending on your choice the story follows
20in different directions.
1821
22You can read an existing Adventure Book and if you want you can modify
23it and distribute among your friends. Or you can create a new Adventure
24Book from scratch."""))
25
1926 p2 = cPage(_("How can I read an Adventure Book?"))
2027 mybook.add_page(p2)
21 p2.set_text(_("""Adventure Books can be read with the eyes."""))
28 p2.set_text(_("""To read an Adventure Book, first load it from the
29journal. A cover page with the title and author are displayed. You can
30press the 'Start reading' button to go to the first page.
2231
32Every page has a text and one or more buttons with different choices.
33When you press a button, you go to the page corresponding to that option.
34If you want, you can go back to the first page with the button 'Start from
35the beginning'."""))
36
2337 p3 = cPage(_("How can I create an Adventure Book?"))
2438 mybook.add_page(p3)
25 p3.set_text(_("""Adventure Books can be created with hard work."""))
39 p3.set_text(_("""Adventure Books can be created with the 'New book'
40button. Introduce the title, your name, and choose a license. (A license
41is a legal term that declares if you want your book to be copied
42and shared; please read more about licenses in the Creative Commons web
43page.)
2644
45Press the 'Edit book contents' button to enter the text of your book. You
46have to create the pages for your book; for every page you have to add a
47title and a text, and then create as many options as choices you want to
48give the reader in that particular page. For every option, you have to
49define to which page the story is going to jump. Please give every page
50a different title so you won't get confused. If you want the story to
51jump to a page you haven't created yet, don't worry, you can define it
52later."""))
53
2754 p4 = cPage(_("How can I modify an Adventure Book?"))
2855 mybook.add_page(p4)
29 p4.set_text(_("""Adventure Books can be modified fearlessly."""))
56 p4.set_text(_("""All Adventure Books can be modified. You simply select
57the 'Edit book contents' button and you can edit and modify all the pages in
58the book. After you're done, it's good to use the 'Check book for missing parts'
59button to verify that your book is correct; if there is an error it will show
60you where the problem is so you can correct it."""))
3061
62 p5 = cPage(_("Credits"))
63 mybook.add_page(p5)
64 p5.set_text(_("""Authors:
65Gabriel Eirea <geirea@gmail.com>
66Ignacio Rodriguez <nachoel01@gmail.com>
67Thanks to: Flavio Danesse <fdanesse@gmail.com>
68
69¡Thanks for using this program! :)
70
71To continue create an empty book!"""))
72
3173 o1 = cOption(_("How to read"),p2)
3274 o2 = cOption(_("How to create"), p3)
3375 o3 = cOption(_("How to modify"), p4)
76 o4 = cOption(_("Credits"), p5)
3477 p1.add_option(o1)
3578 p1.add_option(o2)
3679 p1.add_option(o3)
80 p1.add_option(o4)
3781
3882 o4 = cOption(_("Return"), p1)
3983 p2.add_option(o4)
4084 p3.add_option(o4)
4185 p4.add_option(o4)
86 p5.add_option(o4)
4287
4388 return mybook
4489
90
4591def empty_book():
4692
4793 mybook = cBook(_("Title"))
9999 mybook.add_page(p1)
100100
101101 return mybook
102
103
102104def credits_book():
103105
104106 mybook = cBook(_("Credits"))
115115To continue create a empty book!"""))
116116 mybook.add_page(p1)
117117 return mybook
118
118119
119120def print_text_book(mybook):
120121